Installation
Hacksmith CLI can be installed in multiple ways depending on your needs and environment.
Quick Install (No Node.js Required)
Section titled “Quick Install (No Node.js Required)”The fastest way to install Hacksmith without any dependencies:
curl -fsSL https://raw.githubusercontent.com/saif-shines/hacksmith/main/scripts/install.sh | bashThis downloads and installs a standalone binary for your platform (macOS, Linux, or Windows).
What it does
Section titled “What it does”- Detects your operating system and CPU architecture
- Downloads the appropriate binary from GitHub Releases
- Installs to
~/.local/bin/hacksmith - Makes the binary executable
Supported Platforms
Section titled “Supported Platforms”- macOS: Apple Silicon (ARM64), Intel (x64)
- Linux: x64, ARM64
- Windows: x64
Custom Installation Directory
Section titled “Custom Installation Directory”By default, the installer uses ~/.local/bin. To install elsewhere:
INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/saif-shines/hacksmith/main/scripts/install.sh | bashAdding to PATH
Section titled “Adding to PATH”If ~/.local/bin is not in your PATH, add this to your shell profile (~/.bashrc, ~/.zshrc, etc.):
export PATH="$PATH:$HOME/.local/bin"Then reload your shell:
source ~/.bashrc # or ~/.zshrcUsing npx (Requires Node.js)
Section titled “Using npx (Requires Node.js)”Run Hacksmith without installing it permanently:
npx hacksmith plan -b <blueprint-url>Pros:
- No installation needed
- Always uses latest version
- Quick for one-off usage
Cons:
- Requires Node.js 18+
- Downloads package each time (or uses npm cache)
- Slightly slower startup
Install via npm (Requires Node.js)
Section titled “Install via npm (Requires Node.js)”Install globally for persistent use:
npm install -g hacksmithOr with yarn:
yarn global add hacksmithOr with pnpm:
pnpm add -g hacksmithPros:
- Integrates with Node.js ecosystem
- Easy to update (
npm update -g hacksmith) - Familiar for JavaScript developers
Cons:
- Requires Node.js 18+
- Slower startup than binary
- Larger installation size
Manual Binary Download
Section titled “Manual Binary Download”Download binaries directly from GitHub Releases:
- Visit
https://github.com/saif-shines/hacksmith/releases - Download the binary for your platform:
- macOS ARM64:
hacksmith-darwin-arm64 - macOS Intel:
hacksmith-darwin-x64 - Linux x64:
hacksmith-linux-x64 - Linux ARM64:
hacksmith-linux-arm64 - Windows:
hacksmith-windows-x64.exe
- macOS ARM64:
- Move to a directory in your PATH:
# macOS/Linuxmv hacksmith-darwin-arm64 /usr/local/bin/hacksmithchmod +x /usr/local/bin/hacksmith
# Windows (PowerShell as Administrator)Move-Item hacksmith-windows-x64.exe C:\Windows\System32\hacksmith.exeInstall from Source
Section titled “Install from Source”For development or custom builds:
# Clone the repositorygit clone https://github.com/saif-shines/hacksmith.gitcd hacksmith
# Install dependenciespnpm install
# Build the CLIpnpm cli:build
# Link globallypnpm cli:linkNow you can run hacksmith from anywhere.
Build Custom Binary
Section titled “Build Custom Binary”Compile your own binary:
# Build for your platformcd packages/hacksmithbun build ./src/run.ts --compile --outfile hacksmith
# Move to PATHmv hacksmith /usr/local/bin/Build All Binaries
Section titled “Build All Binaries”Build binaries for all platforms:
pnpm build:binariesBinaries will be in dist/binaries/.
Verify Installation
Section titled “Verify Installation”After installation, verify Hacksmith is available:
hacksmith --versionYou should see the version number, for example:
0.0.xUpdating
Section titled “Updating”Update Binary Installation
Section titled “Update Binary Installation”Re-run the install script:
curl -fsSL https://raw.githubusercontent.com/saif-shines/hacksmith/main/scripts/install.sh | bashOr specify a version:
VERSION=v0.0.7 curl -fsSL https://raw.githubusercontent.com/saif-shines/hacksmith/main/scripts/install.sh | bashUpdate npm Installation
Section titled “Update npm Installation”npm update -g hacksmithUninstalling
Section titled “Uninstalling”Remove Binary Installation
Section titled “Remove Binary Installation”rm ~/.local/bin/hacksmith# orrm /usr/local/bin/hacksmithRemove npm Installation
Section titled “Remove npm Installation”npm uninstall -g hacksmithRemove Source Installation
Section titled “Remove Source Installation”pnpm cli:unlinkTroubleshooting
Section titled “Troubleshooting”Command not found
Section titled “Command not found”Problem: hacksmith: command not found
Solutions:
- Check if binary exists:
ls -la ~/.local/bin/hacksmith- Add to PATH:
export PATH="$PATH:$HOME/.local/bin"- Verify PATH includes installation directory:
echo $PATHPermission denied
Section titled “Permission denied”Problem: Permission denied when running hacksmith
Solution: Make the binary executable:
chmod +x ~/.local/bin/hacksmithDownload fails
Section titled “Download fails”Problem: Install script fails to download binary
Solutions:
- Check internet connection
- Verify GitHub is accessible
- Try manual download from
https://github.com/saif-shines/hacksmith/releases - Check if your platform is supported
Wrong architecture
Section titled “Wrong architecture”Problem: Binary doesn’t run (e.g., ARM binary on x64 machine)
Solution: Download the correct binary for your platform:
# Check your architectureuname -m
# x86_64 or amd64 → use x64 binary# arm64 or aarch64 → use arm64 binaryNode.js version mismatch
Section titled “Node.js version mismatch”Problem: Error: Requires Node.js >=18
Solutions:
- Update Node.js:
# Using nvmnvm install 18nvm use 18
# Using Homebrew (macOS)brew upgrade node- Or use the standalone binary (no Node.js required):
curl -fsSL https://raw.githubusercontent.com/saif-shines/hacksmith/main/scripts/install.sh | bashComparison
Section titled “Comparison”| Method | Node.js Required | Size | Startup Speed | Auto-updates |
|---|---|---|---|---|
| Binary (curl) | No | ~50MB | Fast | Manual |
| npx | Yes (18+) | ~20MB | Medium | Automatic |
| npm global | Yes (18+) | ~20MB | Medium | Manual |
| From source | Yes (18+) | ~20MB | Medium | Manual |
Recommendations
Section titled “Recommendations”- For end users: Use the curl install script (no dependencies)
- For JavaScript developers: Use npm/npx (familiar workflow)
- For contributors: Install from source (easy development)
- For CI/CD: Use npx (no global installation needed)
Next Steps
Section titled “Next Steps”- Quick Start Guide:
/get-started - Create Your First Blueprint:
/get-started/author-blueprint - Command Reference:
/handbooks/commands
Related
Section titled “Related”- Testing Releases:
/handbooks/testing-releases - Contributing Guide:
/handbooks/contribute - GitHub Repository:
https://github.com/saif-shines/hacksmith