Sagixs In Terminal
A Claude Code-style AI agent for your terminal. It reads and edits files, searches your project, and runs commands, using any model you point it at:
- Any API: OpenAI, Anthropic, OpenRouter, Groq, Together, Hugging Face Inference Providers, the Cylink API, or any OpenAI-compatible endpoint.
- Local servers: Ollama, LM Studio, llama.cpp
llama-server, vLLM. - Local Hugging Face models: run a model from the Hub (or a folder on disk) directly on your machine with
transformers, or a GGUF file withllama-cpp-python.
No runtime dependencies for the API providers (standard library only), so it installs cleanly on Termux.
Status: 0.2.0 alpha. The agent loop, tools, API providers and CLI are covered by an automated test suite (106 tests, including end-to-end runs against a local fake API server). The local model providers are tested against stand-ins for
transformersandllama_cpp, not against real model weights - please report problems. See Limitations.
Install
python -m pip install sagixs # agent + every API provider
python -m pip install "sagixs[local]" # + run Hugging Face models locally (torch, transformers)
python -m pip install "sagixs[gguf]" # + run GGUF models locally (llama-cpp-python)
From a checkout: python -m pip install -e ".[dev]". Python 3.10+.
Quick start
cd your-project
export GROQ_API_KEY=... # or: sagixs auth set groq
sagixs --provider groq
> add a --verbose flag to cli.py and update the tests
● read_file(cli.py)
● edit_file(cli.py)
Edit cli.py
--- a/cli.py ...
Allow edit_file? [y]es / [n]o / [a]lways this session:
One-shot mode, for scripts and pipes:
sagixs -p "summarize what this repo does"
git diff | sagixs -p "review this diff" --provider openrouter --model anthropic/claude-sonnet-4.5
sagixs -p --yes "run the tests and fix any failures"
Choosing a model
Pick a provider with --provider and a model with --model, or combine them as provider:model.
sagixs providers # what's available and which keys are set
sagixs models --provider groq # list a provider's models
| Provider | Key | Notes |
|---|---|---|
openai |
OPENAI_API_KEY |
default model gpt-4o-mini |
anthropic |
ANTHROPIC_API_KEY |
native Messages API; pass --model |
openrouter |
OPENROUTER_API_KEY |
default openrouter/auto; any model id from their catalog |
groq |
GROQ_API_KEY |
default llama-3.3-70b-versatile |
together |
TOGETHER_API_KEY |
pass --model |
huggingface |
HF_TOKEN |
Hugging Face Inference Providers (hosted); pass --model |
cylink |
CYLINK_API_KEY |
default cyanix-core; uses text tool calls (see below) |
ollama |
none | http://127.0.0.1:11434/v1 |
lmstudio |
none | http://127.0.0.1:1234/v1 |
llamacpp |
none | llama-server on http://127.0.0.1:8080/v1 |
custom |
SAGIXS_API_KEY |
any OpenAI-compatible URL via --base-url |
hf-local |
HF_TOKEN (gated models) |
run a Hub model locally with transformers |
gguf |
HF_TOKEN (gated models) |
run a GGUF model locally |
sagixs --provider openrouter --model deepseek/deepseek-chat
sagixs --model groq:llama-3.1-8b-instant
sagixs --provider anthropic --model <a model id from `sagixs models --provider anthropic`>
sagixs --provider cylink
sagixs --provider ollama --model qwen2.5-coder:7b
sagixs --provider custom --base-url https://my.server/v1 --model my-model
Your own provider
Register any OpenAI-compatible endpoint once and use it by name:
sagixs config add-provider mylab --base-url https://api.mylab.dev/v1 --api-key-env MYLAB_KEY --model mylab-1
sagixs --provider mylab
Local Hugging Face models
pip install "sagixs[local]"
sagixs --provider hf-local --model Qwen/Qwen2.5-Coder-1.5B-Instruct
sagixs --provider hf-local --model ./my-finetuned-model --device cpu
Accepts a Hub repo id or a local directory. Options: --device (cpu, cuda, mps, auto), --dtype (auto, float16, bfloat16, float32), --max-tokens, --temperature, --trust-remote-code (off by default; only enable it for repos you trust). The model must have a chat template.
Local GGUF models
pip install "sagixs[gguf]"
sagixs --provider gguf --model ./model-q4_k_m.gguf
sagixs --provider gguf --model "Qwen/Qwen2.5-Coder-7B-Instruct-GGUF:*q4_k_m.gguf" --n-ctx 8192
owner/repo downloads a *q4_k_m.gguf file; add :FILE_OR_GLOB to choose another. --n-gpu-layers offloads layers to a GPU.
Termux (Android)
pkg install python
pip install sagixs
sagixs auth set groq
sagixs --provider groq
PyTorch generally isn't available on Termux, so for on-device models use a GGUF model or run llama-server / Ollama and connect with --provider llamacpp / ollama. API providers work as-is.
How tool calling works
Models act through tools: read_file, list_dir, glob, grep, edit_file, write_file, and bash.
- Native - for APIs with function calling (OpenAI, Anthropic, Groq, OpenRouter, ...), Sagixs uses the provider's own tool-calling field.
- Text protocol - for local models, and APIs without a
toolsfield (Cylink,llama-serverby default), Sagixs teaches the model a small<tool_call>{json}</tool_call>format in the system prompt and parses it from the reply. Any model that can follow instructions can use this; one tool call per reply. - Auto - the default. APIs start native; if one rejects the request because of tools, Sagixs switches to the text protocol mid-conversation and carries on. Force a style with
--tool-mode native|prompt.
Small models can write malformed or wrong tool calls. Sagixs reports parse problems back to the model so it can retry, but a 1B model is not going to behave like a frontier model.
Permissions
By default Sagixs asks before it edits a file or runs a command, showing a diff for edits. Reading and searching never ask.
| Mode | Reads | Edits | Commands |
|---|---|---|---|
readonly |
yes | blocked | blocked |
ask (default) |
yes | asks | asks |
auto-edit |
yes | yes | asks |
yolo (--yes) |
yes | yes | yes |
Set with --mode, /mode in a session, or sagixs config set mode auto-edit. Answer a at a prompt to stop asking about that tool for the session. When not run from a terminal (-p with piped input), anything that would need approval is declined unless you pass --yes or --mode auto-edit.
File tools only touch files inside the folder you launched from (--cwd to change it); symlinks that point outside it are refused. bash is not sandboxed - an approved command can do anything your user can. Use ask mode (or a container) with models you don't trust.
In a session
/help /model NAME /provider NAME [MODEL] /mode MODE /tools /status /clear /exit. End a line with \ to continue it. Ctrl-C stops the current turn without quitting; files already changed stay changed. sagixs -c continues the last conversation in the current folder.
Put standing instructions in SAGIXS.md in your project (AGENTS.md or CLAUDE.md are read too). Machine-wide instructions go in ~/.config/sagixs/SAGIXS.md.
Configuration
sagixs config set provider groq
sagixs config set model llama-3.3-70b-versatile
sagixs config set mode auto-edit
sagixs config show # never prints keys
Keys: provider model base_url mode tool_mode max_steps temperature max_tokens timeout system_prompt device dtype n_ctx n_gpu_layers. Flags override the config file.
API keys come from, in order: --api-key, the provider's environment variable, then sagixs auth set PROVIDER, which stores the key in ~/.config/sagixs/credentials.json with owner-only permissions (plain text on disk - it is not encrypted). Keys are never written to config.json.
Safeguards against sending a key to the wrong place: a base_url saved in config only applies to the custom provider, and if you point a preset at a different host with --base-url, Sagixs will not send that preset's key there - supply SAGIXS_API_KEY or --api-key for that endpoint.
Limitations
- Local providers are not yet verified against real weights. The code paths (loading, streaming, stop handling, errors) are tested with stand-ins, and
transformers/llama-cpp-pythonAPIs change between versions. If something breaks,sagixs doctorshows what's installed. - The Cylink base URL (
https://cylinkdev.vercel.app/api/v1) is an assumption. If your endpoint differs, usesagixs config add-provider cylink --base-url ... --tool-mode prompt. Cylink currently ignorestemperature,top_pandstop; Sagixs tolerates that, but the model may write text after a tool call, which Sagixs discards. - Local chat templates vary: some reject a
systemrole (Sagixs folds it into the first user message) or require strict user/assistant alternation. - Context management is simple: when a conversation outgrows the model's budget, old tool output is dropped. There is no summarization yet; use
/clearif answers degrade. Local models default to a small budget. - No web access, MCP, or sub-agents yet.
bashcan fetch URLs if you approve it.
Development
git clone https://github.com/suprosmith-coder/sagixs.git && cd sagixs
python -m pip install -e ".[dev]"
pytest && ruff check .
Roadmap
- Provider adapters: OpenAI-compatible, Anthropic, local transformers, GGUF
- Streaming output
- Tool runtime (files, search, shell) with permission modes
- Text tool-call protocol for any model
- Verify local providers against real models; model capability registry
- Context summarization
- Web fetch/search tool, MCP client
- Native Sagixs model adapter
License
MIT. See LICENSE.
Metadata
Release files for sagixs 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sagixs-0.2.0.tar.gz | 53.1 kB | With provenance | Details for sagixs-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sagixs-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for sagixs-0.2.0-py3-none-any.whl |
Total release size: 101.1 kB
Release files / sagixs-0.2.0.tar.gz
| Download URL | sagixs-0.2.0.tar.gz |
|---|---|
| Size | 53.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e728f57fab0f63f7bd5b1955ef977f553cb148d32b529473dcf7dae354c873e4
|
|
BLAKE2b-256 checksum How to use checksums |
bac9ab8fb69cb91222b7fa0c3a33f2c6d4a6c0e09d0ebb6a0d31bbd05f1ba1a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / sagixs-0.2.0-py3-none-any.whl
| Download URL | sagixs-0.2.0-py3-none-any.whl |
|---|---|
| Size | 48.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ecff6fd32a1c8d828560aa81a9758e8b24b53b39e6c9d7e92104df86fa262d83
|
|
BLAKE2b-256 checksum How to use checksums |
f36d8ca114bd9ff4f029741e23b56ce821d74e4e22c74bc5daea50cea526ff74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logSecurity for sagixs 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sagixs-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.