Metadata-Version: 2.5
Name: agentgov-cli
Version: 0.1.1
Summary: AgentGov CLI — wrap Claude Code, bind work items, check gateway health.
Author: AgentGov Contributors
License: Apache-2.0
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.2
Requires-Dist: pydantic>=2.9.0
Requires-Dist: pynacl>=1.5.0
Requires-Dist: rich>=13.9.0
Requires-Dist: typer>=0.12.5
Requires-Dist: uuid7>=0.1.0
Provides-Extra: dev
Requires-Dist: mypy>=1.11.2; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest>=8.3.0; extra == 'dev'
Requires-Dist: ruff>=0.6.9; extra == 'dev'
Description-Content-Type: text/markdown

# agentgov

The developer-laptop CLI for AgentGov.

Wraps Claude Code to bind sessions to work items and enforce governance from a signed policy snapshot. Runs alongside `agentgov-gateway` (the local proxy) — this CLI handles login, device registration, session wrapping, work-item binding, and diagnostics.

Part of the AgentGov project — see [github.com/deepakahu/agentGov](https://github.com/deepakahu/agentGov) for the full monorepo.

## Install

```bash
pip install agentgov agentgov-gateway
```

## First-time setup

```bash
# Attach this machine to your AgentGov control tower
agentgov login --tower https://your-agentgov.vercel.app

# Register this device (generates an X25519 keypair, gets a gtw_ token)
agentgov register-device --name "$(hostname)"

# Drop Claude Code hooks + statusline + slash command into ~/.claude/
agentgov install

# Start the gateway (background)
agentgov-gateway &
```

## Every day

```bash
# Run Claude Code through the governed gateway
agentgov wrap claude

# Bind the current session to a work item
# (or use the /workitem slash command inside Claude Code)
agentgov workitem PROJ-1234
```

## Diagnose

```bash
agentgov status    # what's my current binding, tokens, quota
agentgov doctor    # is everything wired correctly
```

## Commands

- `agentgov login` — attach this machine to a user in the control tower
- `agentgov register-device` — generate device keypair + register with tower
- `agentgov install` — drop client assets into `~/.claude/`
- `agentgov wrap <cmd>` — wrap `claude` (or another command) in a governed session
- `agentgov workitem <ref>` — bind the current session to a work item
- `agentgov status` — show current binding + totals
- `agentgov doctor` — diagnose the installation

## License

Apache-2.0
