CLI
Generate assets directly from your terminal or integrate AssetForge into CI/CD pipelines and AI agent tool loops via MCP.
Installation
Install globally via npm, pnpm, or Homebrew:
npm install -g @assetforge/clipnpm add -g @assetforge/clibrew install assetforge/tap/assetforgeVerify the installation:
assetforge --version
# assetforge 1.4.2Authentication
Set your API key once and it persists across all commands:
assetforge config set api-key af_live_xxxxxxxxxxxxxxxxxxxxOr export it as an environment variable (useful in CI):
export ASSETFORGE_API_KEY=af_live_xxxxxxxxxxxxxxxxxxxxQuick Start
Generate a logo in multiple formats with one command:
assetforge generate \
--prompt "dark mode fintech app icon, abstract F lettermark" \
--formats svg,png,ico \
--width 512 \
--height 512 \
--style minimal \
--out ./brandCommands
assetforge generateGenerate assets from a text prompt. The primary command — accepts a prompt and outputs files in the requested formats.
| Flag | Description |
|---|---|
| --prompt, -p | Asset description (required). |
| --formats, -f | Comma-separated output formats: svg,png,ico,favicon-package,social-kit. Default: svg. |
| --width | Output width in pixels. Default: 512. |
| --height | Output height in pixels. Default: 512. |
| --background | Background: hex color or "transparent". Default: transparent. |
| --style | Style hint: minimal, bold, flat, outline, gradient. |
| --out, -o | Output directory. Default: ./output. |
| --open | Open the output directory when generation is complete. |
assetforge generate \
--prompt "minimalist fintech logo" \
--formats svg,png,ico \
--style minimal \
--out ./assetsassetforge job statusCheck the status of a running or completed generation job.
| Flag | Description |
|---|---|
| <job-id> | Job ID returned by a generate command. |
assetforge job status job_1a2b3c4d5e6fassetforge job listList your recent generation jobs.
| Flag | Description |
|---|---|
| --limit | Number of jobs to return. Default: 20. |
| --status | Filter: queued, processing, complete, failed. |
assetforge job list --status complete --limit 5assetforge config setPersist configuration values so you don't need to pass flags every time.
| Flag | Description |
|---|---|
| api-key <key> | Set your API key. |
| out <path> | Set default output directory. |
assetforge config set api-key af_live_xxxxxxxxxxxxxxxxxxxx
assetforge config set out ./generatedassetforge mcpStart an MCP server so AI agents (Claude, GPT-4o, etc.) can call AssetForge tools directly inside their tool loop.
| Flag | Description |
|---|---|
| --port | Port to listen on. Default: 3100. |
assetforge mcp --port 3100CI/CD Integration
Add asset generation to your GitHub Actions workflow:
# .github/workflows/assets.yml
name: Generate Brand Assets
on:
push:
branches: [main]
paths: ['brand/**']
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g @assetforge/cli
- run: |
assetforge generate \
--prompt "$(cat brand/prompt.txt)" \
--formats svg,png,favicon-package \
--out ./public/brand
env:
ASSETFORGE_API_KEY: ${{ secrets.ASSETFORGE_API_KEY }}
- uses: actions/upload-artifact@v4
with:
name: brand-assets
path: public/brand/MCP Server (AI Agents)
Start an MCP server so AI agents can call AssetForge tools directly inside their tool loop — no wrapper code needed.
assetforge mcpAdd to your Claude Desktop or Agent SDK config:
{
"mcpServers": {
"assetforge": {
"command": "assetforge",
"args": ["mcp"],
"env": {
"ASSETFORGE_API_KEY": "af_live_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}The MCP server exposes generate_asset and get_job_status as callable tools.