Commands reference
Hacksmith provides a powerful CLI to help you manage integration blueprints, configure preferences, and automate onboarding workflows. This reference covers all available commands and their options.
Interactive Mode
Section titled “Interactive Mode”Run hacksmith without any arguments to enter interactive mode:
hacksmithIn interactive mode, you can use slash commands like /plan and /preferences with the same options described below.
Global Options
Section titled “Global Options”All commands support these global options:
--version- Display the version number--help- Display help information
plan Command
Section titled “plan Command”The plan command loads, validates, and executes integration blueprints. Blueprints define product-specific setup flows, code generation, and integration steps.
hacksmith plan [options]Options
Section titled “Options”| Option | Alias | Description |
|---|---|---|
--blueprint <path> | -b | Path to blueprint TOML file (local path or HTTP URL) |
--github <repo> | -g | GitHub repository in owner/repo format |
--execute | -e | Execute blueprint flows interactively |
--json | -j | Output blueprint as JSON |
--dev | -d | Enable development mode for flow execution |
--help | -h | Show help for the plan command |
Examples
Section titled “Examples”Load a local blueprint:
hacksmith plan --blueprint ./path/to/blueprint.tomlLoad and execute a blueprint:
hacksmith plan -b ./blueprint.toml --executeLoad blueprint from URL:
hacksmith plan -b https://example.com/blueprint.tomlList blueprints from GitHub repository:
hacksmith plan --github saif-shines/hacksmith-blueprintsOutput blueprint as JSON:
hacksmith plan -b ./blueprint.toml --jsonInteractive mode:
# Start hacksmith and use slash commandhacksmith> /plan --blueprint ./blueprint.toml> /plan -b ./blueprint.toml --executeWhat Happens During Execution
Section titled “What Happens During Execution”When you use the --execute flag, Hacksmith will:
- Load and validate the blueprint
- Execute flows interactively, guiding you through each step:
- Browser actions (opening URLs, waiting for user confirmation)
- Input prompts (gathering configuration, secrets, etc.)
- API calls (verifying integrations)
- File operations (generating config files, code templates)
- Generate a mission brief with contextifacts (execution summary, tech stack, integration details)
- Offer to launch AI agent (if configured) or copy the mission brief to clipboard
Dev Mode
Section titled “Dev Mode”Use --dev or -d to enable development mode during execution:
hacksmith plan -b ./blueprint.toml --execute --devDev mode provides additional debugging information and verbose output during flow execution.
preferences Command
Section titled “preferences Command”The preferences command manages Hacksmith configuration, including AI agent setup and tech stack scanning.
hacksmith preferences [subcommand]Aliases
Section titled “Aliases”prefs
Subcommands
Section titled “Subcommands”Interactive setup wizard for configuring AI agent and tech stack.
hacksmith preferences setupWhat it does:
-
AI Agent Configuration:
- Scans for installed AI CLIs (Claude Code, GitHub Copilot, etc.)
- Lets you choose which AI agent to use
- Supports “Manual mode” for copy-to-clipboard workflow with VS Code Copilot, Cursor, Windsurf, etc.
-
Tech Stack Scanning:
- Analyzes your project structure and dependencies
- Detects languages, frameworks, package managers, databases, and more
- Saves tech stack to current project for use in mission briefs
Example:
hacksmith preferences setupDisplay current preferences including configured AI agent and current project’s tech stack.
hacksmith preferences showOutput includes:
- AI agent provider and CLI path
- AI agent version and last update time
- Current project’s tech stack summary (languages, frameworks, etc.)
- Tech stack scan time and project path
Example:
hacksmith preferences showScan and save your current project’s tech stack.
hacksmith preferences scanWhat it detects:
- Languages: JavaScript, TypeScript, Python, Go, Rust, Java, etc.
- Frameworks: React, Next.js, Vue, Astro, Express, FastAPI, etc.
- Package Managers: npm, pnpm, yarn, bun, pip, cargo, etc.
- Databases: PostgreSQL, MySQL, MongoDB, Redis, etc.
- Tools: Docker, Terraform, GitHub Actions, etc.
Example:
hacksmith preferences scanGenerate a mission brief for your AI agent without executing a blueprint.
hacksmith preferences briefWhat it does:
- Prompts for an optional integration goal
- Generates a mission brief with tech stack context
- Saves the brief to current project’s
.hacksmith/mission-brief.md - Offers to copy the brief to clipboard
Example:
hacksmith preferences briefYou’ll be prompted:
What is your integration goal? (optional, press Enter to skip)> Integrate payment processing with StripeReset system-level preferences (AI agent configuration only). Project-specific data is preserved.
hacksmith preferences resetConfirmation required. This will clear AI agent configuration only. Project data remains intact.
Example:
hacksmith preferences resetsession Command
Section titled “session Command”The session command manages development sessions and tracks blueprint execution progress across projects.
hacksmith session [subcommand]Aliases
Section titled “Aliases”sess
Subcommands
Section titled “Subcommands”status
Section titled “status”Show current session status and project information.
hacksmith session statushacksmith session # status is defaultOutput includes:
- Current project name, location, and type
- Git repository information (if available)
- Active session details (blueprint, flow, progress)
- Session timestamps
Example:
hacksmith session statusClear the current session state. Useful for starting fresh or cleaning up interrupted sessions.
hacksmith session clearWhat it does:
- Prompts for confirmation if there’s an active session
- Clears session progress while preserving captured data
- Allows you to start blueprint execution from the beginning
Example:
hacksmith session clearList all tracked projects and their completion history.
hacksmith session listOutput includes:
- Project names and paths
- Blueprint completion counts
- Last activity timestamps
- Git repository information
Example:
hacksmith session listrecover Command
Section titled “recover Command”The recover command restores project data from system backups. Hacksmith automatically backs up your project data after successful blueprint completions.
hacksmith recover [subcommand]Aliases
Section titled “Aliases”restore
Subcommands
Section titled “Subcommands”interactive
Section titled “interactive”Launch interactive recovery mode to browse and select backups.
hacksmith recover interactivehacksmith recover # interactive is defaultWhat it does:
- Checks if you’re in a project directory
- Shows available project backups
- Lets you select which backup to restore
- Copies backup data to current project
Example:
hacksmith recover interactiveDisplay all available project backups without restoring.
hacksmith recover listOutput includes:
- Project names and original paths
- Number of completed blueprints
- Last usage timestamps
- Git repository information
Example:
hacksmith recover listproject
Section titled “project”Restore a specific project by index number.
hacksmith recover project <index>Example:
# First, list available backupshacksmith recover list
# Then restore by index (1-based)hacksmith recover project 3Project Data Management
Section titled “Project Data Management”Hacksmith uses a project-aware storage system that keeps your data organized and secure.
Storage Architecture
Section titled “Storage Architecture”Project-local storage (.hacksmith/ in project root):
- Blueprint variables and progress
- Tech stack analysis
- Session state
System-level storage (~/.hacksmith/):
- AI agent preferences
- Project backups (last 10 projects)
- Global settings
Automatic Features
Section titled “Automatic Features”Session Recovery:
- Detects interrupted blueprint executions
- Prompts to resume from where you left off
- Preserves captured data and progress
Data Migration:
- Automatically migrates old global data to project-local storage
- Preserves existing integrations during upgrade
Backup System:
- Creates backups after successful blueprint completions
- Maintains last 10 projects with LRU eviction
- Protects against accidental data loss
Data Storage Locations
Section titled “Data Storage Locations”Your Project/├── .hacksmith/│ ├── contextifact.json # Blueprint variables│ ├── tech-stack.json # Project tech stack│ ├── session-state.json # Current session│ └── mission-brief.md # Generated briefs
~/.hacksmith/├── preferences.json # AI agent config├── project-registry.json # Project tracking└── projects/ ├── abc123/ # Project backup │ ├── contextifact.json │ └── tech-stack.json └── def456/ # Another backupAI Agent Integration
Section titled “AI Agent Integration”Hacksmith integrates with AI CLIs to automate the next steps after executing a blueprint.
Supported AI Agents
Section titled “Supported AI Agents”- Claude Code - https://claude.com/claude-code
- GitHub Copilot - Install via
gh extension install copilot - Manual mode - Copy mission brief to clipboard for use with VS Code Copilot, Cursor, Windsurf, or any AI assistant
How It Works
Section titled “How It Works”- Run
hacksmith preferences setupto configure your AI agent - Execute a blueprint with
hacksmith plan -b blueprint.toml --execute - After successful execution, Hacksmith generates a mission brief
- Choose to:
- Launch AI agent automatically (if CLI is configured)
- Copy to clipboard (for manual mode)
- Skip and access the brief later at your project’s
.hacksmith/mission-brief.md
Mission Brief Format
Section titled “Mission Brief Format”The mission brief is a structured markdown file containing:
- Blueprint name and ID
- Executed flows summary
- Tech stack details (languages, frameworks, dependencies)
- Integration goal (if provided)
- Next steps (guided by blueprint’s agent prompt template)
Environment Variables
Section titled “Environment Variables”Hacksmith respects these environment variables:
DEBUG=1- Enable debug mode with verbose error outputNO_COLOR- Disable colored output
Exit Codes
Section titled “Exit Codes”Hacksmith uses these exit codes:
0- Success1- General error2- Invalid arguments or configuration
Getting Help
Section titled “Getting Help”For more help:
- Run
hacksmith --helporhacksmith <command> --help - Visit the documentation: https://thehacksmith.dev
- Report issues: https://github.com/saif-shines/hacksmith/issues