CLI Overview
Overview
The Conduct CLI is a lightweight client that communicates with the backend API. It provides:
- Profile management for multiple environments
- Complete entity management (specs, runs, checks, features)
- Dry-run mode for safe previews
- JSON output for automation
- Local caching for performance
Installation
npm install -g conduct-cli@0.2.0
Verify installation:
conduct --version
Basic Usage
# Initialize project
conduct init
# Manage profiles
conduct profile add --name local --url http://localhost:3000/conduct --key sk_admin_xxx
conduct profile use local
# Work with specs
conduct spec create spec.md
conduct spec list
conduct spec get SPEC-001
# Work with runs
conduct run create run.md --spec-id SPEC-001
conduct run list --spec-id SPEC-001
# Work with checks
conduct check create check.md --run-id RUN-001 --result pass
conduct check list --run-id RUN-001
# List everything
conduct list
Command Structure
conduct <command> <subcommand> [options]
Main Commands
profile- Manage backend profilesspec- Manage specificationsrun- Manage runscheck- Manage checksfeature- Manage features (read-only)init- Initialize projectlist- List all memory
Global Options
--profile <name>- Use specific profile--json- Output JSON format--dry-run- Preview without executing--help- Show help--version- Show version
Quick Examples
Create a Spec
conduct spec create spec.md --spec-id AUTH-001
List Specs
conduct spec list
conduct spec list --status draft
conduct spec list --json
Update Spec Status
conduct spec update SPEC-001 --status completed
Create a Run
conduct run create run.md --spec-id AUTH-001
Link Features to Run
conduct run link RUN-001 FEAT-42 FEAT-43
Create a Check
conduct check create check.md --run-id RUN-001 --result pass
Dry Run Mode
Preview changes before executing:
conduct spec create spec.md --dry-run
conduct run create run.md --spec-id SPEC-001 --dry-run
Output Formats
Human-Readable (Default)
$ conduct spec list
Specs:
SPEC-001 User Authentication draft 2025-12-08
SPEC-002 Dark Mode Toggle completed 2025-12-07
JSON
$ conduct spec list --json
{
"specs": [
{
"specId": "SPEC-001",
"title": "User Authentication",
"status": "draft",
"createdAt": "2025-12-08T..."
}
]
}
Caching
CLI caches responses locally for better performance.
Cache Location
~/.conduct/cache/
Cache TTL
- Specs: 5 minutes
- Runs: 5 minutes
- Checks: 5 minutes
- Features: 10 minutes
Clear Cache
conduct cache clear
conduct cache clear --type specs