picocode
github.com/jondot/picocode- Category
- Developer Tools
- Rank
- No. 1164Tools index
Previous survey · No. 1159 ·
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Coding · Workflow Automation
- Interfaces
- CLI
- Builder
- jondot
- GitHub
- 62 stars
- Latest release
- v0.6.0
- Date
About
A minimal, high-performance Rust-based coding agent that works with multiple LLM providers (Anthropic, OpenAI, Gemini, DeepSeek, Ollama) for interactive CLI use, CI automation via named recipes, and small codemods. It offers persona-driven behavior, a safety-first confirmation model for destructive actions, and can be embedded as a Rust library.
What it does
picocode is a terminal program that gives a language model a small kit of tools: read, write and edit files, search text, list folders, run shell commands, and drive a browser when one is installed. You describe a task in plain English, as a one-off prompt or a chat session, and the model decides which tools to call to finish it. It ships as one compiled binary, and the same agent can be called from other Rust programs. File tools refuse any path outside the folder you launched it from.
Why it's ranked here
A coding agent you can audit in an afternoon. The core is a handful of source files under the MIT license, with eighteen model providers wired through one shared client layer, including local models through Ollama with no key required. The safety story is real but partial: deleting, moving, copying and shell commands stop for approval, while writing and editing files do not. It belongs here for people who want to read and bend the machinery, not as a replacement for the larger, more polished agents.
What's good
Folder confinement for file tools is enforced in code and covered by unit tests, including attempts to climb out with parent-directory steps and absolute paths. Approval prompts offer yes, no, or yes for the rest of the session, so a long job does not nag. A project config can pre-approve shell commands by pattern, which suits routine test and lint runs. Scripted recipes can fail a CI job when the model's answer matches a pattern you choose, turning a review prompt into a build gate. Search output is capped at fifty matching lines, which keeps the model's context small.
Tradeoffs
File writes and edits run without asking, even in the default mode, so a bad edit lands before you see it; keep work under version control. Pre-approval patterns are regular expressions tested against the whole command, and the shipped examples anchor only the start, so approving a harmless prefix also approves anything chained after it. The confinement check is purely textual and does not resolve symbolic links. Built-in default model names are dated, so name a model explicitly. The install script covers Linux and macOS on x86-64 and ARM only.
How to use it well
Best fit: a developer who wants a small, hackable agent for scripted chores in a repository under git, such as a security read or a lint-fix pass in CI, or who wants to embed an agent loop inside their own Rust service. Pin the model per task, write approval patterns anchored at both ends, and keep the no-prompt mode for throwaway checkouts. A project instructions file in the working folder steers it. It is terminal only, and nothing in the source wires in Model Context Protocol (MCP) servers, planning, or sub-agents.
Technical notes+
Built on rig-core 0.28 (Cargo.toml); src/agent.rs create_agent matches 18 provider strings, checks the matching API key env var, and defaults OLLAMA_API_BASE_URL to http://localhost:11434. build_rig_agent registers ReadFile, WriteFile, EditFile, GlobFiles, GrepText and ListDir unwrapped, and wraps MakeDir, Remove, MoveFile, CopyFile, Bash and (if which agent-browser succeeds) AgentBrowser in Guard, so write_file and edit_file never prompt. Bash auto-approval runs each regex in the bash auto_allow list in the tool config with is_match against the command string; picocode.yaml.example ships start-anchored patterns such as ^cargo test, which also match chained commands. Bash executes through duct_sh::sh_dangerous. validate_path in src/tools.rs normalises components lexically without canonicalize, with unit tests for parent escape and absolute paths. In src/main.rs the yolo flag is declared as Option<bool>, so clap expects a value rather than the bare flag the README shows. src/persona.rs get_persona reads a file when the persona name is an existing path, and load_agents_md appends a project instructions file in the working folder to the system prompt. The error_if field on Recipe in src/config.rs turns a regex match on the response into a non-zero exit. src/output.rs NoOutput auto-confirms while LogOutput always declines. default_model still names claude-3-5-sonnet-20241022, gemini-1.5-pro and grok-1.
Observed
- License
- MIT
- Language
- Rust, 2021 edition, async on tokio
- Interfaces
- CLI with chat, single-prompt and recipe modes, plus a library crate
- Library API
- Exports create_agent, AgentConfig and pluggable Output implementations
- Providers
- 18 provider names accepted, including local Ollama
- Install surface
- Shell script downloading release binaries for Linux and macOS on x86_64 and aarch64 into ~/.local/bin
- Approval model
- Delete, move, copy, make-dir, shell and browser tools require confirmation unless yolo; write and edit do not
- Tests
- Unit tests cover path confinement in the tools module
- Automation
- Recipes support an error_if regex that makes the process exit with an error
Read from README.md, Cargo.toml, src/main.rs, src/lib.rs, src/agent.rs, src/tools.rs, src/config.rs, src/persona.rs, src/output.rs, picocode.yaml.example, install.sh, LICENSE, examples/library_usage.rs.
What it can do
Interact with multiple LLM providers (Anthropic, OpenAI, Gemini, DeepSeek, Ollama) for coding assistance
User prompt/query → LLM-generated response or code
Run automation tasks via named recipes for CI pipelines
Recipe name/configuration → Automated task execution
Apply small codemods to source code
Codebase and codemod instructions → Modified source code
Switch agent behavior using persona modes
Persona selection → Adjusted agent behavior/tone
Prompt for confirmation before executing destructive actions
Destructive command/action → User confirmation prompt
Provide filesystem, search, and shell tools for the agent to use
File paths, search queries, or shell commands → File operations, search results, or command output
Embed the coding agent as a library within other Rust programs
Rust project integration → Embedded agent functionality
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.