sh
capa sh turns every configured tool into a CLI. MCP tools live under the server id; command tools appear at the top level (or under a custom group). Tool ids are slugified to kebab-case.
Requires a capabilities file in the current project. If the capa server is not running, capa sh starts it.
Synopsis
Section titled “Synopsis”capa sh [args...]capa sh [--raw] <group> <subcommand> [--arg value...]capa sh [--raw] <command> [--arg value...]capa sh --exec -- <program> [args...]| Flag | Description |
|---|---|
--raw | Return raw tool output (skip the formatter). Position-independent: works before or after the command tokens |
--exec | Run a program that is not a capa tool. Tokens after -- are spawned directly as argv (no shell), in the current directory |
capa sh does not take a dedicated --json for tool payloads. Global --json only affects machine-readable CLI status from capa itself.
Usage patterns
Section titled “Usage patterns”| Invocation | Effect |
|---|---|
capa sh | List available commands |
capa sh <group> | List subcommands for an MCP server group |
capa sh <group> <tool> [--args] | Run an MCP tool |
capa sh <command> [--args] | Run a top-level command tool |
capa sh <unknown> ... | Error: No such tool, exit code 1 |
capa sh --exec -- <program> [args] | Spawn the program directly; exits with its exit code |
capa sh --help / … --help | Contextual help at any level |
Examples
Section titled “Examples”capa shcapa sh gitlabcapa sh gitlab list-merge-requests --help
capa sh gitlab list-merge-requests --project-id 123 --state opened
# Raw tool output (any position)capa sh --raw gitlab list-merge-requests --project-id 123capa sh gitlab list-merge-requests --project-id 123 --raw
# Top-level command toolcapa sh find-skills --query "git automation"
# Run a non-capa program (argv spawn, no shell)capa sh --exec -- git log --oneline