Skip to content

Add subscription-backed Codex and Claude CLI providers - #7

Open
tonibergholm wants to merge 1 commit into
boldsoftware:mainfrom
tonibergholm:main
Open

Add subscription-backed Codex and Claude CLI providers#7
tonibergholm wants to merge 1 commit into
boldsoftware:mainfrom
tonibergholm:main

Conversation

@tonibergholm

Copy link
Copy Markdown

Summary

Add optional Codex and Claude Code CLI providers so meat can use an existing ChatGPT/Codex or Claude subscription login without requiring separate API credentials.

meat -provider codex
meat -provider claude

The existing OpenAI and Anthropic API-key providers remain unchanged and continue to be selected by the default auto provider.

Implementation

  • Add -provider and MEAT_PROVIDER.
  • Support auto, openai, anthropic, codex, and claude.
  • Invoke the official Codex and Claude Code CLIs in non-interactive structured-output mode.
  • Translate CLI responses into meat’s existing provider-neutral text and tool_use blocks.
  • Keep edit-plan validation and tool execution inside meat.
  • Separate cache entries by provider and model.
  • Support optional MEAT_CODEX_CLI and MEAT_CLAUDE_CLI command overrides.
  • Document installation, authentication, and usage.

Authentication and isolation

The adapters do not extract or reuse OAuth tokens. Authentication remains entirely owned by the official provider CLIs.

Subscription-backed turns are ephemeral:

  • Claude Code runs with built-in tools and customizations disabled.
  • Codex runs read-only in an empty temporary workspace.
  • Codex user configuration, rules, and inherited shell environment are disabled.
  • Repository reads still go through meat’s existing confined tool protocol.

Trade-offs

CLI-backed calls have more startup and agent-context overhead than direct API requests and count against the user’s applicable Codex or Claude subscription limits. They are opt-in and do not affect existing behavior.

Validation

  • go test ./...
  • go vet ./...
  • git diff --check
  • Live authenticated smoke test using meat -provider codex.
  • Live authenticated smoke test using meat -provider claude.

Co-authored-by: Toni Bergholm <toni.bergholm@codento.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant