@chanto/cli 0.0.0-stage → 0.1.0
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.
- package/LICENSE +202 -0
- package/README.md +234 -2
- package/bin/chanto.js +33 -0
- package/package.json +26 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright 2026 Daniel Phang
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,235 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.svg" alt="Chanto" width="96" height="96" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">Chanto</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
A fast, lean coding agent for your terminal.
|
|
9
|
+
Any model, local or hosted, including your cloud's:
|
|
10
|
+
Amazon Bedrock, Google Vertex AI and Azure.
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<img alt="Status: alpha" src="https://img.shields.io/badge/status-alpha-f59e0b">
|
|
15
|
+
<img alt="Rust" src="https://img.shields.io/badge/Rust-1.95%2B-000000?logo=rust&logoColor=white">
|
|
16
|
+
<img alt="License" src="https://img.shields.io/badge/license-Apache--2.0-blue">
|
|
17
|
+
<img alt="Local models" src="https://img.shields.io/badge/local-Ollama%20·%20llama.cpp%20·%20vLLM-10b981">
|
|
18
|
+
<img alt="MCP" src="https://img.shields.io/badge/MCP-client%20%2B%20server-6C47FF">
|
|
19
|
+
<img alt="Setup" src="https://img.shields.io/badge/setup-imports%20your%20existing%20config-6C47FF">
|
|
20
|
+
<img alt="Platforms" src="https://img.shields.io/badge/platforms-macOS%20·%20Linux%20·%20Windows-0078D6">
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
> [!NOTE]
|
|
24
|
+
> **Chanto is in alpha.** Expect rough edges and breaking changes before 1.0.
|
|
25
|
+
> [Issues](https://github.com/chanto-sh/chanto/issues) and feedback are welcome.
|
|
26
|
+
|
|
27
|
+
> Switching from another agent? Chanto reads the config you already have, so you don't start over.
|
|
28
|
+
|
|
29
|
+
<p align="center">
|
|
30
|
+
<a href="docs/reference.md"><b>Docs</b></a> ·
|
|
31
|
+
<a href="https://chanto.sh/docs/quickstart"><b>Quickstart</b></a> ·
|
|
32
|
+
<a href="https://github.com/chanto-sh/benchmarks/blob/main/RESULTS.md"><b>Benchmarks</b></a> ·
|
|
33
|
+
<a href="CHANGELOG.md"><b>Changelog</b></a>
|
|
34
|
+
</p>
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
macOS and Linux:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
curl -fsSL https://chanto.sh/install.sh | sh
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Homebrew (macOS and Linux):
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
brew install chanto-sh/tap/chanto
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Windows (PowerShell):
|
|
53
|
+
|
|
54
|
+
```powershell
|
|
55
|
+
irm https://chanto.sh/install.ps1 | iex
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The installer checks the download's checksum and puts `chanto` in `~/.local/bin` (it tells you if that isn't on your `PATH`). Update later with `chanto upgrade`. To build from a checkout instead: `./install.sh --from-source` (needs Rust 1.95+).
|
|
59
|
+
|
|
60
|
+
## First run
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
cd your-project
|
|
64
|
+
chanto
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Chanto looks for what you already have: API keys in your environment, your Codex config, a running Ollama. Then it asks you to pick a model. No keys? Pick one of the free options: OpenRouter's free models, Gemini's free tier, or a model on your own machine. [Hosted models](docs/reference.md#hosted-models) covers every provider, including your ChatGPT plan, Amazon Bedrock, Google Vertex AI and Azure.
|
|
68
|
+
|
|
69
|
+
Then just say what you want, like "fix the failing test in auth". Chanto asks before editing files or running risky commands, unless you allow them.
|
|
70
|
+
|
|
71
|
+
`chanto setup` changes the default model later, and `chanto doctor` shows what was found and where each setting came from.
|
|
72
|
+
|
|
73
|
+
## Everyday use
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
chanto # a session in this project
|
|
77
|
+
chanto "explain the auth flow" # start with a prompt
|
|
78
|
+
chanto -p "fix the failing tests" # run once and print the result (scripts, CI)
|
|
79
|
+
chanto --verify "add a login page" # can't finish until the project's tests pass
|
|
80
|
+
chanto -c # continue the last session here
|
|
81
|
+
chanto --worktree # work in a new checkout and branch, for parallel sessions
|
|
82
|
+
chanto --inline # print into your terminal's scrollback instead of full screen
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
In a session:
|
|
86
|
+
|
|
87
|
+
| | |
|
|
88
|
+
|---|---|
|
|
89
|
+
| `esc` | stop the model |
|
|
90
|
+
| `enter` while it works | the model gets your message at its next step (`ctrl+x ctrl+s` sends now, `ctrl+x enter` waits for the turn to end) |
|
|
91
|
+
| `esc esc` or `/rewind` | go back to an earlier prompt (undoing file changes too), or edit one to start a new branch; `/redo` puts back what you undid |
|
|
92
|
+
| `/model`, `/effort` | switch model, or set how hard it thinks |
|
|
93
|
+
| `shift+tab` | cycle permission mode (ask, accept edits, plan, auto) |
|
|
94
|
+
| `@file`, `!cmd` | attach a file; run a shell command yourself |
|
|
95
|
+
| `?` or `/help` | all keys and commands |
|
|
96
|
+
|
|
97
|
+
`chanto --help` lists the command-line options and subcommands. The [reference](docs/reference.md) covers the rest.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Features
|
|
102
|
+
|
|
103
|
+
| | |
|
|
104
|
+
|---|---|
|
|
105
|
+
| **Fast and lean** | One native binary that starts instantly and stays light on CPU and memory while it works, with fewer tokens per task than most agents ([benchmarks](https://github.com/chanto-sh/benchmarks/blob/main/RESULTS.md)) |
|
|
106
|
+
| **Any model** | Free to start (OpenRouter's free models, Gemini's free tier, or a local model); Ollama, llama.cpp, vLLM and other OpenAI-compatible servers; OpenAI, Anthropic, OpenRouter, DeepSeek and more; your ChatGPT login; Amazon Bedrock, Google Vertex AI and Azure with your cloud credentials |
|
|
107
|
+
| **Safe by default** | Shell commands run in a sandbox on macOS and Linux (on Windows it confines writes only: reads and network aren't restricted), with optional network domain allowlists on macOS and Linux; risky actions need your OK, and auto mode screens commands for you |
|
|
108
|
+
| **Undo** | `/rewind` restores files (including what shell commands changed) and the conversation to any earlier prompt |
|
|
109
|
+
| **Outcome mode** | Agree on what "done" means first, then review results instead of code |
|
|
110
|
+
| **Background runs** | `chanto run --bg "<task>"` (or `&task` in the TUI) works in its own git worktree and branch while you keep going; `chanto runs`, `attach` to answer prompts, `apply` to bring the result over; optional per-run Docker/Podman container for its commands (`[background] isolate = "docker"`, no network or an allowlist, CPU/memory limits) |
|
|
111
|
+
| **Checks its work** | Runs the tests related to its change before saying it's done (the full suite when shared setup changed, or with `--verify-full`), tells failures it caused from ones that were already there, and won't weaken tests to pass |
|
|
112
|
+
| **Finds its way in big repos** | `RepoMap` gives a ranked, token-budgeted map of the project's symbols; `SemanticSearch` finds code by meaning through `[embeddings]` (a local Ollama model by default). Both are read-only, so they run without a prompt |
|
|
113
|
+
| **Plays well with others** | MCP, hooks, and Claude Code plugin marketplaces (`chanto plugin`) |
|
|
114
|
+
|
|
115
|
+
<details>
|
|
116
|
+
<summary><b>Everything else</b>: goals, teams, scheduled jobs, memory, voice and more</summary>
|
|
117
|
+
|
|
118
|
+
| | |
|
|
119
|
+
|---|---|
|
|
120
|
+
| **Goals** | `/goal <objective>` keeps working across turns and context windows until the agreed, locked criteria pass; stops on limits or no progress, and asks when blocked |
|
|
121
|
+
| **Teams** | `/team <task>` splits work into parallel sub-tasks in their own worktrees, reviews each one, merges them onto a team branch and runs your checks |
|
|
122
|
+
| **Costs and diagnostics** | USD totals, session/daily budgets, a spend guard that estimates fan-out before it starts and explains costly loops, redacted daily logs, opt-in OTLP telemetry, `/feedback`, and opt-in error reports |
|
|
123
|
+
| **Keeps secrets out** | Hides API keys and `.env` values from the model and logs |
|
|
124
|
+
| **Durable memory** | Remembers user preferences and project facts across sessions, with visible saves and undo |
|
|
125
|
+
| **Local models** | Tuned for small local models, and won't run your machine out of memory |
|
|
126
|
+
| **Easy to install** | One-line installers that verify checksums, optional daily update notices, and `chanto upgrade` |
|
|
127
|
+
| **Chanto cloud** | `chanto login cloud`, then models as `chanto/<model>` and agents that run on a schedule, on GitHub events or from CI: `chanto agents create`, `chanto agents run --wait`, `chanto cloud run --agent <name>` with `CHANTO_CLOUD_TOKEN` ([docs](docs/reference.md#chanto-cloud)) |
|
|
128
|
+
| **Scheduled jobs** | `chanto runner`: cron, interval, webhook and CI triggers, each an isolated background run with budgets, verification and notifications |
|
|
129
|
+
| **Drive another agent** | `chanto acp-client <command>` runs any ACP agent (Claude Code via `claude-agent-acp`, OpenCode, …) with Chanto's UI, permissions and your MCP servers; the agent can run commands through Chanto's terminals, its modes, settings and sign-in work through `/agent-mode`, `/agent-config` and `/agent-login`, and its own slash commands are passed through ([docs](docs/reference.md#driving-another-agent-acp-client)) |
|
|
130
|
+
| **Learns from you** | Suggests lessons from your corrections, only applied when you approve |
|
|
131
|
+
| **Customizable** | Ask `/customize` or `chanto customize` to add commands, skills, hooks and more; `/reload` applies extensions |
|
|
132
|
+
| **Computer use** | Opt-in (`--computer`) desktop control beyond the browser: screenshots, clicks, typing and apps on macOS (built-in tools only) and Linux (X11, or Wayland with grim/GNOME/KDE screenshots and ydotool); every action needs your approval, and a status-line indicator shows it's on |
|
|
133
|
+
| **Remote runs** | `chanto serve --runs` on your own server, then `chanto run --bg --on <server>`: the code goes as a git bundle or through your git remote, and the results come back the same way |
|
|
134
|
+
| **Sessions** | Resume from any directory, fork current or past conversations, browse session trees, share redacted standalone HTML, and import sessions others share with you (`chanto import-session`) |
|
|
135
|
+
| **Voice input** | ctrl+space or `/voice` in the TUI: dictate a prompt, transcribed locally with whisper.cpp (or a hosted endpoint you configure) and placed in the prompt for review ([docs](docs/reference.md#voice-input)) |
|
|
136
|
+
| **Your terminal, your way** | A full-screen view, or `--inline` to print into your terminal's own scrollback (native scroll, search and copy); Markdown renders as it streams; `/effort` sets how hard the model thinks |
|
|
137
|
+
|
|
138
|
+
Full list in the [docs](docs/reference.md).
|
|
139
|
+
</details>
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary><b>Compatibility: the existing Claude Code and Codex setup it reads</b></summary>
|
|
143
|
+
|
|
144
|
+
| Reads | From |
|
|
145
|
+
|---|---|
|
|
146
|
+
| Settings, permission rules, hooks, env, status line, output style, API key helper | `~/.claude/settings.json`, `.claude/settings*.json` |
|
|
147
|
+
| MCP servers | `.mcp.json`, `~/.claude.json`, Codex `config.toml` |
|
|
148
|
+
| Instructions | `AGENTS.md`, `AGENTS.override.md`, `CLAUDE.md`, `.claude/rules` |
|
|
149
|
+
| Skills, commands, subagents, plugins | `.claude/` and `~/.claude/`, Codex `prompts/` |
|
|
150
|
+
|
|
151
|
+
Project settings that could run code are ignored until you trust the folder.
|
|
152
|
+
</details>
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## What's different
|
|
157
|
+
|
|
158
|
+
Chanto is built around one rule: finishing means evidence, not a confident answer.
|
|
159
|
+
|
|
160
|
+
- **A finish it has to earn.** Before accepting "done", Chanto runs the project's tests and sends failures back to the model. The final answer says what actually passed and how much of the suite that was.
|
|
161
|
+
- **Tests are protected.** Existing tests are snapshotted each turn. Deleting them, weakening assertions or adding skips is caught and rejected: fix the code, not the test.
|
|
162
|
+
- **Stopping is a feature.** Goals and teams keep working until agreed criteria pass, stop on limits or no progress, and ask when blocked instead of spinning.
|
|
163
|
+
- **Local-first.** One Rust binary that talks to local or hosted models, reads existing agent config one way, and needs no account to start.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## How it works
|
|
168
|
+
|
|
169
|
+
```mermaid
|
|
170
|
+
flowchart LR
|
|
171
|
+
you(["You"]) --> agent["Agent"]
|
|
172
|
+
agent <--> model["Model<br/><i>local or hosted</i>"]
|
|
173
|
+
agent --> tools["Tools<br/><i>files · shell · web · MCP</i>"]
|
|
174
|
+
agent --> check{{"Checks<br/><i>tests pass?</i>"}}
|
|
175
|
+
check -->|no| agent
|
|
176
|
+
check -->|yes| done(["Done"])
|
|
177
|
+
|
|
178
|
+
classDef ok fill:#10b98118,stroke:#10b981;
|
|
179
|
+
class check,done ok
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Every action goes through a permission check first, and secrets are masked before anything is sent to the model.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Benchmarks
|
|
187
|
+
|
|
188
|
+
Same model, same tasks and same rules for every agent. Tasks come from a public set, not ones written for Chanto.
|
|
189
|
+
|
|
190
|
+
The suite, every raw result and how to audit them live in [chanto-sh/benchmarks](https://github.com/chanto-sh/benchmarks).
|
|
191
|
+
Results and caveats: [RESULTS.md](https://github.com/chanto-sh/benchmarks/blob/main/RESULTS.md).
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Repository
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
src/ the agent (Rust)
|
|
199
|
+
proto/ wire types shared by the CLI and the hosted service (chanto-proto)
|
|
200
|
+
classifier/ auto mode's command classifier
|
|
201
|
+
docs/ full reference
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Development
|
|
207
|
+
|
|
208
|
+
Needs Rust 1.95 or newer (`rustup update stable`).
|
|
209
|
+
|
|
210
|
+
```sh
|
|
211
|
+
cargo build # add --release for target/release/chanto
|
|
212
|
+
cargo test
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Day-to-day commands and architecture notes are in [AGENTS.md](AGENTS.md); how to
|
|
216
|
+
contribute, report a vulnerability, and behave are in [CONTRIBUTING.md](CONTRIBUTING.md),
|
|
217
|
+
[SECURITY.md](SECURITY.md), and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
Licensed under the Apache License, Version 2.0 ([LICENSE](LICENSE) or
|
|
224
|
+
<http://www.apache.org/licenses/LICENSE-2.0>). Third-party notices are in
|
|
225
|
+
[NOTICE](NOTICE).
|
|
226
|
+
|
|
227
|
+
### Contribution
|
|
228
|
+
|
|
229
|
+
Unless you explicitly state otherwise, any contribution intentionally submitted
|
|
230
|
+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
|
|
231
|
+
licensed as above, without any additional terms or conditions.
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
<p align="center"><sub>Chanto is not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, or any other vendor it can talk to. "Claude", "Claude Code", "Anthropic", "OpenAI", "ChatGPT", and "Codex" are trademarks of their respective owners, named here only to describe compatibility with their configuration and APIs.</sub></p>
|
package/bin/chanto.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the chanto binary from the platform package npm installed alongside
|
|
3
|
+
// this one (an optional dependency picked by os and cpu).
|
|
4
|
+
'use strict';
|
|
5
|
+
const { spawnSync } = require('node:child_process');
|
|
6
|
+
|
|
7
|
+
const platforms = {
|
|
8
|
+
'darwin-arm64': '@chanto/cli-darwin-arm64',
|
|
9
|
+
'darwin-x64': '@chanto/cli-darwin-x64',
|
|
10
|
+
'linux-arm64': '@chanto/cli-linux-arm64',
|
|
11
|
+
'linux-x64': '@chanto/cli-linux-x64',
|
|
12
|
+
'win32-x64': '@chanto/cli-win32-x64'
|
|
13
|
+
};
|
|
14
|
+
const key = `${process.platform}-${process.arch}`;
|
|
15
|
+
const pkg = platforms[key];
|
|
16
|
+
if (!pkg) {
|
|
17
|
+
console.error(`chanto: no prebuilt binary for ${key}. Install from source: cargo install chanto`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
let bin;
|
|
21
|
+
try {
|
|
22
|
+
bin = require.resolve(`${pkg}/bin/chanto${process.platform === 'win32' ? '.exe' : ''}`);
|
|
23
|
+
} catch {
|
|
24
|
+
console.error(`chanto: ${pkg} isn't installed. Reinstall without --omit=optional or --no-optional.`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
28
|
+
if (result.error) {
|
|
29
|
+
console.error(`chanto: ${result.error.message}`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
if (result.signal) process.kill(process.pid, result.signal);
|
|
33
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chanto/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A fast, lean coding agent for your terminal",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"homepage": "https://chanto.sh",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/chanto-sh/chanto.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"chanto": "bin/chanto.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=18"
|
|
20
|
+
},
|
|
21
|
+
"optionalDependencies": {
|
|
22
|
+
"@chanto/cli-darwin-arm64": "0.1.0",
|
|
23
|
+
"@chanto/cli-darwin-x64": "0.1.0",
|
|
24
|
+
"@chanto/cli-linux-arm64": "0.1.0",
|
|
25
|
+
"@chanto/cli-linux-x64": "0.1.0",
|
|
26
|
+
"@chanto/cli-win32-x64": "0.1.0"
|
|
27
|
+
}
|
|
28
|
+
}
|