Skip to main content

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:

  1. A library — the primary consumer is another agent harness importing this. That is the surface carrying the value, and it is designed first.
  2. A CLIshell 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; --apply commits. Agents call CLIs in loops, so safe-by-default is mandatory.
  • Every PR bumps the version — every push to main publishes 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 identityculture.yaml (suffix + backend) and the matching resident prompt file (AGENTS.colleague.md, since this agent runs backend: colleague). CLAUDE.md is 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

shell_cli-0.7.2.tar.gz (166.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shell_cli-0.7.2-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file shell_cli-0.7.2.tar.gz.

File metadata

  • Download URL: shell_cli-0.7.2.tar.gz
  • Upload date:
  • Size: 166.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

Hashes for shell_cli-0.7.2.tar.gz
Algorithm Hash digest
SHA256 47a64fec134e0399567cf8e19a3f76800fdbee0558c7138c2f1292c708014ba6
MD5 58d9f83e1c4e690afa50bb233016c0ef
BLAKE2b-256 1aad112e539e713b687483b8a27d4d9e57462dfbaef9725cfc031059983059fb

See more details on using hashes here.

File details

Details for the file shell_cli-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: shell_cli-0.7.2-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

Hashes for shell_cli-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e58dd2b4bf152144a4b5c0f6637f25e3609aef8ab4d58b860310a1d6e59522f6
MD5 c46e2d885daab1df9da277eac7fe0163
BLAKE2b-256 b51a2dacbaaf2e0a0bfe746c18be10db47b21e249f32927208f26f66037ebc9b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page