Skip to content

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.

Download the CLI .tgz asset from the stable release, then install the downloaded file:

Terminal window
pnpm add -g ./prompthub-cli-0.6.2.tgz
prompthub --version
prompthub --help

Developers can also install repository dependencies and build a package from the PromptHub source:

Terminal window
pnpm pack:cli
pnpm add -g ./apps/cli/prompthub-cli-*.tgz
Terminal window
prompthub prompt list --output table
prompthub prompt search "review" --output json
prompthub skill scan
prompthub mcp list
prompthub plugin list
prompthub agent list

Use each command group’s --help for arguments. Confirm the workspace before writing. Refresh the desktop workspace after CLI changes.

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

A file path is required:

Terminal window
prompthub workspace export --file ./workspace-backup.json

The 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:

Terminal window
prompthub workspace import --file ./workspace-backup.json

An existing workspace requires explicit overwrite handling. Back it up first rather than adding a clearing flag just to bypass a warning.

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.