Hacksmith is a standards-driven CLI framework that accelerates developer onboarding and product integration by eliminating repetitive manual steps, enabling users to get working code and integrations live in minutes instead of hours. It guides developers interactively (or via flags/env for scripting) through product-specific setup, opening browser pages, securely gathering secrets, generating tailored config/code, verifying integrations, and emitting structured "contextifacts" ready for AI assistants (like Claude or Gemini) to automate the next steps. Product creators define everything—use cases, steps, browser flows, code templates, APIs, and validation logic—in a versioned "integration pack" (YAML/JSON). The CLI fetches, validates, and applies these packs, ensuring deterministic, auditable automation. Distribution is cross-platform (Node and Bun supported) with strong security (redacted secrets, OS keychain, strict schema validation), high DX (clig.dev-standard UX, composable subcommands, --json outputs, predictable errors), and extensibility (new products, packs, and flows are easy to add). Hacksmith is designed as both an onboarding accelerant and a context assembler, bridging setup and AI-driven integration, while keeping first API call time under ten minutes and providing a clear plan and next steps for developers.
This project follows the Command Line Interface Guidelines for creating consistent, user-friendly CLI tools.
- Follow the principle of least surprise
- Be consistent with existing CLI conventions
- Provide helpful error messages and feedback
- Support both human and machine interaction
- Use clear, descriptive command names
- Group related commands using subcommands
- Provide sensible defaults
- Make destructive actions explicit and confirmable
- Use color and formatting judiciously
- Provide progress indicators for long operations
- Support different output formats (JSON, table, etc.)
- Respect the user's terminal capabilities
- After you generate the code, see if there's a good opportunity to refactor code for better maintainability
- Provide actionable error messages
- Use appropriate exit codes
- Suggest corrections when possible
- Include context about what went wrong
- Include built-in help for all commands
- Provide examples in help text
- Maintain consistent terminology
- Include man pages where appropriate
# Start CLI development server
pnpm dev
# Start website development server
pnpm site:dev
# Start CLI in watch mode
pnpm cli:watch# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run CLI tests only
pnpm cli:test
# Run CLI tests in watch mode
pnpm cli:test:watch
# Run all tests across all packages
pnpm test:all# Build all packages
pnpm build:all
# Build CLI only
pnpm cli:build
# Build website only
pnpm site:build# Link CLI globally for development
pnpm cli:link
# Unlink CLI globally
pnpm cli:unlink
# Publish CLI package
pnpm cli:publish# Start website development server
pnpm site:dev
# Build website
pnpm site:build
# Preview built website
pnpm site:preview
# Lint website code
pnpm site:lint
# Format website code
pnpm site:format# Run CLI in development mode
pnpm --filter hacksmith dev
# Build CLI
pnpm --filter hacksmith build
# Build CLI in watch mode
pnpm --filter hacksmith build:watch# Test CLI (builds first, then runs tests)
pnpm --filter hacksmith test# Link CLI globally
pnpm --filter hacksmith link:global
# Unlink CLI globally
pnpm --filter hacksmith unlink:global
# Publish CLI package
pnpm --filter hacksmith publish:npThis project supports multiple package managers:
- pnpm (primary) -
pnpmcommands - npm -
npmcommands for linking/unlinking - bun -
buncommands for testing
- Node.js: >=18
- Bun: >=1.1.0
- pnpm: 9.0.0 (specified in packageManager field)
This project has automated lint checks that run during git operations:
When you commit code, the following checks run automatically:
# Pre-commit hook runs:
pnpm exec lint-stagedWhat lint-staged does:
- JavaScript/TypeScript/Astro files (
*.{js,jsx,ts,tsx,astro}):- Runs
prettier --writeto format code - Runs
eslint --fixto fix linting issues
- Runs
- Markdown files (
*.{md,mdx}):- Runs
prettier --writeto format documentation
- Runs
- JSON files (
*.json):- Runs
prettier --writeto format configuration files
- Runs
When you commit, your commit message is validated:
# Commit message hook runs:
pnpm commitlint --edit "$1"Commit message format: Follows Conventional Commits format:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changesstyle:- Code style changes (formatting, etc.)refactor:- Code refactoringtest:- Adding or updating testschore:- Maintenance tasks
You can run lint checks manually before committing:
# Lint all files
pnpm site:lint
# Format all files
pnpm site:format
# Run ESLint directly
npx eslint . --fix
# Run Prettier directly
npx prettier --write .If you need to bypass the pre-commit hooks (emergency only):
# Skip pre-commit hooks
git commit --no-verify -m "your message"
# Skip all hooks
git push --no-verifyNote: Only bypass hooks in emergencies. The automated checks help maintain code quality and consistency.
When implementing new CLI features:
- Reference the CLI guidelines for best practices
- Test with various terminal environments
- Consider accessibility and internationalization
- Validate user input appropriately
- Provide clear feedback for all operations
These are the docs that hacksmith will rely on to trigger an AI agent and intiate integration