4.4 KiB
Prose CLI
Official shell entrypoint for OpenProse commands. The CLI turns invocations like
prose run inspector.md into canonical OpenProse agent-session prompts, then
streams the selected harness output back to the terminal.
The CLI does not replace the OpenProse VM or execute programs by itself. The selected harness still runs the prompt, loads the OpenProse skill/specs, spawns agents when available, and writes run state.
Requirements
- Node.js 18 or newer
- Credentials for the selected provider
- Codex SDK/OpenAI credentials for the default
codex-sdkharness npx, used by the CLI to install theopen-proseskill when needed
Install
From npm:
npm install --global @openprose/prose-cli
prose --help
From the GitHub release tarball:
curl -fsSL https://raw.githubusercontent.com/openprose/prose/main/cli/install.sh | sh
From a repository checkout:
cd cli
npm ci
npm run build
npm link
prose --help
For project-local use:
npm install --save-dev ../path/to/prose/cli
npx prose run inspector.md
The installer supports PROSE_VERSION, PROSE_BASE_URL, PROSE_INSTALL_DIR,
PROSE_BIN_DIR, PROSE_SHA256, and PROSE_SHA256_URL overrides for pinned or
private releases. By default it downloads and verifies the .sha256 file next
to the release tarball.
Maintainers can find the release process in RELEASE.md.
Harnesses
codex-sdkuses@openai/codex-sdk, forwards the current working directory and environment, and streams Codex SDK events. This is the default.claude-sdkuses@anthropic-ai/claude-agent-sdk, forwards the current working directory and environment, and streams text deltas.codexrunscodex exec <prompt>and streams the Codex CLI process output.clauderunsclaude -p <prompt>and streams the Claude CLI process output.mockechoes prompts for tests and local smoke checks.
Select a harness with --harness <name> or PROSE_HARNESS.
For externally sandboxed CI environments, Codex harnesses also honor
PROSE_CODEX_SANDBOX_MODE (read-only, workspace-write, or
danger-full-access) and PROSE_CODEX_APPROVAL_POLICY (never, on-request,
on-failure, or untrusted) and forward those values to Codex.
Skill Setup
OpenProse execution depends on the open-prose agent skill. Before running a
real harness, the CLI checks whether that skill is installed for the selected
provider and installs the missing global skill target with:
npx --yes skills@1.5.3 add openprose/prose --skill open-prose --global --yes --copy --full-depth --agent <agent>
Automatic setup only installs the provider you selected for that run, prints a
short status line on success, and only shows the full skills installer output
if setup fails. Use prose doctor to inspect local skill availability without
running a program:
prose doctor
prose doctor --harness claude-sdk --install
Behavior
- stdout and stderr are streamed rather than buffered.
- child-process harnesses preserve child exit codes.
- SDK harnesses return
0on successful final results,1on SDK turn errors, and143when aborted by the CLI. SIGINTandSIGTERMare propagated through the active harness.- Arguments after
--are forwarded literally, including--harness.
The tarball installer is intentionally a Node.js installer: the CLI package is JavaScript, so the installed shim executes Node.js 18 or newer. The script verifies release checksums by default, rejects unsafe tar paths, symlinks, hardlinks, and special files, and writes the final shim atomically.
Usage
Forwarding commands mirror the agent-session command language described in the
root docs. prose help is local CLI help; use prose --help or
prose help <command> to inspect shell usage.
prose run programs/reviewer.md
prose run programs/reviewer.md --harness claude-sdk
prose doctor
prose lint programs/reviewer.md
prose status --graph
Development
npm run buildcompilessrc/index.tsintodist/index.js.npm run typecheckchecks TypeScript without emitting files.npm testruns the Vitest suite once.npm run devrunssrc/index.tsthroughtsxfor local development.npm run cleanremovesdist/.npm run release:tarballcreates the self-contained archive used byinstall.sh, plus a matching.sha256file.npm packrunsprepack, so the package contains freshdist/output for the packedprosebin.