Tiny local coding CLI with a small tool surface
Project description
oy-cli
Tiny local coding CLI for simple shell interactive code editing and auditing.
oy is intentionally small:
- one-shot Typer CLI, not a full TUI
- decent progress output, not advanced orchestration
- one main code file as the implementation target
- intentionally small and auditable
The point is to keep the tool surface boring, explicit, and easy to audit (most existing tools and agents are large/complex or locked to specific providers).
Design Notes
- follow OWASP-minded secure defaults
- prefer the grugbrain.dev philosophy: simple, direct, low-magic solutions
- run inside a locked-down container with limited filesystem, process, and network permissions if you want to use it safely
- de-scope advanced surfaces like todos, skills, and MCPs (bash is fine, most tools have good CLI interfaces)
Tool Surface
Initial tools:
write: create new files withpathlibedit: modify existing files withpathlibread/writepatch: apply unified diffs withpatch(via subprocess)list: list directory contents withpathlibread: read files withpathlibgrep: search text withsubprocess+ripgrepglob: find files and directories withpathlib.globbash: run shell commands withsubprocessviabash -lcas a last resortwebfetch: fetch web content withhttpx
That is enough for useful local coding work and security audits.
Known Issues
Some LLMs occasionally emit duplicated tool call arguments. oy includes a workaround that detects and recovers from this by hunting for valid JSON around the midpoint of the malformed response.
Requirements
- Python 3.14+
bashpatchOPENAI_API_KEYin the environment, OR AWS credentials for automatic Bedrock setup
ripgrep is included as a PyPI dependency. If AWS credentials are available (via AWS_PROFILE, AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY, or ~/.aws/credentials), oy will automatically generate Bedrock tokens. If bash, rg, or patch are missing, oy exits with install guidance instead of silently falling back.
Installation
Preferred:
uv tool install oy-cli
Alternative:
pip install oy-cli
This installs the oy command.
Quick Start using AWS Bedrock (automatic)
If you have AWS credentials configured (via AWS_PROFILE, environment variables, or ~/.aws/credentials), Bedrock is automatically configured:
oy models
oy model moonshotai.kimi-k2.5
oy "inspect this repository and suggest the smallest safe fix"
To manually export Bedrock tokens (for use in other tools or scripts):
eval "$(oy bedrock-token)"
oy models uses the OpenAI SDK with client.models.list(). oy model <id> saves your default model.
With OpenAI-compatible manual creds:
export OPENAI_BASE_URL=https://your-endpoint.example/v1
export OPENAI_API_KEY=...
oy "summarize this project and list the next changes"
With OpenAI's default API endpoint:
export OPENAI_API_KEY=...
oy "summarize this project and list the next changes"
Runtime Behavior
- simple CLI flow, no REPL and no TUI
- simple commands:
oy "...",oy bedrock-token,oy models,oy model <id> - model chooses from a small set of local tools
- file operations are scoped to the working directory
- required tools are checked up front
- indeterminate progress is shown while waiting on API calls
- default model/tool budgets are intentionally high for longer build-style runs
Model Selection
oy model
oy models
oy model moonshotai.kimi-k2.5
Security
oy can run shell commands and modify files. Treat it like an automation tool with real permissions.
Recommended posture:
- run it in a container or similarly constrained environment
- mount only the project/dirs you want it to touch
- avoid broad host access
- do not expose secrets you do not want shell commands to inherit
Contributing
Development and release notes live in CONTRIBUTING.md.
License
Licensed under the Apache License 2.0. See LICENSE.
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 oy_cli-0.1.1.tar.gz.
File metadata
- Download URL: oy_cli-0.1.1.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7684b4b5310f5ccc1b8af2557b7d63a2dac1d9d31072f27710b2d8d28bb87e8a
|
|
| MD5 |
5eabe41fa427078d0916bb003d22be10
|
|
| BLAKE2b-256 |
b0ad3f3d4eef9d4cf9b2ec93c7830e1e32b9f95e255b0253d51f6d8119ab58a9
|
Provenance
The following attestation bundles were made for oy_cli-0.1.1.tar.gz:
Publisher:
release.yml on wagov-dtt/oy-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oy_cli-0.1.1.tar.gz -
Subject digest:
7684b4b5310f5ccc1b8af2557b7d63a2dac1d9d31072f27710b2d8d28bb87e8a - Sigstore transparency entry: 1096368210
- Sigstore integration time:
-
Permalink:
wagov-dtt/oy-cli@d81b30dbd3173cb197de469cf991120ba0fb65ce -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/wagov-dtt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d81b30dbd3173cb197de469cf991120ba0fb65ce -
Trigger Event:
release
-
Statement type:
File details
Details for the file oy_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: oy_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92c2d924bbeb69dfe54757d96d7e1d76a3bea6c7cc4fbca8db4296a5bf575abc
|
|
| MD5 |
19cc8d60f50c4112e89e634977ecd911
|
|
| BLAKE2b-256 |
05d86086d768d9f2aa2a03b1b2649dc5653926ce6958762a1d77602a2a63458a
|
Provenance
The following attestation bundles were made for oy_cli-0.1.1-py3-none-any.whl:
Publisher:
release.yml on wagov-dtt/oy-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oy_cli-0.1.1-py3-none-any.whl -
Subject digest:
92c2d924bbeb69dfe54757d96d7e1d76a3bea6c7cc4fbca8db4296a5bf575abc - Sigstore transparency entry: 1096368215
- Sigstore integration time:
-
Permalink:
wagov-dtt/oy-cli@d81b30dbd3173cb197de469cf991120ba0fb65ce -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/wagov-dtt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d81b30dbd3173cb197de469cf991120ba0fb65ce -
Trigger Event:
release
-
Statement type: