Agent-first CLI and agent owning the file-and-shell tool surface for AI coding agents: read, write, edit, list, view media, and gated shell execution, with path confinement and an operator approval policy. Pure-stdlib core, extracted from colleague so any host imports one safe execution layer.
Project description
shell-cli
The file-and-shell tool surface for AI coding agents: read, write, edit, list,
view media, and gated shell execution — with path confinement and an operator
approval policy. Pure-stdlib core, extracted from
colleague so any harness imports
one execution layer instead of reimplementing it, and reimplementing its safety
model with it.
Repo token shell-cli, console command shell, import package shell,
PyPI distribution shell-cli.
⚠️ A guard, not a sandbox
Read this before you rely on anything here.
The execution gate is best-effort. It inspects the command string it is
handed, so it is bypassable by sh -c, pipelines, shell expansion, here-docs,
and any interpreter that takes code as an argument. There is no namespace,
container, or seccomp isolation.
It protects against accidental and careless model behaviour. It does not protect against an adversarial one, and it is not a security boundary to put untrusted input behind.
Full detail — assets, actors, known bypasses, and what real isolation would
require — in docs/threat-model.md. The same posture is
readable in-band via shell explain safety, and
tests/test_honesty.py fails the build if any shipped
surface drops the disclaimer or claims isolation.
Status
Scaffold. The agent-first CLI skeleton is real and green; the six
primitives, the path confinement, and the approval policy are still being
extracted from colleague. Only the introspection verbs below are implemented
today. The build brief and current scope live in
issue #1.
What this will be
Two surfaces, in priority order:
- A library — the primary consumer is another agent harness importing this. That is the surface carrying the value, and it is designed first.
- A CLI —
shell read,shell run,shell edit, so a human or an agent can drive the same gated surface from a terminal and watch the policy decide.
Four constraints hold it together:
- Pure-stdlib core, zero base dependencies. colleague allow-lists exactly its sanctioned base deps; a third-party dependency here means colleague cannot import this package at all. Optional features go behind extras.
- A guard, not a sandbox — see above.
- Write verbs are dry-run by default;
--applycommits. Agents call CLIs in loops, so safe-by-default is mandatory. - Every PR bumps the version — every push to
mainpublishes to PyPI.
Quickstart
uv sync
uv run pytest -n auto # run the test suite
uv run shell whoami # identity from culture.yaml
uv run shell learn # self-teaching prompt (add --json)
uv run shell explain safety # the safety posture, in-band
uv run teken cli doctor . --strict # the agent-first rubric gate CI runs
CLI
| Verb | What it does |
|---|---|
whoami |
Report this agent's nick, version, backend, and model from culture.yaml. |
learn |
Print a structured self-teaching prompt. |
explain <path> |
Markdown docs for any noun/verb path (explain safety for the threat model). |
overview |
Read-only descriptive snapshot of the agent. |
doctor |
Check the agent-identity invariants (prompt-file-present, backend-consistency). |
cli overview |
Describe the CLI surface itself. |
Every command supports --json. Results go to stdout, errors/diagnostics to
stderr (never mixed). Exit codes: 0 success, 1 user error, 2 environment
error, 3+ reserved.
Repo furniture
- Mesh identity —
culture.yaml(suffix+backend) and the matching resident prompt file (AGENTS.colleague.md, since this agent runsbackend: colleague).CLAUDE.mdis the Claude Code prompt and the contributor guide. - The canonical guildmaster skill kit under
.claude/skills/, vendored cite-don't-import. Provenance and the re-sync procedure:docs/skill-sources.md. - Build + deploy baseline — pytest, lint, the agent-first rubric gate, and PyPI Trusted Publishing wired into GitHub Actions.
License
Apache 2.0 — see LICENSE.
Project details
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 shell_cli-0.8.0.tar.gz.
File metadata
- Download URL: shell_cli-0.8.0.tar.gz
- Upload date:
- Size: 170.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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 |
d2184fef8aa57b3af572533ee40f676ab3d8ca3ba911da25cf54024a21c637a3
|
|
| MD5 |
ddd5aebbc3e10d91225d8c29692c4e65
|
|
| BLAKE2b-256 |
359566dc5af61cc964711e5c1f91198779f69d5b3c9cb8fb00470b542b21db7b
|
File details
Details for the file shell_cli-0.8.0-py3-none-any.whl.
File metadata
- Download URL: shell_cli-0.8.0-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","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 |
d65d2c7160b42a65ea221b43a6bde6aa808a59b598e68289cfdaf2220a7d2b98
|
|
| MD5 |
e6f00643101ba16521edba4bea2123ca
|
|
| BLAKE2b-256 |
048ea3c0381bcfeb2a45fed9d897b7750dd2e5c63b9e01663218d8e11827f48f
|