The command-line interface for developers working with decision-first, context-aware, portable memory systems.
Hopsule CLI is a powerful command-line tool designed for developers who work with decision-first workflow management. It provides an intuitive interface to interact with the decision-api, enabling you to manage decisions, track project status, and maintain organizational memory directly from your terminal.
The CLI features an interactive Terminal User Interface (TUI) built with Bubble Tea, making it easy to navigate and execute commands without memorizing complex syntax.
- Interactive TUI - Full-screen, keyboard-navigable interface with organization/project selection
- Card & List Views - Toggle between card grid and paginated datatable with
v - Hopper AI Chat - Built-in AI assistant with project context awareness
- Decision Management - Create, list, accept, deprecate decisions with status filters
- Memory Management - Create, edit, delete project memories
- Task Management - List and Kanban views with status toggles
- Capsule Browsing - View and search context packs
- Device Auth Login - Browser-based secure authentication flow
- Organization & Project Navigation - Multi-org, multi-project support
- Dynamic Search - Real-time
/search across all entity views - Homebrew Installation - One-command installation on macOS
- Flexible Configuration - Config file, environment variable, and flag support
- Adaptive Theme - Works in both dark and light terminals
Install Hopsule CLI using any of the methods below. See INSTALL.md for the full guide.
| Method | Command |
|---|---|
| npm | npm install -g hopsule |
| Homebrew | brew install hopsule/tap/hopsule |
| Scoop (Windows) | scoop bucket add hopsule https://github.com/Hopsule/scoop-bucket && scoop install hopsule |
| Chocolatey (Windows) | choco install hopsule |
| Shell script | curl -fsSL https://raw.githubusercontent.com/Hopsule/cli-tool/main/install.sh | bash |
hopsule --versionSimply run:
hopsuleThis launches the interactive TUI dashboard with a beautiful ASCII logo and command menu:
──────────────────────────────────────────────────────────────────
⢠⣶⣶⣶⣶⣶⣶⣶⣆ ⣴⣶⣶⣶⣶⣶⣶⣶⡄
⢸⣿⣯⣷⣿⢿⣾⣟⣿ ⣿⣿⣽⣾⡿⣷⡿⣯⡇ Hopsule
⢸⣿⣾⣟⣿⣟⣯⣿⣿ ⣿⣷⣿⣻⡿⣟⣿⣿⡇ Decision & Memory Layer
⢸⣿⡾⣿⣯⣿⣟⣿⣾ ⣿⣷⡿⣟⣿⣿⣟⣷⡇ for AI teams & coding tools
⠘⢿⣻⣿⣽⣾⣿⣻⣽ ⣿⣷⣿⣿⢿⣷⣿⠿⠃
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡀ v0.7.5
⣿⡿⣾⣿⡾⣿⣾⢿⣾⡿⣾⣿⣿⣄ ─────────────────────────────
⣿⣿⣻⣷⣿⣿⣻⣿⣯⣿⡿⣯⣿⣻⣿⣄ Get started
⣿⣽⣿⣽⣾⡿⣯⣷⣿⣯⣿⣿⣻⣿⣽⡿⣿⣄ > hopsule init (create config)
⢠⣾⣿⣿⢿⣿⡿⣿⣿ ⣿⣽⣿⣽⣷⣿⡿⣟⡇ hopsule login (authenticate)
⢸⣿⢷⣿⣿⣻⣿⣻⣽ ⣿⣿⣽⣯⣿⣾⣿⣿⡇ hopsule connect (link repo)
⢸⣿⢿⣻⣾⣿⣻⣿⣻ ⣿⣷⣿⣯⣿⣷⣿⣾⡇ hopsule dev (interactive TUI)
⢸⣿⢿⣿⣻⣽⣿⣽⣿ ⣿⣷⡿⣷⣿⣾⣷⡿⡇
⠘⠿⠿⠻⠿⠻⠽⠿⠾ ⠻⠷⠿⠿⠻⠾⠟⠿⠁ view all commands
──────────────────────────────────────────────────────────────────
Keyboard Shortcuts:
↑/↓ork/j- Navigate items←/→orh/l- Navigate grid / change page (list view)Enter- Select / open detail/- Search within decisions, memories, tasks, capsulesv- Toggle Card / List viewtab- Toggle status filter (decisions) / view mode (tasks)n- Create new iteme- Edit selected itemd- Delete selected itema- Accept decisionx- Deprecate decisionq/Esc- Go back / quit
Run the interactive configuration:
hopsule configYou'll be prompted for:
- API URL: The decision-api endpoint (default:
https://api.hopsule.com) - Token: Your JWT authentication token
- Default Project ID: Your project identifier
Alternatively, see the Configuration section for manual setup.
Once configured, you can use any of the available commands. See the Command Reference section below.
Launch the interactive TUI (default command when no subcommand is provided). Provides full organization/project navigation, decision/memory/task/capsule management, and Hopper AI chat.
hopsuleAuthenticate via browser-based device auth flow. Opens your browser, waits for approval, and stores the token locally.
hopsule loginClear stored authentication credentials.
hopsule logoutDisplay current authenticated user info.
hopsule whoamiList organizations you belong to.
hopsule orgsList projects in an organization.
hopsule projectsLink the current directory to a Hopsule project. Creates a local .hopsule.yaml project config.
hopsule initInteractively configure CLI settings (API URL, token, default project).
hopsule configList all decisions for the current project.
hopsule list
hopsule list --project my-project-id
hopsule list --api-url https://api.hopsule.com --token your-tokenOutput:
ID TITLE STATUS CREATED
--- ----- ------ -------
abc123def... Use TypeScript for... ACCEPTED 2024-01-15T10:30:00Z
xyz789ghi... Enforce code review... PENDING 2024-01-16T14:20:00Z
Flags:
--project- Override default project ID--api-url- Override default API URL--token- Override default token
Interactively create a new decision (will be in DRAFT status).
hopsule create
hopsule create --project my-project-idInteractive prompts:
- Statement: The decision statement (required)
- Rationale: Multi-line rationale (end with empty line)
Example:
$ hopsule create
Statement: Use TypeScript for all new frontend code
Rationale (multi-line, end with empty line):
TypeScript provides type safety and better IDE support.
It reduces runtime errors and improves code maintainability.
End with empty line:
Decision created successfully!
ID: abc123def456
Status: DRAFTFlags:
--project- Override default project ID--api-url- Override default API URL--token- Override default token
Get detailed information about a specific decision.
hopsule get abc123def456
hopsule get abc123def456 --output jsonOutput (text format):
ID: abc123def456
Statement: Use TypeScript for all new frontend code
Status: ACCEPTED
Created: 2024-01-15T10:30:00Z
Updated: 2024-01-15T11:00:00Z
Accepted: 2024-01-15T11:00:00Z by user@example.com
Tags: frontend, typescript
Rationale:
TypeScript provides type safety and better IDE support.
It reduces runtime errors and improves code maintainability.
Flags:
--output, -o- Output format:text(default) orjson--project- Override default project ID--api-url- Override default API URL--token- Override default token
Accept a decision, moving it from DRAFT/PENDING to ACCEPTED status.
hopsule accept abc123def456Output:
Decision accepted successfully!
ID: abc123def456
Status: ACCEPTED
Flags:
--project- Override default project ID--api-url- Override default API URL--token- Override default token
Deprecate a decision, moving it to DEPRECATED status.
hopsule deprecate abc123def456Output:
Decision deprecated successfully!
ID: abc123def456
Status: DEPRECATED
Flags:
--project- Override default project ID--api-url- Override default API URL--token- Override default token
Show current project status and statistics.
hopsule status
hopsule status --output jsonOutput (text format):
Project: my-project-id
Total Decisions: 42
Accepted: 30
Pending: 5
Draft: 5
Deprecated: 2
Flags:
--output, -o- Output format:text(default) orjson--project- Override default project ID--api-url- Override default API URL--token- Override default token
Sync local state with the remote decision-api.
hopsule syncWhat it does:
- Tests connection to decision-api
- Verifies authentication
- Currently a no-op (future: cache management)
Flags:
--project- Override default project ID--api-url- Override default API URL--token- Override default token
All commands support these global flags:
--api-url- Override the API URL from config--project- Override the default project ID from config--token- Override the authentication token from config
hopsule --help # Show help
hopsule --version # Show version information
hopsule <command> --help # Show help for specific commandThe CLI stores configuration in:
~/.decision-cli/config.yaml
api_url: https://api.hopsule.com
project: your-project-id
organization: your-org-name
token: your-jwt-tokenYou can also configure via environment variables (takes precedence over config file):
export DECISION_API_URL=https://api.hopsule.com
export DECISION_PROJECT=your-project-id
export DECISION_TOKEN=your-jwt-tokenEnvironment Variable Mapping:
DECISION_API_URL→api_urlDECISION_PROJECT→projectDECISION_TOKEN→token
- Command-line flags (highest priority)
- Environment variables
- Config file (
~/.decision-cli/config.yaml) - Defaults (API URL defaults to
https://api.hopsule.com)
You can manually create/edit the config file:
mkdir -p ~/.decision-cli
cat > ~/.decision-cli/config.yaml << EOF
api_url: https://api.hopsule.com
project: my-project-id
token: your-jwt-token-here
EOF- decision-api - The authoritative API server must be running and accessible
- JWT Token - Valid authentication token for decision-api
- Project ID - A valid project identifier in your organization
- ✅ macOS 11+ (Apple Silicon M1/M2/M3, Intel x86_64)
- ✅ Linux (AMD64, ARM64)
- ✅ Windows 10/11 (AMD64, ARM64)
Hopsule CLI is a client-only tool that communicates with decision-api. It follows the decision-first architecture principles:
┌─────────────────┐
│ Hopsule CLI │ ← Client (No Authority)
└────────┬────────┘
│
│ API Calls (HTTP/REST)
│
▼
┌─────────────────┐
│ decision-api │ ← Single Authority
└─────────────────┘
Key Principles:
- ✅ Strictly Advisory - CLI cannot create authority independently
- ✅ API-First - All operations go through decision-api
- ✅ No Direct Database Access - Only communicates via API
- ✅ Stateless - Configuration stored locally, state in API
The CLI respects the authoritative nature of decision-api and never bypasses it or creates decisions independently.
- Go 1.24+ - Required for building from source
- decision-api - Should be running locally for testing
# Clone the repository
git clone https://github.com/Hopsule/cli-tool.git
cd cli-tool
# Build the binary
go build -o hopsule .
# Run it
./hopsule# Install dependencies
go mod download
# Run tests
go test ./...
# Build for your platform
go build -o hopsule .
# Build for multiple platforms
GOOS=linux GOARCH=amd64 go build -o hopsule-linux-amd64 .
GOOS=darwin GOARCH=arm64 go build -o hopsule-darwin-arm64 .
GOOS=windows GOARCH=amd64 go build -o hopsule-windows-amd64.exe .cli-tool/
├── main.go # Entry point, Cobra root command + interactive TUI launcher
├── internal/
│ ├── api/
│ │ └── client.go # HTTP client for decision-api
│ ├── commands/ # All CLI subcommands (login, list, create, etc.)
│ ├── config/ # Configuration management
│ └── ui/ # Bubble Tea TUI (styles, model, views, cards, list, etc.)
├── npm/ # npm package (postinstall binary downloader)
│ ├── package.json
│ ├── install.js
│ └── bin/ # Shell/CMD wrappers
├── choco/ # Chocolatey package
│ ├── hopsule.nuspec
│ └── tools/ # Install/uninstall scripts
├── .github/workflows/ # CI/CD (ci.yml, release.yml)
├── .goreleaser.yml # GoReleaser config (Homebrew + Scoop + binaries)
├── install.sh # Universal curl installer
├── LICENSE # MIT License
├── INSTALL.md # Comprehensive installation guide
└── README.md # This file
Key dependencies:
- Cobra - CLI framework
- Viper - Configuration management
- Bubble Tea - TUI framework
- Lipgloss - Terminal styling
- color - ANSI color output
macOS (Homebrew):
# Open a new terminal window
# Or reload shell
exec zsh
# Or use full path
/opt/homebrew/bin/hopsule # Apple Silicon
/usr/local/bin/hopsule # IntelWindows:
- Ensure the binary is in your PATH
- Or use the full path:
C:\path\to\hopsule.exe
Check if decision-api is running:
curl https://api.hopsule.com/healthTest with explicit flags:
hopsule list --api-url https://api.hopsule.com --project <id> --token <token>Verify configuration:
cat ~/.decision-cli/config.yamlInvalid token:
- Ensure your JWT token is valid and not expired
- Get a new token from your decision-api administrator
- Update config:
hopsule config
Token not found:
- Run
hopsule configto set your token - Or set
DECISION_TOKENenvironment variable
# Remove config file
rm -rf ~/.decision-cli/config.yaml
# Reconfigure
hopsule config- v0.9.0 - Production distribution: npm, Homebrew, Scoop, Chocolatey, curl installer, CI/CD, Windows/Linux support
- v0.8.0 - Card/List toggle, paginated datatable, Hopper AI chat, modular UI refactor
- v0.7.5 - Interactive TUI with org/project navigation, device auth login
- v0.4.0 - Minimal dashboard design
- v0.3.0 - Monochrome theme + ASCII logo
- v0.2.1 - Panic fix (lipgloss.Width)
- v0.2.0 - Interactive TUI with bubbletea
- v0.1.1 - Dashboard UI
- v0.1.0 - Initial release
Contributions are welcome! Please feel free to submit a Pull Request.
- Follow Go best practices and conventions
- Maintain compatibility with decision-api
- Respect the authority model (CLI is advisory only)
- Add tests for new features
- Update documentation as needed
MIT License - see LICENSE file for details
- Repository: github.com/Hopsule/cli-tool
- Decision API: github.com/Hopsule/api
- Web App: github.com/Hopsule/web-app
- Releases: github.com/Hopsule/cli-tool/releases
- Organization: github.com/Hopsule
- GitHub Issues: Report a bug
- Documentation: See INSTALL.md for detailed installation guide
Made with ❤️ by the Hopsule team