Streaming coding CLI for cogency agents.
Project description
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):
- Environment:
ANTHROPIC_API_KEY,OPENAI_API_KEY,GEMINI_API_KEY - Project:
.cogency/cc.json(shared, committed) - 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cogency_cc-0.1.0.tar.gz.
File metadata
- Download URL: cogency_cc-0.1.0.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6ea28981f8bd503e2b73311c87335665bf8893e80138492445da83d6761af47
|
|
| MD5 |
f2858ac4a5934b110a9bdd4a93e1d61b
|
|
| BLAKE2b-256 |
b73a6daeef641b626f0b1f27c7d431fecc87ba370b16c0ab38b538ed229c3b91
|
File details
Details for the file cogency_cc-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cogency_cc-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.10 Darwin/24.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11afb3b40b2f6f91fca9c865767e40d20a0fbbd5b350bd1f7fde7ce6e6e762c6
|
|
| MD5 |
739c90a1e3a485de37c22187bcd19090
|
|
| BLAKE2b-256 |
95e91d0072a94662be4f47d690f2531694b98ec4c76de0512e02f547b0c3bbbb
|