kirogo

module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT

README ΒΆ

kirogo

Use your Kiro subscription from any AI coding tool

A self-hosted proxy that exposes Kiro (Amazon Q Developer / AWS CodeWhisperer) models
through OpenAI- and Anthropic-compatible APIs β€” so Cursor, Claude Code,
Cline, Continue, Zed and Aider all just work. One static Go binary, zero dependencies.

Release CI Go Dependencies Tests

Quick start Β· Models Β· Clients Β· Reasoning Β· Config Β· Internals


   Cursor ─┐                                        β”Œβ”€ Claude Opus 5
Claude Codeβ”œβ”€β”                                    β”Œβ”€β”€  GPT 5.6
    Cline β”€β”˜ β”‚   OpenAI / Anthropic JSON           β”‚ β”‚  Qwen3 Coder
             β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί  kirogo :8000  ─────────── β”‚  GLM 5
      Zed ─┐ β”‚                          vnd.amazon β”‚ β”‚  DeepSeek
    Aider β”€β”΄β”€β”˜                        .eventstream └──  MiniMax
                                                     └─ + whatever your plan adds

Your Kiro subscription already includes Claude, GPT, Qwen, GLM, DeepSeek and MiniMax models β€” but only inside Kiro's own editor. kirogo puts that same catalog behind the two API shapes every other tool already speaks, reading the credentials Kiro IDE or kiro-cli already wrote on your machine. Nothing leaves your machine except the calls you were already making.

✨ Features

πŸ”Œ Two APIs OpenAI /v1/chat/completions and Anthropic /v1/messages, streaming and not
πŸ“¦ Zero dependencies Go standard library only. go.mod has no require block
⚑ One static binary 7.5 MB, no runtime, no interpreter, no Docker
πŸ› οΈ Full tool calling Round trips, parallel calls, streaming argument deltas, both APIs
🧠 Native reasoning Real thinking blocks with signature replay, not simulated
πŸ‘οΈ Vision Image input on both APIs
🎚️ Effort in the model name claude-opus-5:max β€” the only way most clients can pick effort
πŸ”„ Live catalog Models come from your account, so a new model works the day you get it
βœ‚οΈ max_tokens enforced The backend has no such parameter, so kirogo applies the ceiling itself
πŸ” Zero-config auth Finds your Kiro login automatically. Reads kiro-cli's SQLite read-only

πŸ€– Models

Whatever your plan includes β€” nothing is hardcoded. A typical account today:

Model Context Rate Reasoning effort
claude-opus-5 1M 2.2x low β†’ max, default high
claude-opus-4.8 1M 2.2x low β†’ max, default high
claude-opus-4.7 1M 2.2x low β†’ max, default xhigh
claude-opus-4.6 1M 2.2x low β†’ max, default high
claude-opus-4.5 200K 2.2x β€”
claude-sonnet-5 1M 1.3x low β†’ max, default high
claude-sonnet-4.6 1M 1.3x low β†’ max, default high
claude-sonnet-4.5 200K 1.3x β€”
claude-sonnet-4 200K 1.3x β€”
claude-haiku-4.5 200K 0.4x β€”
gpt-5.6-sol 272K 2.4x none β†’ max, default high
gpt-5.6-terra 272K 1.2x none β†’ max, default high
gpt-5.6-luna 272K 0.6x none β†’ max, default high
qwen3-coder-next 256K 0.05x β€”
glm-5 200K 0.5x β€”
deepseek-3.2 164K 0.25x β€”
minimax-m2.5 196K 0.25x β€”
minimax-m2.1 196K 0.15x β€”
auto 1M 1x β€”

[!TIP] Run ./kirogo -dump-models for your own live list. auto is advertised as auto-kiro, because Cursor ships its own model called auto and the names collide.

πŸš€ Quick start

1 Β· Install Kiro, sign in once, close it. That writes a token kirogo finds on its own.

2 Β· Install it, with Go 1.24 or newer:

go install github.com/jasminnanda/kirogo/cmd/kirogo@latest
No Go toolchain, or prefer building from source?

Grab a prebuilt binary from Releases β€” Linux, macOS and Windows on both amd64 and arm64, static, nothing to install.

Or build it yourself:

git clone https://github.com/jasminnanda/kirogo.git && cd kirogo
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o kirogo ./cmd/kirogo

Cross-compiling is the usual one-liner, and CI builds all five targets on every push:

GOOS=darwin GOARCH=arm64 go build -o kirogo-macos-arm64 ./cmd/kirogo
GOOS=windows GOARCH=amd64 go build -o kirogo.exe ./cmd/kirogo

3 Β· Run it:

PROXY_API_KEY=pick-a-long-random-string kirogo
INFO credentials loaded source="auto-discovered credentials file" flow=kiro-desktop
INFO model catalog loaded models=19 default_model=auto
INFO kirogo listening addr=127.0.0.1:8000 models=19

4 Β· Point your editor at http://127.0.0.1:8000 and you're done.

[!IMPORTANT] kirogo binds to localhost because it holds a live AWS token behind one shared key. SERVER_HOST=0.0.0.0 exposes that to your whole network. Use a long random PROXY_API_KEY β€” anyone who reaches the port can spend your quota.

πŸ”Œ Connect your editor

Cursor

Settings β†’ Models β†’ add an OpenAI-compatible provider.

  • Base URL Β· http://127.0.0.1:8000/v1
  • API key Β· your PROXY_API_KEY

Add model names by hand with the :level suffix, e.g. claude-opus-5:max. Use auto-kiro rather than auto.

Claude Code
export ANTHROPIC_BASE_URL=http://127.0.0.1:8000
export ANTHROPIC_AUTH_TOKEN=your-proxy-api-key
export ANTHROPIC_MODEL=claude-opus-5
claude

Uses the Anthropic surface end to end: count_tokens, thinking blocks with signature replay, and input_json_delta tool streaming.

Cline / Roo Code

Choose the OpenAI Compatible provider.

  • Base URL Β· http://127.0.0.1:8000/v1
  • API key Β· your PROXY_API_KEY
  • Model Β· claude-opus-5:xhigh
Continue
models:
  - name: Kiro Opus 5
    provider: openai
    model: claude-opus-5:xhigh
    apiBase: http://127.0.0.1:8000/v1
    apiKey: your-proxy-api-key
Zed
{
  "language_models": {
    "openai": {
      "api_url": "http://127.0.0.1:8000/v1",
      "available_models": [{ "name": "claude-opus-5:max", "max_tokens": 1000000 }]
    }
  }
}
Aider
export OPENAI_API_BASE=http://127.0.0.1:8000/v1
export OPENAI_API_KEY=your-proxy-api-key
aider --model openai/claude-opus-5:xhigh
curl
curl http://127.0.0.1:8000/v1/chat/completions \
  -H "Authorization: Bearer $PROXY_API_KEY" -H 'Content-Type: application/json' \
  -d '{"model":"claude-opus-5:max","messages":[{"role":"user","content":"hi"}]}'

🧠 Reasoning effort

Kiro uses named effort levels, not token budgets. Three ways to pick one, highest priority first:

claude-opus-5:max          # in the model name β€” works with any client
reasoning_effort: "max"    # OpenAI requests
thinking.budget_tokens     # Anthropic requests, bucketed to a level
KIRO_EFFORT_LEVEL=max      # default for everything

/v1/models advertises one model:level id per supported level, so they show up in your editor's model picker. A level a model doesn't offer is clamped to that model's default rather than rejected.

The gpt-5.6-* models also offer none, which turns reasoning off β€” use gpt-5.6-sol:none or reasoning_effort: "none". On a model that has no none, a request for no reasoning gets the lowest level it does offer, because omitting the field entirely would hand the choice back to the backend, whose default is high.

πŸ“‘ Endpoints

Path
GET / Β· /health Liveness and status. Unauthenticated.
GET /v1/models Models with metadata and effort variants.
POST /v1/chat/completions OpenAI chat.
POST /v1/messages Anthropic messages.
POST /v1/messages/count_tokens Local estimate, no upstream call.

OpenAI routes read Authorization: Bearer, Anthropic routes read x-api-key. CORS is open, so browser tools work.

πŸ”§ Configuration

Flags β†’ environment variables β†’ .env β†’ defaults. The ones you'll actually touch:

Variable Default
PROXY_API_KEY kirogo Client key. Warns if left at the default.
SERVER_HOST Β· SERVER_PORT 127.0.0.1 Β· 8000 Listen address.
KIRO_CREDS_FILE auto Credentials JSON. ~ is expanded.
KIRO_EFFORT_LEVEL β€” Default reasoning effort.
KIRO_EXPOSE_EFFORT_VARIANTS true Advertise model:level ids.
LOG_LEVEL INFO DEBUG logs the exact upstream payload.

Flags: -host -port -dump-models -version. All 22 settings live in .env.example; credential sources and tuning are in docs/INTERNALS.md.

πŸ§ͺ Development

go build ./...       # compile
go test -race ./...  # 520 test functions, 1082 cases
go vet ./... && gofmt -l .

Tests make no network calls β€” the backend, credential store and clock are all substituted, so the suite runs offline and deterministically. Roughly 10k lines of source against 15k lines of tests, across 9 packages.

[!NOTE] docs/INTERNALS.md covers the architecture and the undocumented API behaviour kirogo works around β€” a systemPrompt field the backend declares but ignores, a catalog on a different host than the docs imply, effort keys that differ per model. Worth reading before changing anything on the wire.

Contributions welcome β€” see CONTRIBUTING.md. Short version: tests aren't optional, changes land on both APIs and both streaming modes, identifiers are English.

πŸ”’ Security

kirogo handles live AWS credentials. Please don't open a public issue for a security problem β€” see SECURITY.md.

πŸ“„ License

MIT Β© 2026 Jasmin

An independent, from-scratch implementation. The protocol was worked out by reverse-engineering the Kiro IDE bundle and verifying behaviour against the live service.

Not affiliated with or endorsed by Amazon Web Services. "Kiro", "Amazon Q" and "CodeWhisperer" are trademarks of Amazon.com, Inc. or its affiliates. Use of kirogo must comply with your Kiro or AWS terms of service.

Directories ΒΆ

Path Synopsis
cmd
kirogo command
Command kirogo runs a single-user proxy that exposes Kiro (Amazon Q Developer / CodeWhisperer) models through OpenAI- and Anthropic-compatible HTTP APIs.
Command kirogo runs a single-user proxy that exposes Kiro (Amazon Q Developer / CodeWhisperer) models through OpenAI- and Anthropic-compatible HTTP APIs.
internal
api
Package api exposes the OpenAI- and Anthropic-compatible HTTP surfaces.
Package api exposes the OpenAI- and Anthropic-compatible HTTP surfaces.
auth
Package auth loads Kiro credentials, keeps the access token fresh and resolves the regions and endpoints derived from those credentials.
Package auth loads Kiro credentials, keeps the access token fresh and resolves the regions and endpoints derived from those credentials.
catalog
Package catalog discovers the live Kiro model catalog, resolves the model names clients send into real model ids, and works out the reasoning effort to request.
Package catalog discovers the live Kiro model catalog, resolves the model names clients send into real model ids, and works out the reasoning effort to request.
config
Package config loads and validates kirogo configuration from CLI flags, process environment variables and an optional .env file.
Package config loads and validates kirogo configuration from CLI flags, process environment variables and an optional .env file.
kiro
Package kiro speaks the Kiro (Amazon Q Developer / CodeWhisperer) wire protocol: request construction, the vnd.amazon.eventstream response framing and the modelled error shapes.
Package kiro speaks the Kiro (Amazon Q Developer / CodeWhisperer) wire protocol: request construction, the vnd.amazon.eventstream response framing and the modelled error shapes.
store
Package store contains a minimal, read-only SQLite reader, used to read credentials out of a kiro-cli database without taking on a dependency.
Package store contains a minimal, read-only SQLite reader, used to read credentials out of a kiro-cli database without taking on a dependency.
translate
Package translate converts OpenAI and Anthropic requests into the Kiro wire format, applying the structural rules the Kiro backend enforces.
Package translate converts OpenAI and Anthropic requests into the Kiro wire format, applying the structural rules the Kiro backend enforces.
util
Package util holds small helpers shared across kirogo: identifier generation, secret redaction and token estimation.
Package util holds small helpers shared across kirogo: identifier generation, secret redaction and token estimation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL