Skip to main content

End-user CLI for Bodhi (the coding assistant). First capability: `bodhi explain <path>`.

Project description

bodhi-cli

End-user CLI for Bodhi — a coding assistant grounded in attestation + modular decomposition.

Pre-release. This README documents commands that ship today; the package is at version 0.0.0 until the v0.1.0 trigger lands per ADR-0050. The empirical defenses of Bodhi's two non-negotiable wedges (modular decomposition + verifiability) are operator-gated and not yet published.

Commands

  • bodhi explain <path> — read a local code file, return a Claude-generated explanation rendered in the terminal with the project's design-token theme.
  • bodhi review [diff] — review a unified diff file (or stdin when omitted) using Claude. Use bodhi review - to read from stdin explicitly.
  • bodhi commit-msg [diff] — generate a Conventional-Commits-style commit message from a unified diff (file or stdin).
  • bodhi upgrade-self — re-install bodhi from the workspace source so the PATH binary tracks main. Workspace-only convenience for contributors running from a checkout.
  • bodhi --version (or -V) — print the package version and exit.
  • bodhi --help — show the top-level help and exit.

Configuration

bodhi-cli resolves required values (ANTHROPIC_API_KEY, BODHI_ANTHROPIC_MODEL, BODHI_MAX_INPUT_BYTES, and per-command _MAX_TOKENS caps) from these sources, in order — the first match populates BodhiCliSettings. Shell environment variables always win on top.

  1. Explicit overrideBODHI_CONFIG_PATH=/path/to/config.toml. Read as TOML.
  2. Workspace infra/.env — relative to the current directory. Used by repo-cloned workflows.
  3. Workspace .env — relative to the current directory. Same shape as infra/.env.
  4. User-scoped ~/.config/bodhi/config.toml — for pip-installed users with no repo clone. Honors XDG_CONFIG_HOME when set (e.g. $XDG_CONFIG_HOME/bodhi/config.toml).

The TOML schema uses lowercased env-var names as keys:

anthropic_api_key = "sk-ant-..."
bodhi_anthropic_model = "claude-haiku-4-5-20251001"
bodhi_max_input_bytes = 200000
bodhi_explain_max_tokens = 1024
bodhi_review_max_tokens = 1024
bodhi_commit_msg_max_tokens = 512

Recommended permissions for the user-scoped config: chmod 600 ~/.config/bodhi/config.toml (the file holds your Anthropic API key). The CLI does not enforce permissions — your filesystem, your call.

See packages/bodhi_cli/src/bodhi_cli/settings.py for the canonical surface.

Documentation

  • Reference: docs/reference/cli/bodhi.md — manual reference for each command.
  • Decisions: ADRs at docs/adr/ — the directional calls behind this surface live in ADR-0002 through ADR-0013, with ADR-0050 covering the release cadence and ADR-0060 covering license + open-frontier posture.
  • Tutorials: docs/tutorials/ — end-user learning paths (the v0.1.0 getting-started tutorial lands separately under issue tracking T1-E).

License

Apache 2.0 — see LICENSE at the repository root. The wheel bundles LICENSE per Apache 2.0 §4(a) (T1-I per the v0.1.0 readiness spike at docs/spikes/bodhi-cli-v0.1.0-readiness.md).

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

bodhi_cli-0.1.0.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

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

bodhi_cli-0.1.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file bodhi_cli-0.1.0.tar.gz.

File metadata

  • Download URL: bodhi_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bodhi_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f003743633cfdcc2d4070b9d1c057cc67e7afa711b504412a0f4350526704761
MD5 6b9f1731a505ed595a048454970681cf
BLAKE2b-256 6f66a8c82b8ea735ccc88d1b5fd9f81a15fe3fba91b08c74c01eb5b5c01ba655

See more details on using hashes here.

Provenance

The following attestation bundles were made for bodhi_cli-0.1.0.tar.gz:

Publisher: pypi-publish.yml on ramsudharsan75/bodhi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bodhi_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: bodhi_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for bodhi_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81eae7456e6bfe774fda52368faf9aff358dc124a1b5afc5de1ae6cbe5a7cfd6
MD5 6b1c588ef91a5e268b95f9852c45cb00
BLAKE2b-256 9f54e67f5ee470088955f46039f9fbf806741575f27dca5e780dd2a5ae8863ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for bodhi_cli-0.1.0-py3-none-any.whl:

Publisher: pypi-publish.yml on ramsudharsan75/bodhi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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