{
  "markdown": "<!-- mcp-name: io.github.sseshachala/conduct-cli -->\n# conduct-cli\n\nOfficial CLI for [Conduct AI](https://conductai.ai) — install AI agents, manage projects, run end-to-end tests, and enforce team AI policies with ConductGuard.\n\nRuns on Linux, macOS, and Windows. Python 3.9–3.12.\n\n![Conduct CLI demo — whoami, switch workspaces with Guard policy sync, and run an agent](assets/conduct-cli-demo.gif)\n\n## Install\n\n```bash\npip install conduct-cli\n```\n\n## Quick start\n\n```bash\n# Authenticate (one-time)\nconduct login \\\n  --server https://api.conductai.ai \\\n  --token cond_agt_xxx \\\n  --workspace <workspace-id>\n\n# Browse available agents\nconduct playbooks\n\n# Create a project and install all agents in one shot\nconduct install-all --project DevOps --repo owner/repo\n\n# List installed agents\nconduct agents\n\n# Run a test trigger on any agent\nconduct test \"PR Reviewer\"\nconduct test --all\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `conduct login` | Save connection config to `~/.conduct/config.json` |\n| `conduct projects` | List all projects |\n| `conduct create project <name>` | Create a project |\n| `conduct delete project <name>` | Delete a project and all its agents |\n| `conduct reset project <name>` | Delete all agents in a project (clean slate) |\n| `conduct playbooks` | Browse available playbooks |\n| `conduct playbooks <slug>` | Show required inputs for a playbook |\n| `conduct install <slug>` | Install one agent from a playbook |\n| `conduct install-all` | Install all 12 playbooks into a project |\n| `conduct agents` | List all installed agents |\n| `conduct test <name>` | Fire test trigger on an agent and stream results |\n| `conduct test --all` | Test every playbook-based agent |\n\n## Authentication\n\nGenerate an agent token from **Settings → Agents → Issue token** in the Conduct AI dashboard. Tokens start with `cond_agt_` and are stored as SHA-256 hashes — the plaintext is shown only once.\n\n```bash\nconduct login --server https://api.conductai.ai --token cond_agt_xxx --workspace <id>\n```\n\n## Install all agents\n\n```bash\n# Installs all 12 playbooks into a project, pointed at your GitHub repo\nconduct install-all --project DevOps --repo myorg/myrepo\n```\n\nIf the project doesn't exist it's created automatically. Use `--input key=value` to override any playbook input.\n\n## Test agents\n\n```bash\n# Test a single agent (fires synthetic test payload, streams run events)\nconduct test \"Autopilot Quick\"\n\n# Test all playbook-based agents in sequence\nconduct test --all\n```\n\nExit code is `0` if all pass, `1` if any fail — works in CI.\n\n---\n\n## ConductGuard\n\nConductGuard is AI tool fleet management — your security team sets policies once and they're enforced automatically across every developer's Claude Code, Cursor, and Windsurf session.\n\n### How it works\n\n```\nAdmin configures policies and budgets in the Guard dashboard\n    └─ developers are workspace members automatically — no invite step needed\n\nDeveloper runs: conduct guard sync\n    ├─ pulls latest policy to ~/.conductguard/policy.json\n    ├─ writes PreToolUse hook → ~/.conductguard/hook.py\n    ├─ registers hook → ~/.claude/settings.json\n    └─ registers conductguard-mcp → ~/.claude/settings.json (mcpServers) + Codex\n\nEvery Claude Code tool call:\n    ├─ PreToolUse hook fires (hook.py) → checks policy → block / warn / audit\n    └─ Event posted async to ConductGuard API → visible in Activity feed\n```\n\n### Developer setup\n\n```bash\npip install conduct-cli\n\n# Authenticate (already done if you use Conduct)\nconduct login --server https://api.conductai.ai --api-key <api-key>\n\n# Sync Guard — installs hook + MCP, pulls policies\nconduct guard sync\n```\n\nThat's it. Policy enforcement is active from the next tool call.\n\n### Guard commands\n\n| Command | Description |\n|---------|-------------|\n| `conduct guard sync` | Pull latest policy, write hook to `~/.conductguard/hook.py`, register hook + MCP |\n| `conduct guard status` | Show today's spend, session count, and violations |\n| `conduct guard audit [--since 7d]` | Print recent guard events in a table |\n| `conduct verify [--evidence FILE] [--strict] [--format json]` | Map guard events to OWASP Agentic Top 10; exit 1 in CI if blocked events (--strict) |\n| `conduct guard discover` | Scan local environment for AI agents; report Guard coverage % |\n| `conduct guard discover --register` | Register discovered agents under Guard |\n\n### Advisory mode\n\nWhen advisory mode is enabled by your security admin, all policy violations are logged as \"audited\" instead of blocked — the developer sees a note but the tool call proceeds. The hook still posts every event to the audit log.\n\nTo check if advisory mode is active:\n```bash\nconduct guard sync   # shows \"· advisory\" badge if active\nconduct guard status\n```\n\n### conduct verify\n\n```bash\n# Map last 24h of guard events to OWASP Agentic Top 10\nconduct verify\n\n# Use a saved evidence file\nconduct verify --evidence ./conduct-evidence.json\n\n# CI mode — exit 1 if any blocked events\nconduct verify --strict\n\n# JSON output for downstream tooling\nconduct verify --format json\n```\n\nOWASP mapping: `no-rm-rf` → A04 Excessive Agency, `no-sudo` → A09 Privilege Escalation, `policy_signature_invalid` → A07 Insufficient Monitoring, etc. All 10 categories covered.\n\n### How the PreToolUse hook works\n\nWhen you run `conduct guard sync`, the CLI writes a Python script to `~/.conductguard/hook.py` and registers it as a `PreToolUse` hook in `~/.claude/settings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \".*\",\n        \"hooks\": [{ \"type\": \"command\", \"command\": \"python3 ~/.conductguard/hook.py\" }]\n      }\n    ]\n  }\n}\n```\n\nBefore every tool call, Claude Code runs the hook. The hook:\n\n1. Reads `tool_name` and `tool_input` from stdin (JSON)\n2. Loads `~/.conductguard/policy.json` (the team ruleset)\n3. Matches the call against each rule (`match_tool`, `match_pattern`, `match_path_pattern`)\n4. Takes the rule's action:\n   - `block` — prints the policy message, exits with code `2` (Claude Code aborts the tool call)\n   - `warn` — prints the message, exits `0` (tool call proceeds, developer is notified)\n   - `audit` — posts an event silently, exits `0`\n5. Posts an audit event to `POST /guard/events` asynchronously (fire-and-forget, never slows the tool call)\n\n### How conductguard-mcp works\n\n`conduct guard sync` also registers an MCP server entry in `~/.claude/settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"conductguard\": {\n      \"command\": \"conductguard-mcp\",\n      \"args\": [\"--team\", \"<team-id>\", \"--token\", \"<member-token>\"]\n    }\n  }\n}\n```\n\nClaude Code starts `conductguard-mcp` as a subprocess on launch and keeps it running. It communicates via JSON-RPC 2.0 over stdin/stdout (MCP stdio transport).\n\nThe MCP server exposes three tools that Claude can call proactively:\n\n| Tool | Description |\n|------|-------------|\n| `guard_status` | Returns team name, your email, number of active rules, and policy version |\n| `guard_check` | Checks whether a specific tool + input would be blocked before Claude acts |\n| `guard_sync` | Fetches the latest policy from the ConductGuard API and saves it locally |\n\n**`guard_check` example** — Claude can self-check before a sensitive action:\n\n```\nguard_check(tool_name=\"bash\", tool_input={\"command\": \"rm -rf /tmp/build\"})\n→ ALLOWED — no policy rule matches 'bash'.\n\nguard_check(tool_name=\"bash\", tool_input={\"command\": \"curl http://internal-api/secrets\"})\n→ BLOCKED — External network calls to internal endpoints are not permitted. [rule: no-internal-curl]\n```\n\n**`guard_sync` example** — after your security team pushes new rules:\n\n```\nguard_sync()\n→ Policy synced — 12 rule(s) active (version: 2026-05-31T14:22:00Z).\n```\n\n### Policy file format\n\nPolicy is stored at `~/.conductguard/policy.json` and synced from the server:\n\n```json\n{\n  \"team_id\": \"uuid\",\n  \"version\": \"2026-05-31T14:22:00Z\",\n  \"rules\": [\n    {\n      \"rule_id\": \"no-rm-rf\",\n      \"match_tool\": \"bash\",\n      \"match_pattern\": \"rm\\\\s+-rf\",\n      \"match_path_pattern\": null,\n      \"action\": \"block\",\n      \"message\": \"Recursive deletes are not permitted. Use trash or targeted rm.\"\n    },\n    {\n      \"rule_id\": \"audit-prod-writes\",\n      \"match_tool\": \"edit,write\",\n      \"match_path_pattern\": \"/prod/\",\n      \"match_pattern\": null,\n      \"action\": \"warn\",\n      \"message\": \"Writing to prod directory — make sure this is intentional.\"\n    }\n  ]\n}\n```\n\n### Keeping policy up to date\n\nRun `conduct guard sync` after your security team updates rules in the ConductGuard dashboard. The sync command pulls the latest policy, rewrites the hook, and re-registers the MCP entry in any newly detected AI tool configs.\n\n```bash\n# Add to a daily cron or run manually after policy changes\nconduct guard sync\n```\n\n---\n\n## Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"conduct\": {\n      \"command\": \"conduct-mcp\",\n      \"args\": []\n    },\n    \"conductguard\": {\n      \"command\": \"conductguard-mcp\",\n      \"args\": [\"--team\", \"<workspace-id>\", \"--token\", \"<member-token>\"]\n    }\n  }\n}\n```\n\nRun `conduct login` first — `conduct-mcp` reads credentials from `~/.conduct/config.json`. Get your agent token from **Settings → Agents → Issue token** in the Conduct AI dashboard.\n\n---\n\n## VS Code + GitHub Copilot\n\nInstall from the MCP registry directly in VS Code:\n\n```bash\ncode --add-mcp '{\"name\":\"conduct\",\"command\":\"conduct-mcp\",\"args\":[]}'\ncode --add-mcp '{\"name\":\"conductguard\",\"command\":\"conductguard-mcp\",\"args\":[\"--team\",\"<workspace-id>\",\"--token\",\"<member-token>\"]}'\n```\n\nOr add to `.vscode/mcp.json` in your repo:\n\n```json\n{\n  \"servers\": {\n    \"conduct\": {\n      \"type\": \"stdio\",\n      \"command\": \"conduct-mcp\",\n      \"args\": []\n    },\n    \"conductguard\": {\n      \"type\": \"stdio\",\n      \"command\": \"conductguard-mcp\",\n      \"args\": [\"--team\", \"<workspace-id>\", \"--token\", \"<member-token>\"]\n    }\n  }\n}\n```\n\nOnce wired, GitHub Copilot can list your agents, trigger workflows, and check Guard policies — the same tools available in Claude Code and Cursor.\n\n**Prerequisites:** `pip install conduct-cli` + `conduct login`\n\n---\n\n## Links\n\n- Dashboard: [conductai.ai](https://conductai.ai)\n- Docs: [conductai.ai/docs](https://conductai.ai/docs)\n- Issues: [github.com/sseshachala/conductai/issues](https://github.com/sseshachala/conductai/issues)\n",
  "bytes": 10402,
  "sha": "901ad11a311d61f1562f98383d390891b6a6b20b9625ae9872d2cc5605545765",
  "repo_slug": "sseshachala/conduct-cli",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_sseshachala_conduct_cli_a624a63c/readme"
}