Skip to main content

Wire0

Minimal coding agent CLI. Wire your model to the repo.

Wire0 is a small Python REPL that connects an OpenRouter model to your workspace with eight tools — file search, read/write/patch, foreground shell, and detached background shells. It streams responses, runs tools in parallel, and caches prompts for long sessions.

Requirements

Quick start

pip install wire0
wire0

Windows (from source)

git clone https://github.com/as9coder/wire0.git
cd wire0
.\setup.bat

macOS / Linux (from source)

git clone https://github.com/as9coder/wire0.git
cd wire0
chmod +x setup.sh && ./setup.sh

Manual install from clone

pip install .
# or editable:
pip install -e .

API key — prompted on first run, or set anytime with /key. Saved to ~/.wire0/config.json. The OPENROUTER_API_KEY environment variable overrides the saved key.

If you used the old Agent0 name, Wire0 auto-imports ~/.agent0/config.json on first run.

Run

wire0                    # workspace = current directory
wire0 D:\myproject       # workspace = specific path
wire0 --plain            # skip welcome screen

Dev launcher (editable install from clone):

.\run.ps1

CLI

Input Action
/key Prompt for OpenRouter API key (hidden input)
/key sk-or-... Set key inline
/model Show current OpenRouter model id
/model provider/model Switch model (any OpenRouter id, saved to config)
/context or /ctx Show context usage (limit + filled tokens from OpenRouter)
/clear Reset conversation and cache session
/exit Quit
Ctrl+C (idle) Quit with styled farewell
Ctrl+C (agent running) Interrupt current turn — CLI stays open

Prompt history is stored in ~/.wire0_history.

/context fetches the model's context limit from OpenRouter's models API and counts current prompt tokens via a minimal usage probe (~1 output token).

Environment

Variable Default Description
OPENROUTER_API_KEY — Overrides saved key
WIRE0_MODEL openrouter/owl-alpha OpenRouter model id
WIRE0_CACHE_TTL 1h Prompt cache TTL (ephemeral)
WIRE0_TUI 1 Set to 0 to disable welcome screen

Tools

All tools accept batch arguments — the agent is instructed to pass arrays of paths, patches, or commands in a single call rather than looping one item per turn.

Tool Purpose
grep Regex search across files/dirs (include="*.py", ignore_case)
list_dir List directory contents
read_file Read files with line numbers (offset, limit)
patch_file Surgical edit — replace unique old string with new
write_file Create or overwrite files (new files only; prefer patch for edits)
delete_path Delete files or directories
shell_run Foreground shell — one persistent session, merged transcript
bg_shell Detached shell — long-running servers, survives CLI exit

shell_run vs bg_shell

  • shell_run — sync work: tests, builds, git, installs. One session per CLI lifetime. Batch with commands=["npm install","npm test"]. Call with no commands to refresh a still-running command. Not for servers.
  • bg_shell — async work: dev servers, docker, watch mode. Actions: start, output, list, kill. Jobs live in ~/.wire0/background/ and persist after you exit Wire0.

How it works

Each turn:

  1. Workspace path and file tree (names only) are injected into the system prompt.
  2. The model streams a response; tool calls run in parallel (up to 8 workers).
  3. Tool results are appended and the loop continues until the model stops calling tools.
  4. OpenRouter prompt caching keeps system instructions, tool schemas, and session stable across turns.

The TUI shows a braille spinner while thinking, tool names while working, streamed assistant text, and dim cache stats when available.

Troubleshooting

ModuleNotFoundError: No module named 'wire0'

The wire0 command exists but the package install is broken. From the repo folder:

.\repair.bat

Or manually:

pip install /path/to/wire0 --force-reinstall

wire0 not recognized

Add Python's Scripts folder to your PATH, or run:

python -m wire0

Development

pip install -e ".[dev]"
python -m unittest discover -s tests -v

CI runs tests on Ubuntu and Windows with Python 3.11 and 3.12.

Publish to PyPI (maintainers)

$env:TWINE_PASSWORD = "pypi-..."   # token from pypi.org/manage/account/token/
.\publish.ps1

Or add PYPI_API_TOKEN to GitHub repo secrets — pushes to v* tags auto-publish via .github/workflows/publish.yml.

Project layout

wire0/
  cli.py              # REPL, commands, Ctrl+C interrupt
  llm.py              # OpenRouter streaming + tool loop
  tools.py            # Tool implementations and JSON schemas
  context.py          # /context — OpenRouter usage + limits
  logo.py             # ASCII wordmark
  shell.py            # Foreground shell session
  bg_shell.py         # Detached background jobs
  cache.py            # OpenRouter prompt caching
  workspace.py        # Workspace path + file tree
  config.py           # API key + model in ~/.wire0/config.json
  spinner.py          # Braille status indicator
  tui_experimental.py # Optional welcome screen
setup.bat / setup.sh  # One-click install
repair.bat / repair.ps1  # Fix broken global install

Config on disk

Path Contents
~/.wire0/config.json OpenRouter API key and saved model
~/.wire0/background/ Background job registry and logs
~/.wire0_history CLI prompt history

License

MIT — see LICENSE.

Metadata

Release files for wire0 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wire0 0.1.1
File Size Uploaded Provenance Actions
wire0-0.1.1.tar.gz 24.7 kB Without provenance Details for wire0-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wire0 0.1.1
File Interpreter ABI Platform Actions
wire0-0.1.1-py3-none-any.whl Python 3 none any Details for wire0-0.1.1-py3-none-any.whl

Total release size: 49.8 kB

Release files / wire0-0.1.1.tar.gz

Download URL wire0-0.1.1.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e2396413a6323c24ba7ac4d0535c0e08e142cc6bd794c04f77a6d24eaaa98ee2
BLAKE2b-256 checksum
How to use checksums
7daf7200aca6b9a5075e9606f45d989a32fc55aaca6a4e1ab501ef57eff1d216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / wire0-0.1.1-py3-none-any.whl

Download URL wire0-0.1.1-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdd0c7f9d0bfb3f4d2fc096ebec6ba0b7af512ac42ac475426e05294ba5216f6
BLAKE2b-256 checksum
How to use checksums
96104d7240e4fc0006e6120e96d08bcbb6120c96fc3b917bac34b348caf59dab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for wire0 0.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page