Installation
Install the ClaudeHub CLI globally using your preferred package manager. Node.js 18 or higher is required.
After installation, verify by running ch --version.
Quick Start
Get up and running in under a minute. The CLI uses a git-inspired sync model: initialize your project once, then pull and push skills, workflows, and sub-agents as you work.
Install the CLI
Install globally with npm, yarn, or pnpm (see above).
npm install -g @claudehubcc/cliLog in with your API key
Generate an API key from your ClaudeHub dashboard under Settings → API Keys, then run:
ch loginInitialize your project
Run this once in your project root. It guides you through selecting a workspace, categories to sync, and optional ignore patterns.
ch initPull all skills, workflows, and sub-agents
Download everything from the workspace. Skills and workflows land in .claude/skills/, sub-agents in .claude/agents/.
ch pullEdit locally, then push
Make changes to any skill, workflow, or sub-agent file, then push your changes back.
ch pushAuthentication
The CLI uses API keys to authenticate with ClaudeHub. Keys are stored globally in ~/.claudehub/config.json and sent as a Bearer token on every request.
ch loginAuthenticate with an API key. Prompts interactively. On first run shows the welcome onboarding.
Example
ch loginOutput
ch logout [-y]Clear stored credentials from the global config file.
Options
| Flag | Description |
|---|---|
| -y, --yes | Skip the confirmation prompt |
Example
ch logout
ch logout -ych whoamiDisplay the currently authenticated user.
Example
ch whoamiOutput
Init
Initialize a ClaudeHub project in the current directory. Run this once per repository. It creates a .claudehub/config.json file that tracks which workspace and categories to sync.
ch init [--force]Interactively select a workspace, pick categories to scope what gets synced, and optionally specify ignore glob patterns (e.g. draft-*). Creates .claudehub/config.json in the current directory.
Options
| Flag | Description |
|---|---|
| --force | Overwrite an existing .claudehub/config.json without prompting |
Example
ch init
ch init --forceOutput
Commit .claudehub/ to git
Commit both .claudehub/config.json and .claudehub/lock.json to your repository. The lockfile tracks synced state (like package-lock.json) and enables conflict detection for your team.
Workspaces
Workspaces group your skills and workflows. The workspace selection is project-scoped and stored in .claudehub/config.json. Use the alias ws for brevity.
ch workspace <subcommand>
ch ws <subcommand> # aliasch workspace listList all workspaces you have access to. The project-active workspace is marked with an asterisk (*).
Example
ch workspace list
ch ws listOutput
ch workspace use [name-or-id]Set the workspace for this project. Writes to .claudehub/config.json. If no argument is given, shows an interactive selection list.
Example
ch workspace use my-workspace
ch ws use 6839a1f2c4e8b3d2a1f0e9c8Output
ch workspace currentShow which workspace is currently active for this project.
Example
ch workspace currentOutput
Pull & Push
Skills and workflows live in .claude/skills/ in your project, while sub-agents are single .md files under .claude/agents/. A skill is a folder containing SKILL.md. A workflow is detected by the presence of a workflow-graph.yaml file alongside SKILL.md. Pull and push operate on all three types together.
Conflict detection
Version-based conflict detection: if the remote version is newer than what is recorded in .claudehub/lock.json AND local files have been modified, the CLI warns you. Use -f to force overwrite.
ch pull [name] [-f]Download skills, workflows, and sub-agents from the active workspace into .claude/skills/ and .claude/agents/. Without a name, pulls all extensions matching the categories and ignore patterns in .claudehub/config.json. Updates .claudehub/lock.json after syncing.
Options
| Flag | Description |
|---|---|
| name | Name of a single extension to pull (optional). Matches across skill, workflow, and sub-agent. |
| -f, --force | Overwrite local changes without conflict warning |
Example
ch pull
ch pull code-review
ch pull triage-bot -fOutput
ch push [name] [-f]Upload local skills, workflows, and sub-agents to the active workspace. Without a name, pushes all extensions that have local changes relative to .claudehub/lock.json. Updates the lockfile after a successful push.
Options
| Flag | Description |
|---|---|
| name | Name of a single extension to push (optional). Matches across skill, workflow, and sub-agent. |
| -f, --force | Push even if a remote conflict is detected |
Example
ch push
ch push code-review
ch push triage-bot -fOutput
Working tree layout
Skills: .claude/skills/<name>/SKILL.md
Workflows: .claude/skills/<name>/SKILL.md + .claude/skills/<name>/workflow-graph.yaml
Sub agents: .claude/agents/<name>.md (single file with YAML frontmatter)
Status & Diff
Inspect the sync state of your local workspace before committing a pull or push.
ch statusShow local vs remote sync state for all tracked extensions. Similar to git status -- displays which extensions are ahead, behind, in conflict, or up to date. Each row shows the extension type in brackets.
Example
ch statusOutput
ch diff <name>Show a line-level diff of local file contents vs the remote version for one extension. When a skill or workflow and a sub-agent share the same name, the skill/workflow folder under .claude/skills/ resolves first.
Example
ch diff code-review
ch diff triage-botOutput
Configuration
The CLI uses two config files: a global file for credentials and a project-scoped file for workspace and sync settings.
Global config
Located at ~/.claudehub/config.json on all platforms. Stores credentials only.
{
"apiKey": "sk-ch-...",
"user": {
"id": "...",
"email": "you@company.com",
"name": "Your Name"
}
}Project config
Located at .claudehub/config.json in your project root. Created by ch init. Commit this file to git.
{
"workspace": {
"id": "6839a1f2c4e8b3d2a1f0e9c8",
"name": "my-workspace"
},
"categories": ["code-tools", "docs"],
"ignore": ["draft-*"]
}Lockfile
Located at .claudehub/lock.json in your project root. Tracks the last synced state of each extension. Commit this file to git (like package-lock.json). Keys are namespaced by type (skill:, workflow:, agent:) so the same name can be used across types without collision.
{
"skill:code-review": {
"id": "abc123",
"version": 3,
"type": "skill",
"hash": "sha256-..."
},
"workflow:customer-onboard": {
"id": "def456",
"version": 5,
"type": "workflow",
"hash": "sha256-..."
},
"agent:triage-bot": {
"id": "ghi789",
"version": 1,
"type": "agent",
"hash": "sha256-..."
}
}Migrating from a pre-agent lockfile
Older lockfiles used plain names (no type prefix) as keys. Those entries are ignored on read with a one-time warning. Run ch pull -f or ch push -f once to rebuild the lockfile in the new format.
Global flags
Available on every command.
| Flag | Description |
|---|---|
| -v, --version | Print the installed CLI version |
| -h, --help | Show help for a command or subcommand |
ch --version
ch --help
ch pull --help
ch push --helpFull command reference
All available commands at a glance.
ch loginAuthenticate with an API keych logout [-y]Clear stored credentialsch whoamiShow current authenticated userch init [--force]Initialize project: select workspace, categories, ignore patternsch workspace listList all workspaces (alias: ws list)ch workspace use [name]Set the active workspace for this projectch workspace currentShow the active workspacech pull [name] [-f]Download all (or one) skills, workflows, and sub-agents from workspacech push [name] [-f]Upload all (or one) skills, workflows, and sub-agents to workspacech statusShow local vs remote sync statech diff <name>Show line-level diff for one extension vs remote