Command-line CLI
The CLI shares local asset management with the desktop app and supports scripts and batch work. Desktop installers do not automatically install the prompthub command.
Install the CLI
Section titled “Install the CLI”Download the CLI .tgz asset from the stable release, then install the downloaded file:
pnpm add -g ./prompthub-cli-0.6.2.tgzprompthub --versionprompthub --helpDevelopers can also install repository dependencies and build a package from the PromptHub source:
pnpm pack:clipnpm add -g ./apps/cli/prompthub-cli-*.tgzQuery and inspect
Section titled “Query and inspect”prompthub prompt list --output tableprompthub prompt search "review" --output jsonprompthub skill scanprompthub mcp listprompthub plugin listprompthub agent listUse each command group’s --help for arguments. Confirm the workspace before writing. Refresh the desktop workspace after CLI changes.
Command groups
Section titled “Command groups”| Group | Purpose |
|---|---|
prompt / folder |
Content, organization, tags, relations, output formats, and versions |
skill |
Complete packages, scanning, files, source updates, versions, and distribution |
mcp |
Configuration, sources, checks, environment import, and target application |
plugin |
Sources, complete packages, updates, versions, and distribution |
agent |
Agent configuration and identity; configuration reads redact secrets |
rules |
Scanning, reading, writing, versions, import, and export |
ai |
Providers, models, and feature routing |
workspace |
Complete workspace JSON bundles |
sync |
Remote status, push, and pull with a configured endpoint |
Export a workspace
Section titled “Export a workspace”A file path is required:
prompthub workspace export --file ./workspace-backup.jsonThe bundle contains Prompts, relations, output formats, Skills and files, MCP, Plugins, Rules, and media. It is not the desktop .phub.gz format.
Import into a confirmed empty workspace:
prompthub workspace import --file ./workspace-backup.jsonAn existing workspace requires explicit overwrite handling. Back it up first rather than adding a clearing flag just to bypass a warning.
Output and directory options
Section titled “Output and directory options”| Option | Meaning |
|---|---|
--output json / --output table |
Structured or human-readable output |
--summary / --full |
Bounded summary by default; full content when explicitly requested |
--quiet |
Suppress success output; errors still use stderr |
--data-dir <path> |
Select a userData directory |
--app-data-dir <path> |
Select the application data root |
Do not put secrets into scripts or resource packages. Skill package operations apply built-in exclusions and root .prompthubignore rules; review contents before importing.