Skip to main content

Zenve CLI — autonomous agent runtime for GitHub repos

Project description

zenve-cli

Autonomous agent runtime for a GitHub repo. No daemon, no server, no database — state lives in .zenve/ inside the repo.

See ARCHITECTURE.md for the full design.

Install

uv tool install zenve-cli      # recommended
pipx install zenve-cli         # alternative

Upgrade:

uv tool upgrade zenve-cli

From source (for development)

The CLI is a uv workspace member. From server/:

uv sync --package zenve-cli

Environment

Required:

Var Purpose
ZENVE_GH_TOKEN GitHub PAT with repo + issues scope (falls back to gh auth token)

Per-agent (optional):

Var Purpose
ZENVE_GH_{SLUG} Agent-specific GitHub token (e.g. ZENVE_GH_CODE_REVIEW for slug code-review)

Optional:

Var Purpose
ZENVE_WEBHOOK_URL POST structured events here
ZENVE_WEBHOOK_SECRET HMAC-SHA256 secret for X-Zenve-Signature

Note: Run ID is generated automatically. No ANTHROPIC_API_KEY needed at the CLI level — agent adapters pick up their own credentials.

Commands

zenve run                      Run all enabled agents
zenve run --agent dev          Run only one agent
zenve run --dry-run            Show plan, no writes
zenve snapshot                 Fetch GitHub state → .zenve/snapshot.json
zenve pipeline                 Display + validate the pipeline
zenve status                   Last run per agent
zenve init                     Scaffold .zenve/ interactively
zenve doctor                   Check repo setup
zenve agent ls                 List agents and enabled/disabled status
zenve agent logs <name>        Run history for an agent
zenve agent enable <name>      Enable an agent
zenve agent disable <name>     Disable an agent
zenve skills list              List available skills

All commands accept --repo PATH (default .).

Repo layout expected

The CLI does not scaffold .zenve/ by hand — use zenve init instead. Expected layout:

.zenve/
  settings.json              project config + pipeline map
  agents/
    {name}/
      settings.json          label, adapter, model, picks_up, mode
      runs/                  run result files (committed)

.zenve/snapshot.json is ephemeral and never committed.

Local dev loop

cd my-project
export ZENVE_GH_TOKEN=ghp_...   # or: gh auth login

uv run --package zenve-cli zenve doctor
uv run --package zenve-cli zenve run --dry-run
uv run --package zenve-cli zenve run

Or via the justfile at server/:

just cli run --dry-run

Execution model

  1. Resolve GitHub token (ZENVE_GH_TOKEN or gh auth token).
  2. Load .zenve/settings.json and scan .zenve/agents/* (skip enabled: false).
  3. Fetch a fresh GitHub snapshot → .zenve/snapshot.json.
  4. asyncio.gather over all enabled agents:
    • Filter snapshot by github_label + picks_up.
    • Claim the oldest unclaimed item (zenve:claimed label via GitHub API).
    • If mode is artifact_pr or code_pr: create a git worktree on a new branch.
    • Invoke the adapter (claude_code / open_code) against the agent dir.
    • On success: commit + push changes, open a PR (and auto-merge if artifact_pr).
    • Post-exit label transition using the pipeline map.
    • Write .zenve/agents/{name}/runs/{run_id}.json.
  5. git add .zenve/agents; commit with [zenve] prefix; push.

--dry-run skips claim, adapter execution, label writes, and commit.

Events

Every stage emits a structured event to .zenve/events.log (one JSON per line) and, if ZENVE_WEBHOOK_URL is set, POSTs the same JSON signed with X-Zenve-Signature: sha256=<hmac>.

See ARCHITECTURE.md for the event-type list.

Release workflow

When tagging a new release:

# Generate/update CHANGELOG.md
git-cliff --output CHANGELOG.md

# Commit the changelog
git add CHANGELOG.md
git commit -m "chore: update changelog for v1.0.0"

# Tag and push
git tag v1.0.0
git push && git push --tags

To preview only the next release (unreleased commits):

git-cliff --unreleased

To create a GitHub release with the changelog body:

git-cliff --unreleased --strip header | gh release create v1.0.0 --notes-file -

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

zenve_cli-0.1.4.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

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

zenve_cli-0.1.4-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file zenve_cli-0.1.4.tar.gz.

File metadata

  • Download URL: zenve_cli-0.1.4.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for zenve_cli-0.1.4.tar.gz
Algorithm Hash digest
SHA256 04ff8bb1bb5a35572886850597e5b5d343ca7fd3a21950860a0385bcf67707d0
MD5 f3e9ccfa8abf4e9c7a04bc5db6a833ee
BLAKE2b-256 564f768357364f2e67cc32175ff3b3274c820d59b9bebada0fe928c917f4ea64

See more details on using hashes here.

File details

Details for the file zenve_cli-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: zenve_cli-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for zenve_cli-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7f2232a0d9eeb917255af2afbcee2c0ec93b145f96db807a562ba8394c1b5579
MD5 38a0cc6e32c733b3ac299c0715e1011f
BLAKE2b-256 1392f0efd990fc0c5ff7727fe1cd7736c7a0a41c722097814c90b9b17d6827b6

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