CLI Reference
The csreg CLI is the primary tool for interacting with the Skills Registry from the terminal.
Installation#
npm install -g @agent-nexus/csregAuthentication#
login#
csreg login [--token <token>]Prints a URL to authenticate with the registry. Visit the URL in your browser, then paste the auth token when prompted.
For CI environments or pre-generated tokens, use the --token flag to skip the interactive flow:
csreg login --token <token>Info
~/.config/csreg/config.json.logout#
csreg logoutRemoves stored credentials for the registry.
whoami#
csreg whoamiPrints the currently authenticated user and the registry URL.
Authoring#
init#
csreg init [directory]Scaffolds a new skill directory with a SKILL.md file. Uses interactive prompts to gather the skill name, description, scope, and whether it should be user-invocable.
Created structure:
my-skill/
SKILL.mdvalidate#
csreg validate [directory]
--all # Validate all skills in .claude/skills/Validates the skill manifest (SKILL.md), checks that the entry file exists, and enforces size limits. Exits with code 0 if valid or 1 if errors are found.
pack#
csreg pack [directory]Creates a .tar.gz archive of the skill without uploading it to the registry. Useful for inspecting what will be published or for manual distribution.
Publishing#
push#
csreg push [directory]
--all # Push all skills in .claude/skills/Packs and uploads the skill to the registry. The publish flow runs through these steps:
- Validate the manifest and entry file
- Pack the skill files into an archive
- Prepare the version on the registry (reserve the version number)
- Upload the archive to storage
- Finalize the version (mark as published)
- Set the channel pointer (defaults to
latest)
Installing#
pull#
csreg pull [ref]
--all # Pull all skills from .claude/skills.json
--path <dir> # Custom install directoryDownloads and extracts a skill into your project. By default, the latest channel is used. You can pin to a specific version or channel:
# Install the latest version
csreg pull @backend/code-reviewer
# Install a specific version
csreg pull @backend/code-reviewer@1.2.0
# Install from the stable channel
csreg pull @backend/code-reviewer@stable
# Install to a custom path
csreg pull @backend/code-reviewer --path ./toolsInspection#
info#
csreg info <scope>/<name>Prints skill metadata including the description, latest version, available channels, and total download count.
versions#
csreg versions <scope>/<name>Lists all published versions of a skill with their publish dates and statuses.
search#
csreg search <query>
-t, --type <type> # Filter by skill type
-l, --limit <limit> # Max results (default: 20)Searches the registry for skills matching the query. Example:
$ csreg search "code review"
@backend/code-reviewer v2.1.0 Code review automation 12,340 downloads
@devtools/pr-reviewer v1.5.2 Pull request reviewer 8,210 downloads
@qa/review-checklist v3.0.1 Review checklist generator 5,890 downloadsExit Codes#
All CLI commands use consistent exit codes:
| Code | Meaning |
|---|---|
0 | Success |
1 | General error or validation failure |
Configuration#
The CLI reads configuration from multiple sources. Settings are resolved in the following order of precedence (highest to lowest):
- CLI flags (e.g.,
--registry) - Environment variables
- User configuration file
Config file locations:
| Platform | Path |
|---|---|
| Linux / macOS | ~/.config/csreg/config.json |
| Windows | %APPDATA%\csreg\config.json |
Environment variables:
| Variable | Description |
|---|---|
CSREG_API_URL | Override the default registry URL |
CSREG_TOKEN | Authentication token (useful for CI/CD) |
Tip
CSREG_TOKEN as a secret environment variable instead of running csreg login interactively.