a789495a98
CI / Quality Guardrails (push) Waiting to run
CI / Build & Test (macos-latest) (push) Waiting to run
CI / Build & Test (ubuntu-latest) (push) Waiting to run
CI / Build & Test (windows-latest) (push) Waiting to run
CI / Format (push) Waiting to run
CI / PowerShell Syntax (push) Waiting to run
CI / Windows Cross-Target Check (Linux) (push) Waiting to run
FreeBSD Smoke / FreeBSD Smoke (x86_64) (push) Has been cancelled
2.6 KiB
2.6 KiB
jcode wrapper / scripting guide
This document describes the non-interactive CLI surface intended for wrappers, scripts, and other tools that invoke jcode.
Recommended flags
Use these flags by default in wrappers:
jcode --quiet --no-update --no-selfdev ...
--quietsuppresses non-error CLI/status chatter--no-updateavoids update-check noise/work--no-selfdevavoids repository auto-detection changing runtime behavior
Discover available models
List model names that can be passed to -m/--model:
jcode --quiet model list
jcode --quiet model list --json
jcode --quiet --provider openai model list --json
Discover providers and current selection
List provider IDs you can pass to -p/--provider:
jcode --quiet provider list
jcode --quiet provider list --json
Inspect the currently requested and resolved provider/model selection:
jcode --quiet provider current
jcode --quiet --provider openai --model gpt-5.4 provider current --json
Verbose human summary:
jcode --quiet model list --verbose
Run one prompt and return JSON
jcode --quiet run --json "Reply with exactly OK"
Stream one prompt as NDJSON
jcode --quiet run --ndjson "Reply with exactly OK"
Typical event types:
startconnection_phaseconnection_typetext_deltatext_replacetool_starttool_inputtool_exectool_donetokensdoneerror
The final done event includes the assembled text and usage summary.
Example shape:
{
"session_id": "session_...",
"provider": "OpenAI",
"model": "gpt-5.4",
"text": "OK",
"usage": {
"input_tokens": 123,
"output_tokens": 7,
"cache_read_input_tokens": 0,
"cache_creation_input_tokens": null
}
}
Inspect authentication state
jcode --quiet auth status
jcode --quiet auth status --json
JSON output includes:
any_availableproviders[]iddisplay_namestatusmethodauth_kindrecommended
Inspect build/version details
jcode --quiet version
jcode --quiet version --json
JSON output includes:
versiongit_hashgit_tagbuild_timegit_daterelease_build
Notes
- JSON commands are designed so the intended machine-readable result is printed to
stdout - With
--quiet, wrapper-oriented commands should keepstderrempty unless there is a real warning/error jcode model listandjcode run --jsondo not require the TUIjcode model listdoes not require an already-running shared server