@assetforge/cli · v1.x

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:

bash
npm install -g @assetforge/cli
bash
pnpm add -g @assetforge/cli
bash
brew install assetforge/tap/assetforge

Verify the installation:

bash
assetforge --version
# assetforge 1.4.2

Authentication

Set your API key once and it persists across all commands:

bash
assetforge config set api-key af_live_xxxxxxxxxxxxxxxxxxxx

Or export it as an environment variable (useful in CI):

bash
export ASSETFORGE_API_KEY=af_live_xxxxxxxxxxxxxxxxxxxx

Quick Start

Generate a logo in multiple formats with one command:

bash
assetforge generate \
  --prompt "dark mode fintech app icon, abstract F lettermark" \
  --formats svg,png,ico \
  --width 512 \
  --height 512 \
  --style minimal \
  --out ./brand
Connecting to forge engine...
Parsing prompt...
Generating vectors...
brand/logo.svg2.4 KB
brand/logo.png8.1 KB
brand/logo@2x.png16.2 KB
brand/favicon.ico1.2 KB
4 assets forged in 1.1s

Commands

assetforge generate

Generate assets from a text prompt. The primary command — accepts a prompt and outputs files in the requested formats.

FlagDescription
--prompt, -pAsset description (required).
--formats, -fComma-separated output formats: svg,png,ico,favicon-package,social-kit. Default: svg.
--widthOutput width in pixels. Default: 512.
--heightOutput height in pixels. Default: 512.
--backgroundBackground: hex color or "transparent". Default: transparent.
--styleStyle hint: minimal, bold, flat, outline, gradient.
--out, -oOutput directory. Default: ./output.
--openOpen the output directory when generation is complete.
bash
assetforge generate \
  --prompt "minimalist fintech logo" \
  --formats svg,png,ico \
  --style minimal \
  --out ./assets
assetforge job status

Check the status of a running or completed generation job.

FlagDescription
<job-id>Job ID returned by a generate command.
bash
assetforge job status job_1a2b3c4d5e6f
assetforge job list

List your recent generation jobs.

FlagDescription
--limitNumber of jobs to return. Default: 20.
--statusFilter: queued, processing, complete, failed.
bash
assetforge job list --status complete --limit 5
assetforge config set

Persist configuration values so you don't need to pass flags every time.

FlagDescription
api-key <key>Set your API key.
out <path>Set default output directory.
bash
assetforge config set api-key af_live_xxxxxxxxxxxxxxxxxxxx
assetforge config set out ./generated
assetforge mcp

Start an MCP server so AI agents (Claude, GPT-4o, etc.) can call AssetForge tools directly inside their tool loop.

FlagDescription
--portPort to listen on. Default: 3100.
bash
assetforge mcp --port 3100

CI/CD Integration

Add asset generation to your GitHub Actions workflow:

yaml
# .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.

bash
assetforge mcp

Add to your Claude Desktop or Agent SDK config:

json
{
  "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.