Skip to content
Skills Library
Programming · Tool integration

forge-cli

/forge-cli

Use when an agent needs to call a running three.ws Forge desktop instance from the terminal to generate/export image-to-3D assets through canonical JSON-first automation commands.

Repository
three.ws ↗
Licence
Apache-2.0
Last repository change
25.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
2
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 25.10.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What to check before installing
  • 2 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: agent.py, test_agent.py

What it does and when to use it

Use when an agent needs to call a running three.ws Forge desktop instance from the terminal to generate/export image-to-3D assets through canonical JSON-first automation commands.

Original author description

Use when an agent needs to call a running three.ws Forge desktop instance from the terminal to generate/export image-to-3D assets through canonical JSON-first automation commands.

How it works

  1. Overview
  2. Prerequisites
  3. Canonical Commands
  4. Model Selection
  5. Legacy Compatibility
  6. Developer-Only API Helpers
  7. Experimental ComfyUI Helpers
  8. Hidden Helper Aliases
  9. Batch Workflow
  10. Verification Checklist
Original SKILL.md headings · 181 lines, 831 words
SKILL.md preview
---
name: forge-cli
description: Use when an agent needs to call a running three.ws Forge desktop instance from the terminal to generate/export image-to-3D assets through canonical JSON-first automation commands.
version: 1.2.0
author: three.ws Forge
license: MIT
metadata:
  hermes:
    tags: [three-ws, forge, image-to-3d, cli, automation, agents]
    related_skills: []
---

# three.ws Forge CLI

## Overview

three.ws Forge exposes a local API at `http://127.0.0.1:8765` while the official desktop app is running. The stdlib-only CLI at `tools/forge-cli/agent.py` is an agent helper over the canonical automation contract:

- `health`
- `model`
- `workflow-run`
- `capability`
- `process-run`

Final machine-readable JSON is printed to stdout. Progress JSON lines, when requested, are printed to stderr.

## Prerequisites

Launch the official three.ws Forge desktop app first, then check readiness:

```bash
python tools/forge-cli/agent.py health
```

Use `--compact` when another agent needs single-line JSON:

```bash
python tools/forge-cli/agent.py --compact health
```

`GET /health` is checked before business operations. If the app is unavailable, failures are structured:

```json
{
  "ok": false,
  "code": "API_UNAVAILABLE",
  "message": "Cannot reach three.ws Forge API at ..."
}
```

## Canonical Commands

Inspect models through `/model/*`:

```bash
python tools/forge-cli/agent.py model list
python tools/forge-cli/agent.py model status
python tools/forge-cli/agent.py model params --model active
```

Start or resume workflow runs:

```bash
python tools/forge-cli/agent.py workflow-run start --image ./input.png --wait
python tools/forge-cli/agent.py workflow-run status <run_id>
python tools/forge-cli/agent.py workflow-run cancel <run_id>
```

Generate from an image and export the finished mesh:

```bash
python tools/forge-cli/agent.py generate \
  --image ./input.png \
  --output ./export.glb \
  --progress
```

`generate` is a friendly wrapper around `POST /workflow-runs/from-image` and `GET /workflow-runs/{run_id}`. It does not silently fall back to `/generate/*`. The JSON includes recovery metadata:

```json
{
  "ok": true,
  "run": {"kind": "workflowRun", "id": "..."},
  "workspace_path": "Default/model.glb",
  "export_path": "/absolute/path/to/export.glb",
  "meta": {
    "status_command": "python tools/forge-cli/agent.py workflow-run status ...",
    "cancel_command": "python tools/forge-cli/agent.py workflow-run cancel ...",
    "legacy": false
  }
}
```

Use `--no-export` when the caller only needs the workspace path. The hidden `export` helper remains available to download an existing workspace mesh, but it is not part of the canonical root command set:

```bash
python tools/forge-cli/agent.py export --path Default/model.glb --output ./model.glb
```

Discover capabilities or process runs only when the running server exposes the canonical contract:

```bash
python tools/forge-cli/agent.py capability list
python tools/forge-cli/agent.py process-run status <run_id>
```

If the contract is absent, the CLI fails closed:

```json
{
  "ok": false,
  "code": "UNSUPPORTED_PROCESS",
  "message": "This process is not available through the canonical process-run contract."
}
```

## Model Selection

`--model auto` uses the active model reported by `/model/status`, then validates that id against `/model/all`. Explicit `--model` values are also validated against `/model/all`. The CLI does not infer hidden capabilities from model names, labels, or string fragments.

## Legacy Compatibility

The old `/generate/*` endpoints are explicit compatibility commands:

```bash
python tools/forge-cli/agent.py legacy job <job_id>
python tools/forge-cli/agent.py legacy cancel <job_id>
python tools/forge-cli/agent.py legacy generate --image ./input.png --output ./legacy.glb
```

Legacy responses include `meta.legacy: true`. Top-level `job`, `cancel`, `models`, and `params` aliases may still parse for older scripts, but they are not the documented canonical surface.

## Developer-Only API Helpers

Headless startup helpers live under `dev`:

```bash
python tools/forge-cli/agent.py dev serve-api --print-command
python tools/forge-cli/agent.py dev ensure-server
python tools/forge-cli/agent.py dev ensure-server --start --detach
```

These commands start or inspect only the FastAPI backend. They do not imply Electron/Desktop bridge readiness, scene operation readiness, extension process execution readiness, or full workflow support. Prefer launching the official desktop app for real agent workflows.

## Experimental ComfyUI Helpers

ComfyUI orchestration is outside the canonical three.ws Forge contract and lives under `experimental`:

```bash
python tools/forge-cli/agent.py experimental comfy-image \
  --workflow Trellis2Workflow \
  --prompt "clean object render, isolated on white" \
  --comfy-output ./source.png

python tools/forge-cli/agent.py experimental generate-from-workflow \
  --workflow Trellis2-Full \
  --prompt "clean orthographic product render of a stylized robot toy" \
  --output ./export.glb
```

`experimental generate-from-workflow --workflow <name> --output <path>` treats `--output` as the final artifact location. If the ComfyUI history contains a downloadable `.glb`, `.gltf`, `.obj`, `.stl`, or `.ply`, the CLI downloads that asset directly and does not call three.ws Forge health or generation. If the workflow only produces an image, the CLI downloads that image and falls back through the canonical three.ws Forge workflow-run generation path. If no supported asset or image is found, it fails with `code: "NO_WORKFLOW_OUTPUT"`.

## Hidden Helper Aliases

The top-level `status`, `export`, and `batch` helpers remain parseable for older scripts and agent ergonomics, but root help does not present them as canonical automation primitives. Prefer `health`, `model`, `workflow-run`, `capability`, and `process-run` when documenting the supported contract.

## Batch Workflow

The hidden `batch` helper generates meshes sequentially from a directory or manifest JSON through the canonical `generate` path:

```bash
python tools/forge-cli/agent.py batch \
  --input-dir ./images \
  --output-dir ./meshes \
  --continue-on-error

python tools/forge-cli/agent.py batch \
  --manifest ./jobs.json \
  --output-dir ./meshes
```

Manifest files may be a JSON list, or an object with `jobs` or `images`. Each entry can be a string image path or an object with `image`, optional `output`, and optional `format`.

## Verification Checklist

- [ ] `python tools/forge-cli/agent.py health` returns `ok: true`.
- [ ] `python tools/forge-cli/agent.py model list` returns model entries.
- [ ] `python tools/forge-cli/agent.py generate --image <image> --output <mesh>` returns `ok: true`, `run.kind: workflowRun`, and recovery metadata.
- [ ] The reported `export_path` exists and has non-zero size when export is enabled.
- [ ] `python tools/forge-cli/agent.py workflow-run status <run_id>` can resume polling from metadata.
- [ ] `python tools/forge-cli/test_agent.py` passes.
Files in this package (3)
  • SKILL.md 7 KB
  • agent.py 64 KB
  • test_agent.py 27 KB

Versions

The database has no other skills named forge-cli.

Database snapshot: 13.11.2026 · package version ccc42b9c7dc9 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95forge-app-builder
    Guides building, deploying, troubleshooting, and installing Atlassian Forge apps — custom extensions built with the Forge CLI (forge create, forge deploy, forge install). Use when the user wants to create a Forge app (issue panels, dashboard gadgets, Confluence macros, global…
  • 90using-forge-os
    Use when using forge os is required during kernel work, especially when the result must be traceable, independently reviewable, and safe to hand to another agent.
  • 100debug-cli
    Use when users need to debug, modify, or extend the code-forge application's CLI commands, argument parsing, or CLI behavior. This includes adding new commands, fixing CLI bugs, updating command options, or troubleshooting CLI-related issues.
  • 100forge
    Route every GitHub or GitLab action through the CLI's forge verbs, as the remembered account and only after the user says yes. Use when the user asks to open a PR, merge the PR, create an issue, create a tag, publish a release, edit a PR, resolve a review thread, or read a PR,…
  • 90Domain Knowledge
    NXTG-Forge product domain knowledge — the mission, core concepts (project spec, agent orchestration, state, Clean Architecture, drift/gap analysis, MCP), the real `forge` CLI surface, and the 3-repo workspace layout. Use when onboarding to what NXTG-Forge IS and why, when a…
  • 95forge-app-review
    Reviews Forge apps for security vulnerabilities, architecture issues, cost inefficiencies, performance problems, and trigger/scheduling waste before deployment. Use when the user says "review my Forge app", "check my app", "pre-deploy check", "is my app ready to deploy", "audit…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.