Hammer Beyond the App
Hammer for Mac has always been a native macOS app — visual, fast, and purpose-built for hands-on development. But modern teams need automation too. That's where the Hammer CLI comes in.
The headless CLI gives you the same build engine that powers the desktop app, packaged for use in scripts, pipelines, and CI/CD workflows. Same output, same reliability, no GUI required.
Setting Up GitHub Actions
Here's a minimal GitHub Actions workflow that builds your Hammer project and deploys to Forge on every push to main:
name: Build and Deploy
on:
push:
branches: [main]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build with Hammer run: hammer build --project . --output ./dist
- name: Deploy to Forge run: forge deploy ./dist --site your-site-name env: FORGETOKEN: ${{ secrets.FORGETOKEN }}
Key Flags
The CLI supports several flags for controlling the build:
-
--project— Path to your Hammer project directory -
--output— Where to write the built files -
--clean— Clear the output directory before building -
--verbose— Show detailed build output for debugging
Beyond CI/CD
The CLI isn't just for pipelines. Use it in pre-commit hooks to validate builds, in Makefiles for local automation, or in AI agent workflows where Hammer acts as the build engine in a fully automated content pipeline.
Check out the full CI/CD documentation for advanced configuration, caching strategies, and multi-environment deployments.