Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ jobs:
mkdir -p python/cactus/bindings/lib
cp cactus-engine/build/libcactus_engine.dylib python/cactus/bindings/lib/

- uses: actions/setup-node@v4
with:
node-version: "22"

- name: Bundle coding agent into the wheel
run: |
(cd cactus-code && npm install --no-audit --no-fund)
bash cactus-code/scripts/bundle-for-pypi.sh
rm -rf python/cactus/code/packages/tui/native/win32
rm -rf python/cactus/code/packages/tui/native/darwin/prebuilds/darwin-x64

- name: Build and repair wheel
working-directory: python
run: |
Expand Down Expand Up @@ -68,6 +79,18 @@ jobs:
mkdir -p python/cactus/bindings/lib
cp cactus-engine/build/libcactus_engine.so python/cactus/bindings/lib/

- name: Install Node.js 22
run: |
curl -fsSL https://nodejs.org/dist/v22.21.0/node-v22.21.0-linux-arm64.tar.xz -o /tmp/node.tar.xz
tar -xJf /tmp/node.tar.xz -C /opt
echo "/opt/node-v22.21.0-linux-arm64/bin" >> "$GITHUB_PATH"

- name: Bundle coding agent into the wheel
run: |
(cd cactus-code && npm install --no-audit --no-fund)
bash cactus-code/scripts/bundle-for-pypi.sh
rm -rf python/cactus/code/packages/tui/native

- name: Build and repair wheel
working-directory: python
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ python/cactus/bin/
python/cactus/bindings/lib/
site/
site_docs/

python/cactus/code/
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,20 @@ graph.hard_reset();
│ --confidence-threshold <0..1> handoff to cloud below this confidence │
│ --cloud-timeout-ms <n> max wait for cloud handoff │
│ │
│ cactus code run the AI coding agent (TUI / print) │
│ --serve-model <id> auto-start a server with this model │
│ --bits 1|2|3|4 CQ quantization (default: 4) │
│ --platform auto|cpu|apple target platform (default: auto) │
│ --token <token> HuggingFace token (gated models) │
│ --reconvert force local rebuild from source │
│ --host <addr> server address (default: 127.0.0.1) │
│ --port <port> server port (default: 8080) │
│ --no-serve require a running server (no auto-start) │
│ --no-cloud-handoff disable automatic cloud handoff │
│ --confidence-threshold <0..1> handoff to cloud below this confidence │
│ --cloud-timeout-ms <n> max wait for cloud handoff │
│ -- <args...> pass remaining args to the agent │
│ │
│ cactus list list downloaded models │
│ │
│ cactus build build cactus libraries │
Expand Down
2 changes: 2 additions & 0 deletions cactus-code/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
21 changes: 21 additions & 0 deletions cactus-code/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 Mario Zechner

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
17 changes: 17 additions & 0 deletions cactus-code/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# cactus-code

The terminal coding agent behind `cactus code` — an interactive AI assistant
for a local [Cactus](https://github.com/cactus-compute/cactus) server.

## Credits

Based on **[pi](https://github.com/earendil-works/pi)** by **Mario Zechner**
and contributors. The agent — its TUI, sessions, tools, and compaction — is
their work. Thank you.

Want the original, full-featured agent? Use upstream:
https://github.com/earendil-works/pi

## License

MIT — see [LICENSE](./LICENSE), © 2025 Mario Zechner. Same license as upstream.
Loading
Loading