Skip to main content

Local coding agent CLI.

Project description

caigode

caigode is a local coding-agent CLI with:

  • stateful chat sessions
  • file and command tools (list_dir, read_file, write_file, run_command)
  • local state/review artifacts under .caigode/
  • CI + tag-based GitHub Release + PyPI publish workflow

Requirements

  • Python >=3.11
  • uv (recommended) or pip

Install

Option A: uv sync

uv sync --dev

Option B: editable install

uv pip install -e .

Then run with either:

uv run caigode --help

or after activating virtualenv:

caigode --help

Configuration

Required environment variables:

  • OPENAI_MODEL
  • OPENAI_BASE_URL
  • OPENAI_API_KEY

Optional:

  • OPENAI_TIMEOUT_SECONDS (default 120)
  • CAIGODE_WORKSPACE (default current directory)
  • CAIGODE_STATE_DIR (default .caigode)

Example:

export OPENAI_MODEL="gpt-5.4"
export OPENAI_BASE_URL="https://api.openai.com/v1"
export OPENAI_API_KEY="sk-..."
export OPENAI_TIMEOUT_SECONDS="120"

You can also pass these by CLI arguments:

  • --model
  • --base-url
  • --api-key
  • --timeout-seconds

Usage

Chat (stateful)

caigode chat

Chat keeps appending messages in-memory for the current process. Each turn is persisted to .caigode/sessions/<session_id>.jsonl.

Run one-shot task

caigode run "update README based on current project"

Status

caigode status

Review artifact

caigode review

Tooling Behavior

Available tools:

  • list_dir(path=".", recursive=false, max_entries=200)
  • read_file(path, offset?, limit?, start_line?, end_line?)
  • write_file(path, content)
  • run_command(command)

Notes:

  • read_file supports both byte-like slicing (offset/limit) and line-window slicing (start_line/end_line).
  • tool outputs are trimmed before returning to the model to reduce context growth.

Persistence Model

Session files are append-only JSONL:

  • .caigode/sessions/<session_id>.jsonl

Each line stores the latest session snapshot (result/error/messages/etc). status and review read the latest entry per session.

Tests

uv run pytest -q

CI / Release / PyPI

This repo includes:

  • .github/workflows/ci.yml
    • runs tests on push/PR (Python 3.11/3.12)
  • .github/workflows/release.yml
    • triggers on v* tags
    • builds sdist + wheel
    • publishes GitHub Release
    • publishes to PyPI via Trusted Publisher (id-token: write)

One-time PyPI setup

  1. Create the project on PyPI (name: caigode if available).
  2. In PyPI, configure Trusted Publisher for this GitHub repo and workflow.
  3. Push a version tag:
git tag v0.1.0
git push origin v0.1.0

That tag will trigger both GitHub Release and PyPI publish.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caigode-0.1.1.tar.gz (46.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caigode-0.1.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file caigode-0.1.1.tar.gz.

File metadata

  • Download URL: caigode-0.1.1.tar.gz
  • Upload date:
  • Size: 46.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caigode-0.1.1.tar.gz
Algorithm Hash digest
SHA256 03bf9a0994336a120369907c094c9407e94cedd38d0a09e9051cab1d68d5f1e4
MD5 4ab97cdd258a3d24679c8c1d93200f46
BLAKE2b-256 4bf9cb50a59f2c9ea7c6445c286e5d0d62f6dec29307f438af7e9628fe900e4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for caigode-0.1.1.tar.gz:

Publisher: release.yml on xvlincaigou/caigode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caigode-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: caigode-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for caigode-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f12e68b66ca62e49043293f3230406a48a50885cc8fb71c0f34210f793778ca6
MD5 c5cbd5302b56a051d4908e9da8b26cbf
BLAKE2b-256 56b8d618a9aad0715408edc45831874b35b1c2113c630ab6b023e3d9bf69edeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for caigode-0.1.1-py3-none-any.whl:

Publisher: release.yml on xvlincaigou/caigode

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page