LLM · Adapter
llm-cli
via Local CLI (claude / codex / gemini)
Shells out to a local CLI binary. Operator-flavored — no API key.
@openagentry/adapter-llm-cli npm → — · Install
Use it
# Install
$ npm install @openagentry/adapter-llm-cli
# Or in a workspace registered with the CLI
$ npx agentry init @openagentry/adapter-llm-cli — · Default export
Pattern: eager
The default export is always a fully-instantiated adapter — env reads happen at
module load and have safe fallbacks. import x from '@openagentry/adapter-llm-cli'
gives you a working adapter immediately.
import default_ from '@openagentry/adapter-llm-cli';
// → llmAdapter — category: 'llm', id: 'llm-cli' — · Environment
Configuration
| Variable | Notes |
|---|---|
| OA_LLM_CLI | Required. |
| OA_LLM_CLI_BIN | Optional. |
No API key needed — uses whatever CLI is on PATH.
— · Reported capabilities
What the manifest says
agentry capabilities --json reports these flags from
the package's openagentry.capabilities manifest block.
- supportedClis
- claude,codex,gemini
- streaming
- true
- operatorOnly
- true
— · Failure modes
Error codes
6 stable codes this adapter throws. Each has a one-line resolution.
-
E_LLM_CLI_AUTHThe CLI binary refused authentication or has no credentials configured. -
E_LLM_CLI_NOT_FOUNDThe configured CLI binary was not on PATH. -
E_LLM_CLI_NONZEROThe CLI exited with non-zero status. -
E_LLM_CLI_PARSECould not parse the CLI's output as text/JSON. -
E_LLM_CLI_TIMEOUTThe CLI subprocess exceeded its timeout. -
E_LLM_CLI_SCHEMAInput failed Zod validation.