oneagent (ma)
One model. One tool. One loop.
oneagent is a one-shot AI agent CLI that runs as a single Rust binary. It takes a task on the command line, calls any OpenAI-compatible Chat Completions model, does the work with the shell tools already on your machine, prints one answer and exits. macOS and Linux are supported.
$ git diff | ma 'summarize these changes' reading 3 files from the diff on stdin $ git diff --stat src/main.rs | 18 ++++++++++---------The change replaces the retry counter with a ladder of three recovery tiers, each one costing more information than the last.$
What it is
A model, available as one more command in your pipeline.
oneagent is a one-shot command-line agent for people who already live in a shell. Instead of a session you attach to, you run it like any other Unix command: ma 'explain this project'. The task comes from its arguments, and extra context can come from stdin (git diff | ma 'summarize these changes'). Both are sent to an OpenAI-compatible Chat Completions endpoint, and the model then runs shell commands with whatever host CLIs are already installed — git, cargo, grep, curl. oneagent takes the directory you started it in as its workspace, writes the final answer to stdout and the process log to stderr, so it composes with the rest of your pipeline. Common write operations and shell network commands are refused by default; --write and --net opt in, and --skills loads named SKILL.md directories into the prompt. No conversation state is kept between runs.
The agent itself is one binary with no runtime dependency on Rust and no daemon to start. It is not a replacement for a resident coding agent such as Claude Code or aider; it is what you reach for when you want a model available as a single command inside an existing script, a Makefile, or a CI step.
How it differs
Not a session. A command.
Resident coding agents sit in your terminal and hold a conversation. oneagent runs once. That single difference decides which one belongs in a pipeline.
| oneagent | Resident coding agents (Claude Code, aider) | |
|---|---|---|
| Lifecycle | runs one task, then exits | a session you stay attached to |
| Interface | a Unix command; reads stdin, writes stdout | an interactive terminal UI |
| Tools | the shell and CLIs already on your machine | a built-in tool suite: edit, search, browse |
| State | none carried between runs | session history, checkpoints, permission prompts |
| Distribution | one native binary, no language runtime | usually needs a Node.js or Python runtime first |
| Inside a script or CI | git diff | ma 'review this' | awkward, with no stable non-interactive contract |
Install
One binary. Pick whichever path you already have.
Prebuilt binary
No Rust toolchain needed. Download the artifact for your platform, unpack it, done.
tar -xzf ma-<version>-aarch64-apple-darwin.tar.gz mv ma-<version>-aarch64-apple-darwin/ma ~/.local/bin/
Builds exist for macOS (Apple Silicon, Big Sur 11.0+) and Linux (x86_64, glibc 2.34+ — Ubuntu 22.04, Debian 12).
From crates.io
If you already have a Rust toolchain, this compiles it locally and puts the binary in ~/.cargo/bin.
cargo install oneagent
Then configure a model
Any endpoint that speaks the OpenAI-compatible Chat Completions API and supports tool calling will do — hosted or local.
export BASE_URL='https://your-endpoint.example/v1' export MODEL='your-model' export API_KEY='your-key'
BASE_URL is the API root; /chat/completions is appended. Settings can also live in a config file.
Usage
Point it at a directory and ask.
oneagent uses the directory you started it in as its workspace. -v shows model text and command execution live; the final answer goes to stdout and the process log to stderr.
cd /path/to/your/project ma -v 'explain the structure of this project' # Take supplementary context from stdin — it never lands on disk git diff | ma 'summarize these changes' # Allow writes inside the current directory and its descendants ma -v --write 'fix the config file' # Also allow the shell to use the network ma -v --write --net 'upgrade the project dependencies' # Load skills by name ma --skills code-review,explain 'review and explain these changes'
Writes and network are opt-in
By default common write operations and shell network commands are refused; model API requests are always allowed. The built-in Guard is a best-effort command check, not a security sandbox — use a container or virtual machine when you need real isolation.
When the context gets too long
Piped input exists only in the conversation and never lands on disk. When the context overflows, the program recovers in order of increasing cost: compact old turns first, then truncate the newest results, and only then truncate the original input. That last step always warns on stderr, because the omitted part can never be read back.
FAQ
Questions people actually ask.
Do I need Rust installed to run ma?
No. Releases ships prebuilt binaries for macOS (Apple Silicon) and Linux (x86_64): unpack one and run it. Rust 1.85+ and a C compiler are needed only to build from source.
Which models does it work with?
Any endpoint that speaks the OpenAI-compatible Chat Completions API and supports tool calling — a hosted API or a local server. Set BASE_URL, MODEL and API_KEY, either as environment variables or in the config file.
Can I pipe a file or a diff into it?
Yes. Anything on stdin is added to the conversation, and piped input exists only in the conversation — it never lands on disk. git diff | ma 'summarize these changes' is the typical use.
Does it work on Windows?
macOS (Apple Silicon) and Linux (x86_64) today. The macOS artifact needs Big Sur (11.0) or later; the Linux artifact needs glibc 2.34+ and does not run on musl distributions such as Alpine.
Is it safe to let it run shell commands?
Writes and network access are refused by default and must be enabled per run with --write and --net; model API requests are always allowed. The built-in Guard is a best-effort command check, not a security sandbox — use a container or virtual machine when you need real isolation.
Does it keep any state between runs?
No conversation state. Besides its config file, oneagent writes one timestamp so the once-a-day update notice fires at most once; --no-update-check disables that check.
How is this different from mini-agent?
Same project. It was renamed from mini-agent to oneagent ahead of its first crates.io release, because the old name was already taken there by an unrelated AI agent framework. The command is still ma, and the old GitHub URL redirects.