Pseudo CLI Command Format
Pseudo CLI commands use a registry format rather than shell parsing.
Base Syntax
codebolt <module> <action> [--param value ...] [--flag] [--no-flag]
The parser splits the command into:
module: the top-level registry entry such asfs,git,terminal, ormcpaction: the command within that module such asread,status,exec, orexecuteparams: named flags converted into a key-value object
Supported Parameter Forms
| Form | Example | Parsed value |
|---|---|---|
| String flag | --path "./src/index.ts" | path: "./src/index.ts" |
| Boolean true | --recursive | recursive: true |
| Boolean false | --no-recursive | recursive: false |
| Number | --max 5 | max: 5 |
| JSON object | --data {"status":"done"} | data: { status: "done" } |
| JSON array | --paths ["a.ts","b.ts"] | paths: ["a.ts", "b.ts"] |
Parsing Rules
- Single and double quoted strings are supported.
- Backslash escaping inside quoted strings is supported.
- JSON blobs starting with
{or[are tokenized as a single value and thenJSON.parse()is attempted. - Literal
trueandfalseare converted to booleans. - Numeric tokens matching
-?\d+(\.\d+)?are converted to numbers. - Positional arguments after
<action>are ignored. Use named flags instead.
Examples
Filesystem
codebolt fs read --path "./package.json"
codebolt fs list --path "./src" --recursive
codebolt fs read-many --paths ["package.json","tsconfig.json"]
Git
codebolt git status
codebolt git commit --message "docs: add pseudo cli reference"
codebolt git clone --url "https://github.com/example/repo.git" --path "./repo"
Terminal
codebolt terminal exec --command "npm run build"
Pseudo CLI itself does not interpret shell syntax like pipes or redirects. If you need actual shell behavior, pass the full shell command as the --command value to terminal exec.
Browser
codebolt browser navigate --url "https://example.com"
codebolt browser click --element "Login"
codebolt browser scroll --direction "down" --pixels 800
Task And Thread Operations
codebolt task create --title "Write docs" --description "Document pseudo cli"
codebolt thread create-start --task "Review the generated docs" --agent "agent-id"
codebolt task update --id "task-123" --data {"status":"completed"}
Help Behavior
The pseudo CLI source includes help generation for these patterns:
codebolt help
codebolt help <module>
codebolt <module>
Intended behavior:
codebolt helplists all registered modulescodebolt help fsshows commands available for thefsmodulecodebolt fsshows module help when no action is provided
Validation And Errors
Before execution, the registry checks required flags from each command definition.
Common failure cases:
- Unknown module: the module is not in
commandRegistry - Unknown action: the module exists but the action does not
- Missing required parameter: a required
--flagis absent - Execution failure: the underlying SDK module throws or returns an error-shaped response
Formatter behavior:
- Successful results are returned as
llmContentplus a shortenedreturnDisplay - Missing params and unknown commands are marked as
INVALID_TOOL_PARAMS - Execution failures are marked as
EXECUTION_FAILED
Interception Note
The terminal tool only bypasses real shell execution when isCodeboltCommand() matches the command string. In the current source, that matcher checks for codeboltcmd , while the parser and help text use codebolt .... Keep that distinction in mind when testing end-to-end interception.