API Documentation
This document details all fe-harness CLI commands, parameters, return values, and usage examples.
Command Overview
| Command | Purpose | Writes Files |
|---|---|---|
version | Output CLI version | No |
create | Create new project | Yes |
init | Initialize existing project | Yes |
plan | Output structured plan | No |
inspect | View project facts | No |
doctor | Read-only diagnostics | No |
inputs | Check inputs | Mostly read-only |
task | Manage tasks | Yes |
verify | Run verification | Writes reports |
api | OpenAPI operations | inspect: no |
design | Design Token operations | inspect: no |
ui | UI System management | install: yes |
skills | Install Skills | install: yes |
version
Output CLI version information.
Usage
bash
fe-harness version
fe-harness -v
fe-harness --versionOutput Example
fe-harness v1.2.4Parameters
None
create
Create a new Consumer H5 project.
Usage
bash
fe-harness create <project-name> [options]Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
<project-name> | string | - | Project name |
--output | string | . | Output directory |
--dry-run | boolean | false | Preview creation without writing files |
--skip-install | boolean | false | Skip dependency installation |
--json | boolean | false | Output in JSON format |
Examples
bash
# Create project (interactive)
fe-harness create my-h5
# Specify output directory
fe-harness create my-h5 --output ./projects
# Preview creation
fe-harness create my-h5 --dry-run
# Skip dependency installation
fe-harness create my-h5 --skip-install
# JSON output
fe-harness create my-h5 --jsonOutput Example
json
{
"status": "success",
"projectName": "my-h5",
"outputPath": "./my-h5",
"files": [
"package.json",
"src/main.js",
"src/pages/index/index.vue"
]
}What Gets Created
- Project config files (package.json, vite.config.js)
- Source directory structure
- Test configuration
- Agent workflow files
- Default Skill
init
Initialize an existing project with fe-harness configuration.
Usage
bash
fe-harness init [options]Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--dry-run | boolean | false | Preview initialization without writing |
--json | boolean | false | Output in JSON format |
Examples
bash
# Preview initialization
fe-harness init --dry-run
# Execute initialization
fe-harness init
# JSON output
fe-harness init --jsonBehavior
- Detects project type
- Generates
.fe-harness/directory - Creates
AGENTS.md - Does not overwrite existing files (unless explicitly specified)
plan
Output a structured plan for create/init operations.
Usage
bash
fe-harness plan <create|init> [options]Examples
bash
fe-harness plan create my-h5 --json
fe-harness plan init --jsonOutput Example
json
{
"operation": "create",
"projectName": "my-h5",
"files": [
{
"path": "package.json",
"action": "create",
"description": "Project config file"
}
]
}inspect
View project facts and capabilities.
Usage
bash
fe-harness inspect [options]Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--json | boolean | false | Output in JSON format |
Examples
bash
fe-harness inspect
fe-harness inspect --jsonOutput Fields
- Project type
- Tech stack
- File structure
- Configuration info
- Agent capabilities
doctor
Read-only diagnostics for project health check.
Usage
bash
fe-harness doctor [options]Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
--json | boolean | false | Output in JSON format |
Examples
bash
fe-harness doctor
fe-harness doctor --jsonChecks
- Config file completeness
- Script availability
- Input file status
- Token configuration
- Agent readiness
inputs
Check, compare, and analyze input files.
Subcommands
inspect: Check input files and manifestanalyze: Analyze evidence conclusions and conflictsdiff: Compare input changes
Usage
bash
fe-harness inputs inspect --json
fe-harness inputs analyze --json
fe-harness inputs diff --jsontask
Manage task numbers, history, and snapshots.
Subcommands
create: Create new taskhistory: View task historysnapshot: Create task snapshot
Usage
bash
# Create task
fe-harness task create --title "First request" --json
# View history
fe-harness task history T001 --json
# Create snapshot
fe-harness task snapshot T001 --title "First request" --request "Complete page" --jsonParameters
| Parameter | Type | Description |
|---|---|---|
--title | string | Task title |
--request | string | Request description |
--json | boolean | JSON output |
verify
Execute verification modes.
Verification Modes
quick: Quick verificationfeature: Feature verificationruntime: Runtime verificationinteraction: Interaction verificationvisual: Visual verificationaudit: Audit verification
Usage
bash
fe-harness verify quick
fe-harness verify feature
fe-harness verify visual
fe-harness verify auditOutput
Generates verification reports (Markdown or JSON).
api
OpenAPI inspection and generation.
Subcommands
inspect: Inspect OpenAPI filegenerate: Generate TypeScript types
Usage
bash
fe-harness api inspect --task T001 --json
fe-harness api generate --task T001 --dry-run
fe-harness api generate --task T001Parameters
| Parameter | Type | Description |
|---|---|---|
--task | string | Task number |
--dry-run | boolean | Preview generation |
design
Design Token inspection, discovery, and comparison.
Subcommands
tokens inspect: Inspect Token filetokens discover: Discover existing stylestokens diff: Compare Token changes
Usage
bash
fe-harness design tokens inspect --json
fe-harness design tokens discover --json
fe-harness design tokens diff --jsonui
UI System Adapter management.
Subcommands
systems list: List available systemssystems install: Install adapter
Usage
bash
fe-harness ui systems list --json
fe-harness ui systems install tdesign-uniapp --dry-run --json
fe-harness ui systems install tdesign-uniappskills
Install Agent Skills.
Subcommands
list: List available Skillsinstall: Install Skill
Usage
bash
fe-harness skills list --json
fe-harness skills install --project --name consumer-h5-harness
fe-harness skills install --global --provider claudeParameters
| Parameter | Type | Description |
|---|---|---|
--project | boolean | Project-level install |
--global | boolean | Global install |
--provider | string | Provider (claude, cursor, all) |
--name | string | Skill name |
Error Handling
Common Error Codes
| Code | Description |
|---|---|
ENOENT | File not found |
EEXIST | File already exists |
INVALID_CONFIG | Invalid configuration |
MISSING_INPUT | Missing input |
Error Output Format
json
{
"error": {
"code": "ENOENT",
"message": "File not found: .fe-harness/project.yaml",
"suggestion": "Run 'fe-harness init' to initialize the project"
}
}Environment Variables
| Variable | Description |
|---|---|
FE_HARNESS_DEBUG | Enable debug mode |
FE_HARNESS_CONFIG | Custom config file path |
Configuration Files
.fe-harness/project.yaml
Project configuration file defining:
- Project type
- Tech stack
- Verification mode mapping
- File paths
AGENTS.md
Project constraint file defining:
- Business-neutral engineering rules
- Verification requirements
- Agent workflow guidelines