Skip to main content

cogency-cc

Streaming coding CLI for cogency agents.

Stream events from the agent event loop. Persist conversations to SQLite. Execute code with project-scoped sandboxing. No bloat. No configuration hell. Just clean.

Architecture | Design | Protocol

Install

pip install cogency-cc

or from source:

git clone https://github.com/iteebz/cogency-cc
cd cogency-cc
poetry install
poetry run cc "What's in main.py?"

Usage

# Interactive (learns your style)
cc

# One-shot query
cc "What's in main.py?"

# Model selection (overrides config)
cc --model claude "Debug this"
cc --model gpt4 "Code review"
cc --model gemini "Generate tests"

Commands:

cc session list / resume <id> / delete <id> / export <id>
cc profile show / clear
cc context show / set "prompt"
cc config show / --set-key <provider> <key>

Configuration

API keys (precedence):

  1. Environment: ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY
  2. Project: .cogency/cc.json (shared, committed)
  3. Home: ~/.cogency/cc.json (personal)

Example .cogency/cc.json:

{
  "provider": "anthropic",
  "model": "claude-opus-4-1"
}

Model aliases:

claude  → anthropic/claude-opus-4-1
gpt4    → openai/gpt-4o
gemini  → gemini/gemini-2.0-flash-001

Output Format

$ What's in main.py?
~ I need to read it

read("main.py")
✓ Found 50 lines
The file has a Flask app...
───
Input: 120  Output: 80

Prefixes: $ cyan (query), ~ gray (think), green (success), red (error), ─── separator.

Features: markdown rendering, incremental streaming, token metrics, session resume.

Architecture

Stateless, event-driven:

  • cogency core sends events
  • Renderer dispatches → state machine → buffer → formatter → terminal
  • Same events + config = identical output (crash-safe)
  • Conversations persisted (SQLite at ~/.cogency/)
  • Security enforced by cogency core (file access, sandbox)

See docs/architecture.md for the full pipeline.

Development

just build          # Format, lint, test
poetry run pytest   # All tests
poetry run ruff check src tests

Status

Alpha (v0.1.0). Core stable. API may evolve with cogency.

License

Apache 2.0

See cogency for the agent framework. See docs/ for protocol, design principles, and security model.

Release files for cogency-cc 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cogency-cc 0.1.0
File Size Uploaded
cogency_cc-0.1.0.tar.gz 21.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cogency-cc 0.1.0
File Interpreter ABI Platform
cogency_cc-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.5 kB

Release files / cogency_cc-0.1.0.tar.gz

Download URL cogency_cc-0.1.0.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f6ea28981f8bd503e2b73311c87335665bf8893e80138492445da83d6761af47
BLAKE2b-256 checksum
How to use checksums
b73a6daeef641b626f0b1f27c7d431fecc87ba370b16c0ab38b538ed229c3b91
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.10 Darwin/24.5.0

Release files / cogency_cc-0.1.0-py3-none-any.whl

Download URL cogency_cc-0.1.0-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11afb3b40b2f6f91fca9c865767e40d20a0fbbd5b350bd1f7fde7ce6e6e762c6
BLAKE2b-256 checksum
How to use checksums
95e91d0072a94662be4f47d690f2531694b98ec4c76de0512e02f547b0c3bbbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.3 CPython/3.12.10 Darwin/24.5.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page