npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cdwr/cli

v1.3.1

Published

Codeware Sthlm Developer CLI

Downloads

16

Readme

Codeware Sthlm Developer CLI

GitHub Workflow Status (with branch) npm (scoped) Semantic Release

Table of contents

Description

This is a CLI to make local development a bit easier and structured. Some commonly used tools and scripts are bundled and provided by CLI commands.

Though it's a public repo this CLI is aimed for Codeware Sthlm developers. If anyone finds it useful we're more than happy to share our code, or the CLI itself from NPM.

Recipes

Setup a local npm registry using verdaccio

# Start verdaccio
cdwr registry start

# Change your local registry setting to use the verdaccio host
cdwr registry set local

# Check status and get registry info
cdwr registry status

Deployment to npm via npm publish should end up in verdaccio repository.

The repository content is accessed via http://localhost:4373.

# Stop verdaccio
cdwr registry stop

# Verify it's stopped
cdwr registry status

General Usage

$ npm install -g @cdwr/cli
$ cdwr COMMAND
running command...
$ cdwr (--version)
@cdwr/cli/1.3.1 linux-x64 node-v18.18.0
$ cdwr --help [COMMAND]
USAGE
  $ cdwr COMMAND
...

Commands

cdwr autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ cdwr autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  display autocomplete installation instructions

EXAMPLES
  $ cdwr autocomplete

  $ cdwr autocomplete bash

  $ cdwr autocomplete zsh

  $ cdwr autocomplete --refresh-cache

See code: @oclif/plugin-autocomplete

cdwr commands

list all the commands

USAGE
  $ cdwr commands [--json] [-h] [--hidden] [--tree] [--columns <value> | -x] [--sort <value>] [--filter
    <value>] [--output csv|json|yaml |  | [--csv | --no-truncate]] [--no-header | ]

FLAGS
  -h, --help         Show CLI help.
  -x, --extended     show extra columns
  --columns=<value>  only show provided columns (comma-separated)
  --csv              output is csv format [alias: --output=csv]
  --filter=<value>   filter property by partial string matching, ex: name=foo
  --hidden           show hidden commands
  --no-header        hide table header from output
  --no-truncate      do not truncate output to fit screen
  --output=<option>  output in a more machine friendly format
                     <options: csv|json|yaml>
  --sort=<value>     property to sort by (prepend '-' for descending)
  --tree             show tree of commands

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  list all the commands

See code: @oclif/plugin-commands

cdwr help [COMMANDS]

Display help for cdwr.

USAGE
  $ cdwr help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for cdwr.

See code: @oclif/plugin-help

cdwr registry [COMMAND]

Manage registry settings and actions

USAGE
  $ cdwr registry [COMMAND]

DESCRIPTION
  Manage registry settings and actions

See code: dist/commands/registry/index.ts

cdwr registry set [LOCATION]

Set the active registry location

USAGE
  $ cdwr registry set [LOCATION]

ARGUMENTS
  LOCATION  (local|remote) Registry location

DESCRIPTION
  Set the active registry location

EXAMPLES
  $ cdwr registry set local

  $ cdwr registry set remote

cdwr registry start

Start local verdaccio registry

USAGE
  $ cdwr registry start [-d]

FLAGS
  -d, --detach  Run verdaccio as background process

DESCRIPTION
  Start local verdaccio registry

EXAMPLES
  $ cdwr registry start

  $ cdwr registry start -d

cdwr registry status

Display registry status

USAGE
  $ cdwr registry status

DESCRIPTION
  Display registry status

  Prints the current registry settings
  and the status of the local verdaccio registry

cdwr registry stop

Stop local verdaccio registry

USAGE
  $ cdwr registry stop

DESCRIPTION
  Stop local verdaccio registry

cdwr search

Search for a command.

USAGE
  $ cdwr search

DESCRIPTION
  Search for a command.

  Once you select a command, hit enter and it will show the help for that command.

See code: @oclif/plugin-search

cdwr version

USAGE
  $ cdwr version [--json] [--verbose]

FLAGS
  --verbose  Show additional information about the CLI.

GLOBAL FLAGS
  --json  Format output as json.

FLAG DESCRIPTIONS
  --verbose  Show additional information about the CLI.

    Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.

See code: @oclif/plugin-version

CLI Development

Prerequisites

tsx must be globally installed to be able to start CLI in development mode.

npm i -g tsx

Setup

git clone https://github.com/codeware-sthlm/cdwr-cli.git [PATH]
cd [PATH]
yarn

Start

Launch development mode

bin/dev.js [COMMAND]

Launch production build

yarn build
bin/run.js [COMMAND]

Linting

yarn lint

Unit tests

yarn test

Create local tarball releases (optional)

yarn release:local

Commit some changes

# Stage files
git add [FILES]

# Start interactive Git commit CLI
yarn commit
# or
yarn c

# with ai support (setup required)
yarn commit ai
# or
yarn cai

Setup OpenAI token

https://cz-git.qbb.sh/recipes/openai#setup-openai-token

npx czg --openai-token=sk-xxxxx

Token is saved to ~/.config/.czrc