@pc-core/cli
v0.1.15
Published
The pc CLI — ship releases, triage feedback, open incidents, and run the conversion and ranking commands from the terminal.
Maintainers
Readme
@pc-core/cli
The pc CLI — ship releases, triage feedback, open incidents, and run the
conversion and ranking commands from the terminal.
Built on @pc-core/sdk, so the
CLI, the SDK, and MCP are three doors into the same API.
Install
npm install -g @pc-core/cli
# or run it without installing
npx @pc-core/cli --helpUsage
pc login # approve in the browser, token stored locally
pc init --slug my-product # bind this repo to a product (.pc.toml)
pc ship # reads git, writes the release, publishes itpc ship reads the commits since the last tag, builds a changelog, runs the
test gate if one is configured, then publishes. Re-running is a no-op when
nothing changed — the release is updated in place, never duplicated, and the
exact commit is recorded on the release.
Commands
| Command | What it does |
| --- | --- |
| pc login | Device-flow sign-in. Opens the browser, polls until approved. |
| pc whoami | Shows the signed-in workspace and its products. |
| pc doctor | Checks config, token and API reachability. |
| pc completion --shell <s> | Prints a completion script for bash, zsh, fish or powershell. |
| pc tokens | Lists the live CLI sessions on this account. |
| pc logout | Revokes this session (or --prefix) and forgets the local token. |
| pc init | Binds the repo: writes .pc.toml, a GitHub Action, and skill files for Claude Code, Cursor and Codex. |
| pc ship | Reads git, builds the changelog, runs the test gate, publishes. |
| pc diff | Shows what the public page says now, plus any drafts. |
| pc releases | Lists releases, newest first. |
| pc ab | Runs a page test. Records no traffic itself — the product page does. Names a leader only once both variants have 30 views and the gap clears 2 points; otherwise it says it is still collecting. |
| pc agent test | Asks the five saved questions of the listing's own fields. A question with no answer is a real gap in the page. --question/--position replaces one. |
| pc agent draft | Writes one personalized draft per recent lead. Never sends: there is no send path and no flag that reaches one. |
| pc directory | Per-workspace opt-ins and a submission ledger. prepared counts ledger rows; delivered is 0, because these directories have no anonymous submission API. |
| pc illustrate | Renders the ship card for a release and puts it on the page. renderer is svg and model is null. The first one waits for --publish. |
| pc checkout | The listing's checkout URL and whether its offer is still live. |
| pc featured | Buys the 7-day rail, or extends it under 48 hours, and prints the Whop URL. paid is always false — the rail goes live only when the verified webhook confirms the payment. |
| pc rollback | Restores the public page to an earlier release. Git is untouched. |
| pc feedback / pc inbox / pc reply / pc triage | Feedback and threads. |
| pc status / pc incident open\|update\|close | Incidents and the public status. |
| pc agent pull\|leads\|offer | The product agent. |
| pc waitlist / pc funnel / pc leads | Conversion. |
| pc badge / pc llms / pc schema / pc og / pc alt / pc widget | Machine-readable artifacts. |
| pc rpc <function> | Call any allowlisted pc_api_* function directly. |
Run pc --help for the full list.
What pc init writes
pc init --slug my-product binds the repo and lays down the rest:
| File | What it does |
| --- | --- |
| .pc.toml | The product this repo ships to, plus the test gate. Commit it. |
| .github/workflows/pc-incident.yml | Opens a ProductClient incident when the deploy workflow fails, closes it when the next one passes. |
| .github/workflows/pc-ship.yml | Ships on every push to main, behind the same test gate. |
| .claude/skills/pc/SKILL.md | Skill for Claude Code. |
| .cursor/rules/pc.mdc | Rule for Cursor. |
| AGENTS.md | Notes for Codex and any other coding agent. |
Existing files are never overwritten — pass --force to replace them, or
--no-scaffold to write only .pc.toml.
Output
Human-readable summaries by default. When the caller looks like CI or an agent
(PC_JSON=1, CI=true, or stdout is not a tty), every command prints raw JSON
instead, so a workflow can pipe it straight into jq.
Config
- Token in the platform config dir (
%APPDATA%\pcon Windows,~/.config/pcelsewhere).PC_CONFIG_DIRoverrides it;PC_TOKENandPC_APIoverride the stored values. .pc.tomlnames the product this repo ships to. Commit it.
The Rust CLI
The native pc binary is also available from crates.io:
cargo install pc-cliBoth talk to the same API. The Rust one is fastest to start; this one installs anywhere Node runs.
License
MIT
