A local-first coding agent for the terminal, with Python-defined commands and tools.
Project description
Lovelaice
A sovereign, local-first coding agent for the terminal. Single ReAct loop over a small built-in tool set, yolo by default. Two modes:
- Interactive — full-screen Textual TUI:
lovelaice - One-shot — streams to stdout and exits:
lovelaice <prompt>
Install
pipx install lovelaice
Configure
lovelaice --init writes a .lovelaice.py in the current directory.
This file grounds the workspace: when you run lovelaice from any
subdirectory, it walks up to the nearest .lovelaice.py and chdirs
to its directory before running. Exactly one config grounds the
workspace — there is no stacking.
Set OPENROUTER_API_KEY in your environment before running.
export OPENROUTER_API_KEY=sk-or-...
lovelaice
Commands and tools
The .lovelaice.py registers tools and commands as decorators on a
Config object. Built-in tools: bash, read, write, edit,
list, glob, grep, fetch. Add your own with @config.tool.
See know-how/writing-a-tool.md and know-how/writing-a-command.md.
Thinking mode
Add thinking="high" (or "low"/"medium", or an integer token
budget) on a model entry to enable OpenRouter's reasoning passthrough.
Reasoning chunks render in a separate dim-italic panel above the
agent's reply. Non-OpenRouter base URLs silently ignore the knob —
v1 does not translate reasoning protocols across providers.
MCP
Pass mcp=[...] to Config(...) to spawn stdio MCP servers and
register their tools. Tool names are prefixed mcp:<server>:<tool>.
config = Config(
models=MODELS,
prompt=PROMPT,
mcp=[
{"name": "filesystem", "command": "npx",
"args": ["@modelcontextprotocol/server-filesystem", "."]},
],
)
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lovelaice-2.0.3.tar.gz.
File metadata
- Download URL: lovelaice-2.0.3.tar.gz
- Upload date:
- Size: 151.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9329eb343b0977d36713fd06f109532e25b9eb13dd2ec251e6963077a9c87957
|
|
| MD5 |
1dadf409065b8a1d736c32a4d0ae7dea
|
|
| BLAKE2b-256 |
7d6393f437390b6aae295a66f3de0f640d1ef585eb8fda2d5335b437d283136e
|
File details
Details for the file lovelaice-2.0.3-py3-none-any.whl.
File metadata
- Download URL: lovelaice-2.0.3-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b51c25e643dbd5afb82ac45e5d540bd2e779a8d4cb5892d2bf37eade5e5f7854
|
|
| MD5 |
41e1f89118ca65be27b9d4c3c6856da7
|
|
| BLAKE2b-256 |
1311bafa6dd60566213f9badf18958c3ae9e8a3fd644caefc8bf8324735d6875
|