chyrd 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chyrd-0.4.0/LICENSE +21 -0
- chyrd-0.4.0/PKG-INFO +352 -0
- chyrd-0.4.0/README.md +318 -0
- chyrd-0.4.0/chyrd/__init__.py +6 -0
- chyrd-0.4.0/chyrd/__main__.py +7 -0
- chyrd-0.4.0/chyrd/_buildflag.py +2 -0
- chyrd-0.4.0/chyrd/_hardening.py +111 -0
- chyrd-0.4.0/chyrd/agent/__init__.py +6 -0
- chyrd-0.4.0/chyrd/agent/compact.py +184 -0
- chyrd-0.4.0/chyrd/agent/engine.py +760 -0
- chyrd-0.4.0/chyrd/agent/events.py +89 -0
- chyrd-0.4.0/chyrd/agent/prompts.py +245 -0
- chyrd-0.4.0/chyrd/agent/subagents.py +351 -0
- chyrd-0.4.0/chyrd/checkpoints.py +185 -0
- chyrd-0.4.0/chyrd/cli.py +758 -0
- chyrd-0.4.0/chyrd/config.py +136 -0
- chyrd-0.4.0/chyrd/license.py +148 -0
- chyrd-0.4.0/chyrd/mcp.py +245 -0
- chyrd-0.4.0/chyrd/permissions.py +89 -0
- chyrd-0.4.0/chyrd/providers/__init__.py +296 -0
- chyrd-0.4.0/chyrd/providers/anthropic.py +317 -0
- chyrd-0.4.0/chyrd/providers/base.py +179 -0
- chyrd-0.4.0/chyrd/providers/catalog.py +1250 -0
- chyrd-0.4.0/chyrd/providers/claude_agent.py +376 -0
- chyrd-0.4.0/chyrd/providers/google.py +315 -0
- chyrd-0.4.0/chyrd/providers/openai_compat.py +855 -0
- chyrd-0.4.0/chyrd/py.typed +0 -0
- chyrd-0.4.0/chyrd/session/__init__.py +6 -0
- chyrd-0.4.0/chyrd/session/store.py +281 -0
- chyrd-0.4.0/chyrd/skills/__init__.py +19 -0
- chyrd-0.4.0/chyrd/skills/builtin/3d-model/SKILL.md +205 -0
- chyrd-0.4.0/chyrd/skills/builtin/ai-app/SKILL.md +172 -0
- chyrd-0.4.0/chyrd/skills/builtin/commit/SKILL.md +95 -0
- chyrd-0.4.0/chyrd/skills/builtin/data-viz/SKILL.md +120 -0
- chyrd-0.4.0/chyrd/skills/builtin/debug/SKILL.md +101 -0
- chyrd-0.4.0/chyrd/skills/builtin/deploy/SKILL.md +144 -0
- chyrd-0.4.0/chyrd/skills/builtin/docs/SKILL.md +122 -0
- chyrd-0.4.0/chyrd/skills/builtin/game-dev/SKILL.md +145 -0
- chyrd-0.4.0/chyrd/skills/builtin/image-gen/SKILL.md +109 -0
- chyrd-0.4.0/chyrd/skills/builtin/init/SKILL.md +81 -0
- chyrd-0.4.0/chyrd/skills/builtin/refactor/SKILL.md +93 -0
- chyrd-0.4.0/chyrd/skills/builtin/review/SKILL.md +85 -0
- chyrd-0.4.0/chyrd/skills/builtin/security/SKILL.md +108 -0
- chyrd-0.4.0/chyrd/skills/builtin/test/SKILL.md +127 -0
- chyrd-0.4.0/chyrd/skills/builtin/website/SKILL.md +114 -0
- chyrd-0.4.0/chyrd/skills/loader.py +209 -0
- chyrd-0.4.0/chyrd/tools/__init__.py +78 -0
- chyrd-0.4.0/chyrd/tools/base.py +79 -0
- chyrd-0.4.0/chyrd/tools/files.py +277 -0
- chyrd-0.4.0/chyrd/tools/fs.py +573 -0
- chyrd-0.4.0/chyrd/tools/search.py +294 -0
- chyrd-0.4.0/chyrd/tools/shell.py +188 -0
- chyrd-0.4.0/chyrd/tools/skill.py +89 -0
- chyrd-0.4.0/chyrd/tools/task.py +111 -0
- chyrd-0.4.0/chyrd/tools/todo.py +110 -0
- chyrd-0.4.0/chyrd/tools/web.py +383 -0
- chyrd-0.4.0/chyrd/tui/__init__.py +18 -0
- chyrd-0.4.0/chyrd/tui/app.py +1830 -0
- chyrd-0.4.0/chyrd/tui/chyrd.tcss +533 -0
- chyrd-0.4.0/chyrd/tui/mascot.py +302 -0
- chyrd-0.4.0/chyrd/tui/theme.py +202 -0
- chyrd-0.4.0/chyrd/tui/widgets/__init__.py +35 -0
- chyrd-0.4.0/chyrd/tui/widgets/chat.py +486 -0
- chyrd-0.4.0/chyrd/tui/widgets/composer.py +236 -0
- chyrd-0.4.0/chyrd/tui/widgets/header.py +95 -0
- chyrd-0.4.0/chyrd/tui/widgets/modelpicker.py +232 -0
- chyrd-0.4.0/chyrd/tui/widgets/palette_cmds.py +89 -0
- chyrd-0.4.0/chyrd/tui/widgets/permission.py +110 -0
- chyrd-0.4.0/chyrd/tui/widgets/splash.py +165 -0
- chyrd-0.4.0/chyrd/tui/widgets/statusbar.py +183 -0
- chyrd-0.4.0/chyrd.egg-info/PKG-INFO +352 -0
- chyrd-0.4.0/chyrd.egg-info/SOURCES.txt +87 -0
- chyrd-0.4.0/chyrd.egg-info/dependency_links.txt +1 -0
- chyrd-0.4.0/chyrd.egg-info/entry_points.txt +2 -0
- chyrd-0.4.0/chyrd.egg-info/requires.txt +13 -0
- chyrd-0.4.0/chyrd.egg-info/top_level.txt +1 -0
- chyrd-0.4.0/pyproject.toml +49 -0
- chyrd-0.4.0/setup.cfg +4 -0
- chyrd-0.4.0/tests/test_catalog.py +58 -0
- chyrd-0.4.0/tests/test_checkpoints.py +104 -0
- chyrd-0.4.0/tests/test_continuation_usage.py +137 -0
- chyrd-0.4.0/tests/test_e2e_fake.py +505 -0
- chyrd-0.4.0/tests/test_files_tools.py +80 -0
- chyrd-0.4.0/tests/test_google_sigs.py +69 -0
- chyrd-0.4.0/tests/test_interrupt.py +152 -0
- chyrd-0.4.0/tests/test_loop.py +75 -0
- chyrd-0.4.0/tests/test_mcp.py +57 -0
- chyrd-0.4.0/tests/test_smoke.py +165 -0
- chyrd-0.4.0/tests/test_tui_turn_flag.py +82 -0
chyrd-0.4.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mazen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
chyrd-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chyrd
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: CHYRD - the bird-fast AI coding agent that lives in your terminal. Every model, every provider, one beautiful TUI.
|
|
5
|
+
Author: Mazen
|
|
6
|
+
License: MIT
|
|
7
|
+
Keywords: ai,coding-agent,tui,terminal,llm,claude,openai,gemini,mcp,agent
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development
|
|
19
|
+
Classifier: Topic :: Terminals
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: textual>=1.0
|
|
24
|
+
Requires-Dist: httpx>=0.27
|
|
25
|
+
Requires-Dist: platformdirs>=4.0
|
|
26
|
+
Provides-Extra: claude
|
|
27
|
+
Requires-Dist: claude-agent-sdk>=0.1.0; extra == "claude"
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
30
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
|
|
31
|
+
Provides-Extra: build
|
|
32
|
+
Requires-Dist: pyinstaller>=6.0; extra == "build"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# CHYRD
|
|
36
|
+
|
|
37
|
+
CHYRD (pronounced "chird" - it's a bird) is an AI coding agent that lives in
|
|
38
|
+
your terminal. It is the same genre as OpenCode, Gemini CLI, and Claude Code:
|
|
39
|
+
a model talks to your code through real tools - read, write, edit, shell, grep,
|
|
40
|
+
web search - inside a fast, animated TUI. What sets CHYRD apart is breadth and
|
|
41
|
+
craft in one package: it speaks to *every* model and provider - 30+ built in
|
|
42
|
+
(Anthropic, OpenAI, Google, OpenRouter, Groq, DeepSeek, xAI, Mistral, Together,
|
|
43
|
+
Fireworks, Moonshot, Cohere, Qwen, Z.AI/GLM, MiniMax, Perplexity, AI21,
|
|
44
|
+
Inception, Vercel AI Gateway, Poe, DeepInfra, Novita, Nebius, SiliconFlow,
|
|
45
|
+
Hyperbolic, plus the free tiers of GitHub Models, Cerebras, NVIDIA, SambaNova,
|
|
46
|
+
Hugging Face and Chutes, keyless local Ollama and LM Studio, and your own
|
|
47
|
+
OpenAI-compatible endpoints - 150+ catalogued models in all), it carries
|
|
48
|
+
Claude-Code-grade permission modes you cycle on the fly,
|
|
49
|
+
it ships subagents, a real skills library, web search, and session persistence,
|
|
50
|
+
and it does all of it behind a living terminal interface with a mascot bird that
|
|
51
|
+
reacts to what the agent is doing. One tool, every backend, no lock-in.
|
|
52
|
+
|
|
53
|
+
Where the alternatives each pick a lane - Claude Code is Anthropic-only and
|
|
54
|
+
closed, Gemini CLI is Google-only, OpenCode leans on a hosted layer -
|
|
55
|
+
CHYRD is open, local-first, and provider-agnostic by design. Bring whichever
|
|
56
|
+
key you already have, or no key at all and a local model, and get the same
|
|
57
|
+
agent loop, the same modes, the same skills.
|
|
58
|
+
|
|
59
|
+
## Install
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
pipx install chyrd # recommended: isolated, on your PATH
|
|
63
|
+
pip install chyrd # into the current environment
|
|
64
|
+
uv tool install chyrd # if you use uv
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
To use the Claude Code engine as a backend (via the Claude Agent SDK), add the
|
|
68
|
+
extra:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
pipx install "chyrd[claude]"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
From a source checkout: `pip install -e .` in the project root.
|
|
75
|
+
|
|
76
|
+
CHYRD needs Python 3.10 or newer. It runs on Windows, macOS, and Linux.
|
|
77
|
+
|
|
78
|
+
## Quickstart
|
|
79
|
+
|
|
80
|
+
Set one provider key and launch:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
set ANTHROPIC_API_KEY=sk-... REM Windows (PowerShell: $env:ANTHROPIC_API_KEY="sk-...")
|
|
84
|
+
export ANTHROPIC_API_KEY=sk-... # macOS / Linux
|
|
85
|
+
chyrd
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
That opens the TUI in the current directory. Point it elsewhere with
|
|
89
|
+
`chyrd path/to/project`. No key at all? Run a local model with Ollama - it is
|
|
90
|
+
keyless (see below). Type your request, press Enter, and watch the agent work.
|
|
91
|
+
|
|
92
|
+
## Provider keys
|
|
93
|
+
|
|
94
|
+
API keys are read from environment variables first, then from
|
|
95
|
+
`~/.chyrd/config.json`. You only need one to get started.
|
|
96
|
+
|
|
97
|
+
| Provider | Environment variable | Notes |
|
|
98
|
+
| ----------------- | ---------------------- | -------------------------------------------- |
|
|
99
|
+
| Anthropic | `ANTHROPIC_API_KEY` | Claude Opus / Sonnet / Haiku |
|
|
100
|
+
| OpenAI | `OPENAI_API_KEY` | GPT family (incl. Codex models) |
|
|
101
|
+
| Google | `GEMINI_API_KEY` | Gemini |
|
|
102
|
+
| OpenRouter | `OPENROUTER_API_KEY` | One key, hundreds of models (incl. `:free`) |
|
|
103
|
+
| Vercel AI Gateway | `AI_GATEWAY_API_KEY` | One key, routes to many vendors |
|
|
104
|
+
| Poe | `POE_API_KEY` | Spends your Poe subscription points |
|
|
105
|
+
| Groq | `GROQ_API_KEY` | Very fast inference |
|
|
106
|
+
| DeepSeek | `DEEPSEEK_API_KEY` | DeepSeek chat / reasoner |
|
|
107
|
+
| xAI | `XAI_API_KEY` | Grok |
|
|
108
|
+
| Mistral | `MISTRAL_API_KEY` | Mistral / Codestral / Devstral / Magistral |
|
|
109
|
+
| Together | `TOGETHER_API_KEY` | Open-weight hosting |
|
|
110
|
+
| Fireworks | `FIREWORKS_API_KEY` | Open-weight hosting |
|
|
111
|
+
| Moonshot | `MOONSHOT_API_KEY` | Kimi |
|
|
112
|
+
| Cohere | `COHERE_API_KEY` | Command family |
|
|
113
|
+
| Qwen | `DASHSCOPE_API_KEY` | Qwen via Alibaba DashScope |
|
|
114
|
+
| Z.AI | `ZAI_API_KEY` | GLM family (Flash tier is free) |
|
|
115
|
+
| MiniMax | `MINIMAX_API_KEY` | MiniMax M-series |
|
|
116
|
+
| Perplexity | `PERPLEXITY_API_KEY` | Sonar - answers with live web search |
|
|
117
|
+
| AI21 | `AI21_API_KEY` | Jamba family |
|
|
118
|
+
| Inception | `INCEPTION_API_KEY` | Mercury diffusion LLMs (very fast) |
|
|
119
|
+
| DeepInfra | `DEEPINFRA_API_KEY` | Open-weight hosting |
|
|
120
|
+
| Novita | `NOVITA_API_KEY` | Open-weight hosting |
|
|
121
|
+
| Nebius | `NEBIUS_API_KEY` | Open-weight hosting |
|
|
122
|
+
| SiliconFlow | `SILICONFLOW_API_KEY` | Open-weight hosting |
|
|
123
|
+
| Hyperbolic | `HYPERBOLIC_API_KEY` | Open-weight hosting |
|
|
124
|
+
| GitHub Models | `GITHUB_TOKEN` | Free with a GitHub account (rate-limited) |
|
|
125
|
+
| Cerebras | `CEREBRAS_API_KEY` | Free tier, wafer-scale speed |
|
|
126
|
+
| NVIDIA NIM | `NVIDIA_API_KEY` | Free credits |
|
|
127
|
+
| SambaNova | `SAMBANOVA_API_KEY` | Free tier |
|
|
128
|
+
| Hugging Face | `HF_TOKEN` | Inference router; free monthly credits |
|
|
129
|
+
| Chutes | `CHUTES_API_KEY` | Decentralized; free tier |
|
|
130
|
+
| Ollama | none (keyless) | Local; serve on `localhost:11434` |
|
|
131
|
+
| LM Studio | none (keyless) | Local; serve on `localhost:1234` |
|
|
132
|
+
| Claude (SDK) | `ANTHROPIC_API_KEY` | Install `chyrd[claude]` (Agent SDK backend) |
|
|
133
|
+
|
|
134
|
+
The Claude Agent SDK backend runs the bundled Claude Code engine through the
|
|
135
|
+
`claude-agent-sdk` extra (auth with `ANTHROPIC_API_KEY`, or Bedrock/Vertex env
|
|
136
|
+
flags). Its models appear as `claude-agent/opus`, `claude-agent/sonnet`, and
|
|
137
|
+
`claude-agent/haiku`. If the SDK is not installed, that backend simply reports
|
|
138
|
+
itself unavailable and the rest of CHYRD is unaffected.
|
|
139
|
+
|
|
140
|
+
Set keys without touching the shell from inside the app with `/keys` (masked
|
|
141
|
+
input, saved to your global config), or list every model and its readiness with
|
|
142
|
+
`chyrd models`.
|
|
143
|
+
|
|
144
|
+
## Permission modes
|
|
145
|
+
|
|
146
|
+
Cycle modes live with Shift+Tab. The status bar shows the active mode -
|
|
147
|
+
terracotta in bypass, sage otherwise.
|
|
148
|
+
|
|
149
|
+
| Mode | Behavior |
|
|
150
|
+
| -------------- | -------------------------------------------------------------------- |
|
|
151
|
+
| `normal` | Ask before every mutating action (write, edit, shell, fetch). |
|
|
152
|
+
| `accept-edits` | File writes and edits auto-approved; shell and fetch still ask. |
|
|
153
|
+
| `plan` | Read-only. Mutating tools are refused with guidance; present a plan. |
|
|
154
|
+
| `bypass` | Everything auto-approved. Move fast; nothing prompts. |
|
|
155
|
+
|
|
156
|
+
In the approval dialog you can choose **allow once**, **always allow** (persists
|
|
157
|
+
a rule like `shell(git *)` for the session), or **deny**.
|
|
158
|
+
|
|
159
|
+
## Keybindings
|
|
160
|
+
|
|
161
|
+
| Key | Action |
|
|
162
|
+
| -------------- | --------------------------------------------------- |
|
|
163
|
+
| Enter | Submit the message |
|
|
164
|
+
| Shift+Enter | Newline in the composer |
|
|
165
|
+
| Up / Down | Browse input history (at the buffer edge) |
|
|
166
|
+
| `/` | Open the slash-command and skill menu |
|
|
167
|
+
| `@` | File-path autocomplete |
|
|
168
|
+
| Tab | Accept the highlighted suggestion |
|
|
169
|
+
| Shift+Tab | Cycle permission mode |
|
|
170
|
+
| Ctrl+M | Open the model picker |
|
|
171
|
+
| Ctrl+N | New session |
|
|
172
|
+
| Ctrl+P | Command palette |
|
|
173
|
+
| Ctrl+T | Next theme |
|
|
174
|
+
| Esc | Interrupt the running turn |
|
|
175
|
+
| F1 or `?` | Help |
|
|
176
|
+
| Ctrl+C | Quit (press twice) |
|
|
177
|
+
|
|
178
|
+
## Slash commands
|
|
179
|
+
|
|
180
|
+
Type `/` in the composer to open the menu. Built-ins:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
/help keys and commands /skills list available skills
|
|
184
|
+
/model open the model picker /agents list subagents
|
|
185
|
+
/mode cycle permission mode /init generate a CHYRD.md brief
|
|
186
|
+
/theme switch theme /keys set a provider API key
|
|
187
|
+
/new start a fresh session /mascot toggle the mascot bird
|
|
188
|
+
/sessions browse and resume /compact summarize older context
|
|
189
|
+
/resume resume the most recent /cost show usage and spend
|
|
190
|
+
/clear clear the conversation /loop [n] keep improving the project
|
|
191
|
+
/exit quit CHYRD /stop end a running loop
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Every discovered skill is also a slash command - `/commit`, `/review`,
|
|
195
|
+
`/debug`, and so on.
|
|
196
|
+
|
|
197
|
+
## Skills
|
|
198
|
+
|
|
199
|
+
Skills are expert playbooks the agent (or you, via `/name`) can pull into
|
|
200
|
+
context on demand. CHYRD ships fifteen built-ins:
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
3d-model Three.js scenes, procedural meshes, Blender bpy scripts
|
|
204
|
+
ai-app LLM app patterns: streaming, tool use, caching, evals
|
|
205
|
+
image-gen Stable Diffusion / ComfyUI / API image generation options
|
|
206
|
+
website Next.js + Tailwind ship checklist
|
|
207
|
+
game-dev game loop / ECS / collision basics plus Roblox Luau notes
|
|
208
|
+
commit conventional-commit workflow
|
|
209
|
+
review severity-ranked code review method
|
|
210
|
+
init generate a CHYRD.md project brief
|
|
211
|
+
debug scientific debugging
|
|
212
|
+
refactor safe, incremental refactoring
|
|
213
|
+
test the test pyramid plus table-driven tests
|
|
214
|
+
docs documentation that stays true
|
|
215
|
+
data-viz terminal braille charts and matplotlib
|
|
216
|
+
deploy Vercel / Docker / systemd shipping
|
|
217
|
+
security OWASP quick audit
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Add your own under `~/.chyrd/skills/<name>/SKILL.md` (global) or
|
|
221
|
+
`./.chyrd/skills/<name>/SKILL.md` (per project). Frontmatter is `name`,
|
|
222
|
+
`description`, and an optional `argument-hint`; the markdown body is the
|
|
223
|
+
playbook.
|
|
224
|
+
|
|
225
|
+
## Subagents
|
|
226
|
+
|
|
227
|
+
The `task` tool runs focused work in a nested agent. Three are built in:
|
|
228
|
+
`explorer` (read-only codebase scout), `builder` (full tools, one job), and
|
|
229
|
+
`reviewer` (read-only, severity-ranked). Define your own as markdown files in
|
|
230
|
+
`.chyrd/agents/` (project) or `~/.chyrd/agents/` (global):
|
|
231
|
+
|
|
232
|
+
```markdown
|
|
233
|
+
---
|
|
234
|
+
name: reviewer
|
|
235
|
+
description: Reviews code for bugs. Use after writing significant code.
|
|
236
|
+
tools: read_file, grep_files, glob_files # optional; default = read-only set
|
|
237
|
+
model: anthropic/claude-sonnet-4-6 # optional; default = main model
|
|
238
|
+
---
|
|
239
|
+
You are a rigorous reviewer. Examine the relevant code without modifying it and
|
|
240
|
+
report findings ranked by severity, each with a path:line and a concrete fix...
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
A subagent inherits the active permission mode but has no interactive approver,
|
|
244
|
+
so mutating subagents only act in accept-edits or bypass mode (or under an
|
|
245
|
+
explicit allow rule).
|
|
246
|
+
|
|
247
|
+
## Configuration
|
|
248
|
+
|
|
249
|
+
CHYRD reads `~/.chyrd/config.json` (global) merged with `./.chyrd/config.json`
|
|
250
|
+
(project; project wins). A full example:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"model": "anthropic/claude-opus-4-8",
|
|
255
|
+
"theme": "chyrd-dark",
|
|
256
|
+
"mode": "normal",
|
|
257
|
+
"mascot": true,
|
|
258
|
+
"max_tokens": 8192,
|
|
259
|
+
"allow": [
|
|
260
|
+
"shell(git *)",
|
|
261
|
+
"shell(npm test)",
|
|
262
|
+
"write(**)"
|
|
263
|
+
],
|
|
264
|
+
"api_keys": {
|
|
265
|
+
"openrouter": "sk-or-..."
|
|
266
|
+
},
|
|
267
|
+
"ollama_url": "http://localhost:11434",
|
|
268
|
+
"providers": [
|
|
269
|
+
{
|
|
270
|
+
"id": "myllm",
|
|
271
|
+
"label": "My Gateway",
|
|
272
|
+
"base_url": "https://gateway.internal/v1",
|
|
273
|
+
"api_key_env": "MYLLM_API_KEY",
|
|
274
|
+
"models": [
|
|
275
|
+
{
|
|
276
|
+
"id": "house-large",
|
|
277
|
+
"name": "House Large",
|
|
278
|
+
"context_window": 128000,
|
|
279
|
+
"tier": "flagship"
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
`allow` rules grant standing permission so those actions never prompt.
|
|
288
|
+
`providers` declares any OpenAI-compatible endpoint - a self-hosted gateway, a
|
|
289
|
+
proxy, a vendor not built in - and its models show up everywhere a built-in
|
|
290
|
+
provider does. Prefer environment variables for secrets (`api_key_env`); inline
|
|
291
|
+
`api_key` is also accepted.
|
|
292
|
+
|
|
293
|
+
## Headless usage
|
|
294
|
+
|
|
295
|
+
`chyrd run` executes one prompt without the TUI and streams the answer to
|
|
296
|
+
stdout, which makes it scriptable and CI-friendly.
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
chyrd run "summarize what this project does"
|
|
300
|
+
chyrd run "add type hints to utils.py" --model anthropic/claude-opus-4-8 --mode bypass
|
|
301
|
+
chyrd run "list the failing tests" --quiet > report.txt
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
- `--model provider/model` picks the model (default: configured or auto-resolved).
|
|
305
|
+
- `--mode normal|accept-edits|plan|bypass` sets the permission mode. There is no
|
|
306
|
+
interactive approver in headless mode, so anything short of `bypass` or
|
|
307
|
+
`accept-edits` auto-denies mutating actions; CHYRD prints a one-line warning so
|
|
308
|
+
you are never surprised.
|
|
309
|
+
- `--max-turns N` caps the agent loop. `--quiet` hides tool-activity lines.
|
|
310
|
+
- Tool activity is dimmed to stderr; the answer goes to stdout. Exit code is `0`
|
|
311
|
+
on success, `1` on an error stop.
|
|
312
|
+
|
|
313
|
+
## Loop mode
|
|
314
|
+
|
|
315
|
+
`chyrd loop` runs unattended and keeps improving your project - one focused,
|
|
316
|
+
verified change per iteration, until you stop it.
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
chyrd loop pick the highest-impact improvement, repeat
|
|
320
|
+
chyrd loop "tighten the test suite" --interval 5m --max-iterations 10
|
|
321
|
+
chyrd loop --model groq/llama-3.3-70b-versatile --mode bypass
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
- With no prompt it surveys the codebase and makes one concrete improvement each
|
|
325
|
+
pass (bug fix, missing test, rough edge, doc gap, cleanup), then verifies it.
|
|
326
|
+
- `--interval` pauses between passes (`30s`, `5m`, `1h`; default back-to-back).
|
|
327
|
+
- `--max-iterations N` stops after N passes (default: until Ctrl+C).
|
|
328
|
+
- Defaults to `bypass` since it is unattended; it halts itself after three
|
|
329
|
+
failed passes so a bad key never spins. In the TUI, `/loop [n]` does the same
|
|
330
|
+
and `/stop` (or Esc) ends it.
|
|
331
|
+
|
|
332
|
+
## Closed-source binary
|
|
333
|
+
|
|
334
|
+
Ship CHYRD without the source. `python build/build.py` produces a standalone
|
|
335
|
+
`chyrd` executable (PyInstaller + optimized bytecode; `--obfuscate` adds
|
|
336
|
+
PyArmor). See `build/README.md` for the honest scope of what that protects and
|
|
337
|
+
how to harden further.
|
|
338
|
+
|
|
339
|
+
List the catalog at any time:
|
|
340
|
+
|
|
341
|
+
```
|
|
342
|
+
chyrd models
|
|
343
|
+
chyrd models --provider anthropic
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
## Website
|
|
347
|
+
|
|
348
|
+
Project site and docs: https://chyrd.dev
|
|
349
|
+
|
|
350
|
+
## License
|
|
351
|
+
|
|
352
|
+
MIT. See [LICENSE](LICENSE).
|