@beautiful-ccg/adapter-claude
v0.3.0
Published
bccg adapter for [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code).
Readme
@beautiful-ccg/adapter-claude
bccg adapter for Claude Code CLI.
Usage
import { ClaudeAdapter } from "@beautiful-ccg/adapter-claude";
const adapter = new ClaudeAdapter();
// Check availability
const status = await adapter.checkAvailability();
// Run a prompt
const result = await adapter.run("explain this error", {
timeout: 60_000,
cwd: "/path/to/project",
});
console.log(result.output);Properties
| Property | Value |
|---|---|
| name | "claude" |
| costTier | "high" |
| multiModel | false |
CLI Command
claude -p <prompt> --output-format jsonOutput is JSONL. The parser extracts content from assistant.message events, model from system events, and exit code from result events.
Exports
ClaudeAdapter—ModelAdapterimplementationparseClaudeOutput(stdout: string): ClaudeParsed— standalone parserClaudeParsed—{ content: string; model: string; exitCode: number }
Recursion Safety
When running inside a Claude Code session (detected via CLAUDECODE env var), the adapter reports authenticated: false to prevent the host from invoking itself through bccg.
