repowren is a lightweight local coding agent for code repositories. It runs in the terminal, works directly from the current workspace, and uses constrained tools to inspect code, edit files, and run commands. Sessions and run artifacts stay in the repository's local .repowren/ directory.
It supports interactive sessions, one-shot tasks, resumable context, approval controls, and four model backends: DeepSeek, OpenAI-compatible APIs, Anthropic-compatible APIs, and Ollama.
Python 3.10 or later is required.
With uv:
uv syncOr install in editable mode in an existing Python environment:
pip install -e .The examples below use the module entry point. After installing the package, you can use repowren instead of python -m repowren.
Copy the example configuration and add only the credentials you need:
cp .env.example .envRepoWren searches for the nearest .env at or above the repository root. The file is ignored by Git; never commit real API keys.
DeepSeek is the default provider. Its minimum configuration is:
REPOWREN_DEEPSEEK_API_KEY="your-api-key"Available providers:
| Provider | Selection | Default model | Credentials |
|---|---|---|---|
| DeepSeek | Default or --provider deepseek |
deepseek-v4-pro |
REPOWREN_DEEPSEEK_API_KEY |
| OpenAI-compatible | --provider openai |
gpt-5.4 |
REPOWREN_OPENAI_API_KEY or REPOWREN_RIGHT_CODES_API_KEY |
| Anthropic-compatible | --provider anthropic |
claude-sonnet-4-6 |
REPOWREN_ANTHROPIC_API_KEY or REPOWREN_RIGHT_CODES_API_KEY |
| Ollama | --provider ollama |
qwen3.5:4b |
None |
The OpenAI-compatible and Anthropic-compatible providers default to right.codes endpoints. See .env.example for provider-specific base URL, model, and key variables. --model and --base-url override those settings for a single invocation.
Provider selection follows:
--provider > REPOWREN_PROVIDER > deepseek
Values in .env are literal. Variable references such as $REPOWREN_RIGHT_CODES_API_KEY are not expanded.
To use local Ollama:
ollama serve
ollama pull qwen3.5:4b
uv run python -m repowren --provider ollamaStart an interactive session in the current repository:
uv run python -m repowrenWork in another repository:
uv run python -m repowren --cwd /path/to/repoRun a one-shot task:
uv run python -m repowren "inspect the test failures and propose a fix"Resume the most recent session:
uv run python -m repowren --resume latest--max-steps defaults to 20, and --max-new-tokens defaults to 4096. Override either limit when needed:
uv run python -m repowren --max-steps 6 --max-new-tokens 2048Run python -m repowren --help for all CLI options.
/help: Show built-in commands/memory: Show distilled working memory/session: Show the current session file path/reset: Clear the current session state/exitor/quit: Exit the REPL
Higher-risk actions such as shell execution and file writes follow the selected approval policy:
--approval ask: Ask before running the action--approval auto: Allow the action automatically--approval never: Deny the action
Sessions are stored in .repowren/sessions/. Run artifacts are stored in .repowren/runs/<run_id>/ and normally include task_state.json, trace.jsonl, and report.json.
To redact additional environment variables from traces and reports, set REPOWREN_SECRET_ENV_NAMES to a comma-separated list or repeat --secret-env-name NAME on the command line.
uv run python -m pytest tests -q
uv run ruff check repowren tests scripts