mcpField
H
harbor-cli

harbor-cli

github.com/harbor-frameworkTesting & quality1459 installsUpdated 31w ago
Repository

About harbor-cli

Harbor CLI manages benchmark evaluation work, from preparing tasks and datasets to running agents and reviewing trial results. It also supports job recovery, failure analysis, adapter scaffolding, and trace export.

Key features

  1. 01Run and resume evaluation jobs
  2. 02Create and assess tasks and adapters
  3. 03List and download datasets
  4. 04Inspect results in a web UI
  5. 05Summarize failures and debug trials
  6. 06Export traces in ATIF format

Use cases

  1. 01Evaluate agents on local tasks or datasets
  2. 02Debug a single trial during task development
  3. 03Review failures across a job
  4. 04Prepare benchmark adapters and tasks

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/harbor-framework/skills --skill harbor-cli

After installing, type/harbor-cliin Claude Code to confirm it loaded.

Bundled filesreferences/flags.md

Details

From the project README

Harbor CLI Reference

Harbor CLI manages the full evaluation lifecycle: creating tasks, running agents, viewing results. Install with uv tool install harbor. Global option: --version / -v.

For complete flag tables with types and defaults for every command, read references/flags.md.

Quick Reference

CommandDescription
harbor runRun evaluations (alias for harbor jobs start)
harbor jobs startStart an evaluation job
harbor jobs resumeResume an interrupted job
harbor jobs summarizeAI-powered failure summaries for a job
harbor trials startRun a single trial (debugging)
harbor trials summarizeAI-powered summary of a single trial
harbor datasets listList available datasets
harbor datasets downloadDownload a dataset
harbor adapters initScaffold a new benchmark adapter
harbor adapters reviewStructural + AI review of an adapter
harbor tasks initScaffold a new task
harbor tasks checkAI quality assessment of a task
harbor tasks start-envLaunch task environment interactively
harbor tasks debugAnalyze failing trials for a task
harbor tasks migrateConvert Terminal-Bench tasks to Harbor
harbor viewBrowse job/trial results in web UI
harbor sweeps runRun successive evaluation sweeps
harbor traces exportExport trace data in ATIF format
harbor cache cleanClean Docker images and cache directory
harbor adminAdministrative commands (hidden)

harbor run / harbor jobs start

The primary command. harbor run is an alias for harbor jobs start.

Defaults: agent = oracle, n-concurrent = 1, environment = docker, output = ./jobs.

Essential flags:

FlagShortDescription
--path-pLocal path to task directory
--dataset-dDataset from registry (e.g., [email protected])
--config-cJob config YAML/JSON file
--agent-aAgent name (default: oracle). Repeatable
--model-mModel identifier. Repeatable
--n-concurrent-nConcurrent trials (default: 1)
--env-eEnvironment backend (default: docker)
--jobs-dir-oOutput directory (default: ./jobs)
--agent-env--aePass env var to agent: KEY=VALUE. Repeatable
--agent-kwarg--akAgent kwarg: key=value. Repeatable
--task-name-tInclude tasks by glob pattern. Repeatable
--exclude-task-name-xExclude tasks by glob. Repeatable
--n-tasks-lMax tasks to run
--quiet-qSuppress trial progress
--debugEnable debug logging
--dry-runPrint config and exit
--disable-verificationSkip running tests
--no-cacheSkip Docker build cache
--artifactDownload path from env after trial. Repeatable
--timeout-multiplierScale all timeouts (default: 1.0)

Additional flags for environment kwargs (--ek), environment env vars (--ee), verifier kwargs (--vk), orchestrator kwargs (--ok), agent images, retry config, trace export, and per-phase timeout multipliers are in references/flags.md.

Examples
# Run local task with oracle (validates solution + tests)
harbor run -p ./my-task

# Run with a real agent
harbor run -p ./my-task -a claude-code -m anthropic/claude-sonnet-4-1

# Dataset evaluation with concurrency
harbor run -d [email protected] -a claude-code -m anthropic/claude-sonnet-4-1 -n 8

# Cloud environment
harbor run -d my-dataset -a claude-code -m anthropic/claude-sonnet-4-1 -e daytona

# From config file
harbor run -c eval-config.yaml

# Pass API key to agent
harbor run -p ./my-task -a claude-code -m anthropic/claude-sonnet-4-1 \
  --ae ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY

# Run subset of tasks
harbor run -d [email protected] -a claude-code -m anthropic/claude-sonnet-4-1 \
  -t "bash-*" -l 10

# Dry run
harbor run -d [email protected] -a claude-code -m anthropic/claude-sonnet-4-1 --dry-run

harbor jobs resume

Resume an interrupted or partially completed job.

harbor jobs resume -p ./jobs/my-job-2025-01-15
harbor jobs resume -p ./jobs/my-job -f AgentTimeoutError
FlagShortDescription
--job-path-pPath to job directory with config.json (required)
--filter-error-type-fRemove trials matching this error type before resuming. Repeatable. Default: CancelledError

harbor jobs summarize

Generate AI-powered failure summaries for trials in a job.

harbor jobs summarize ./jobs/my-job
harbor jobs summarize ./jobs/my-job -m sonnet --all --overwrite
FlagShortDescription
job_pathPath to job dir or parent (positional)
--model-mModel: haiku, sonnet, opus (default: haiku)
--n-concurrent-nMax concurrent queries (default: 5)
--all / --failedAnalyze all or only failed trials (default: --failed)
--overwriteOverwrite existing summary.md files

harbor trials start

Run a single trial. Useful for debugging and task development.

Key difference from harbor jobs start: the environment flag is --environment-type (not --env), and output goes to --trials-dir (default: ./trials).

FlagShortDescription
--path-pPath to local task directory
--config-cTrial config YAML/JSON
--agent-aAgent name (default: oracle)
--model-mModel for the agent
--environment-type-eEnvironment type (default: docker)
--trials-dirOutput directory (default: ./trials)
--agent-env--aeEnv var for agent: KEY=VALUE. Repeatable
--agent-kwarg--akAgent kwarg: key=value. Repeatable
--no-cleanupKeep environment after trial
--no-verifySkip running tests

Full flag list (task kwargs, git options, etc.) in references/flags.md.

# Test with oracle (validates solution + tests)
harbor trials start -p ./my-task

# Test with real agent
harbor trials start -p ./my-task -a claude-code -m anthropic/claude-sonnet-4-1

# Keep container for inspection
harbor trials start -p ./my-task -a claude-code -m anthropic/claude-sonnet-4-1 --no-cleanup

The oracle agent runs solution/solve.sh inside the environment, then the verifier runs tests/test.sh. If oracle does not get reward 1.0, your tests or solution have a bug.

harbor trials summarize

harbor trials summarize ./trials/my-trial
harbor trials summarize ./trials/my-trial -m sonnet --overwrite
FlagShortDescription
trial_pathPath to trial directory (positional)
--model-mModel: haiku, sonnet, opus (default: haiku)
--overwriteOverwrite existing summary.md

harbor datasets

harbor datasets list
harbor datasets list
harbor datasets list --registry-url https://custom-registry.example.com
harbor datasets list --registry-path ./local-registry.json

Flags --registry-url and --registry-path are mutually exclusive. Default: Harbor's public registry.

harbor datasets download
harbor datasets download [email protected]
harbor datasets download [email protected] -o ./my-tasks --overwrite
FlagShortDescription
DATASETName or name@version (positional)
--output-dir-oDownload dir (default: ~/.cache/harbor/tasks)
--overwriteRe-download even if cached

harbor adapters

harbor adapters init
harbor adapters init my-benchmark

Interactive wizard that prompts for benchmark name, adapter ID, class name, description, source URL, and license. Creates the adapter directory with template files.

harbor adapters review
harbor adapters review -p adapters/my-benchmark
harbor adapters review -p adapters/my-benchmark --skip-ai -o report.md

harbor tasks

harbor tasks init
harbor tasks init my-task
harbor tasks init my-task -p ./custom-tasks
FlagShortDescription
nameTask name (positional)
--tasks-dir-pOutput directory (default: .)
--no-pytestSkip pytest in test.sh
--no-solutionSkip solution directory
--include-canary-stringsAdd anti-cheating canary strings
--include-standard-metadataAdd full metadata template to task.toml
harbor tasks check

AI-powered quality assessment against a rubric.

harbor tasks check ./my-task
harbor tasks check ./my-task -m opus -o results.json
harbor tasks check ./my-task -r custom-rubric.toml
FlagShortDescription
taskTask name or path (positional)
--model-mModel: sonnet, opus, haiku (default: sonnet)
--output-path-oWrite JSON results here
--rubric_path-rCustom rubric (.toml, .yaml, .yml, .json)
harbor tasks start-env

Launch task environment interactively for manual inspection.

harbor tasks start-env -p ./my-task
harbor tasks start-env -p ./my-task -e daytona
harbor tasks start-env -p ./my-task --agent claude-code -m anthropic/claude-sonnet-4-1
FlagShortDescription
--path-pPath to task directory
--env-eEnvironment type (default: docker)
--all-aInclude solution and tests (default: true)
--interactive / --non-interactive-iInteractive shell (default: true)
--agentAgent to install in environment
--model-mModel for the agent

Full flag list in references/flags.md.

harbor tasks debug

Analyze failing trials for a task using AI.

harbor tasks debug my-task-id -m sonnet
harbor tasks debug my-task-id --job-id my-job --jobs-dir ./jobs
FlagShortDescription
task_idTask ID (positional)
--model-mModel for analysis
--job-idSpecific job to analyze
--jobs-dirDirectory containing jobs
harbor tasks migrate

Convert Terminal-Bench tasks to Harbor format.

harbor tasks migrate -i ./old-tasks -o ./harbor-tasks
harbor tasks migrate -i ./old-tasks -o ./harbor-tasks --cpus 2 --memory-mb 4096
FlagShortDescription
--input-iTerminal-Bench task dir or parent
--output-oOutput directory
--cpusOverride CPUs for all tasks
--memory-mbOverride memory (MB)
--storage-mbOverride storage (MB)
--gpusOverride GPUs

harbor view

Browse job/trial results in a web UI.

harbor view ./jobs/my-job
harbor view ./jobs --port 9000
harbor view ./jobs --dev
FlagShortDescription
folderDirectory with trajectories (positional)
--port-pPort or range (default: 8080-8089)
--hostBind host (default: 127.0.0.1)
--devHot-reload development mode
--buildForce rebuild viewer
--no-buildSkip auto-build

Shows job summaries, per-trial reward values, agent trajectories, and test output.

harbor sweeps run

Run successive sweeps. Each sweep drops tasks that already have at least one success, focusing effort on remaining failures.

harbor sweeps run -c sweep-config.yaml
harbor sweeps run -c sweep-config.yaml --max-sweeps 5 --trials-per-task 3
harbor sweeps run -c sweep-config.yaml --hint "Try grep to find the file first"
FlagShortDescription
--config-cJob config file (YAML/JSON)
--max-sweepsMax sweeps (default: 3)
--trials-per-taskTrials per task per sweep (default: 2)
--hintHint string passed to agent kwargs
--hints-fileJSON mapping task name to hint
--push / --no-pushPush exported datasets to HF Hub

Additional export flags in references/flags.md.

harbor traces export

Export ATIF trajectories as training datasets.

harbor traces export -p ./jobs/my-job
harbor traces export -p ./trials --filter success --push --repo my-org/traces
harbor traces export -p ./jobs/my-job --sharegpt --episodes last
FlagShortDescription
--path-pPath to trial dir or root containing trials
--recursive / --no-recursiveSearch recursively (default: recursive)
--episodesall or last per trial (default: all)
--filtersuccess, failure, or all (default: all)
--sharegpt / --no-sharegptShareGPT-formatted conversations
--push / --no-pushPush to Hugging Face Hub
--repoHF repo id (org/name)

Additional flags (--subagents, --instruction-metadata, --verifier-metadata, --verbose) in references/flags.md.

harbor cache clean

Remove Harbor Docker images and ~/.cache/harbor.

harbor cache clean
harbor cache clean --force
harbor cache clean --dry
harbor cache clean --no-docker      # Only clean ~/.cache/harbor
harbor cache clean --no-cache-dir   # Only clean Docker images
FlagShortDescription
--force-fSkip confirmation
--dryPreview without deleting
--no-dockerSkip Docker image removal
--no-cache-dirSkip ~/.cache/harbor removal

harbor admin upload-images

Build and push task Docker images to a container registry. Updates task.toml with docker_image for pre-built image workflows. Hidden from harbor --help but fully functional.

harbor admin upload-images -r my-registry.io --tag 20260317
harbor admin upload-images -r my-registry.io --dry-run -f "bash-*"

Key flags: --tasks-dir / -t (default: tasks), --registry / -r (required), --tag (default: today YYYYMMDD), --dry-run, --filter / -f, --push/--no-push (default: push), --delete/--no-delete, --parallel / -n (default: 1), --update-config/--no-update-config, --override-config/--no-override-config. Full details in references/flags.md.

Supported Agents

AgentCLI valueNotes
OracleoracleRuns solution/solve.sh. Default agent
NopnopDoes nothing (baseline)
Claude Codeclaude-codeNeeds ANTHROPIC_API_KEY
Aideraider
Codexcodex
Cline CLIcline-cliModel format: provider:model-id
Cursor CLIcursor-cli
Gemini CLIgemini-cliNeeds GOOGLE_API_KEY or GEMINI_API_KEY
GoosegooseModel format: provider/model_name
Mini SWE-agentmini-swe-agent
SWE-agentswe-agent
OpenCodeopencode
OpenHandsopenhandsNeeds LLM_API_KEY and LLM_MODEL
OpenHands SDKopenhands-sdk
Qwen Coderqwen-coder
TerminusterminusHarbor's built-in agent
Terminus 1terminus-1
Terminus 2terminus-2

Environment Backends

BackendCLI valueDescription
DockerdockerDefault. Local containers
DaytonadaytonaCloud sandbox with Docker-in-Docker
E2Be2bE2B cloud sandboxes
GKEgkeGoogle Kubernetes Engine
ModalmodalServerless with GPU support
RunlooprunloopRunloop cloud environments

Note: harbor run uses --env / -e. harbor trials start uses --environment-type / -e.

Common Workflows

Create and test a new task
harbor tasks init my-task
# Edit: task.toml, instruction.md, Dockerfile, tests/test.sh, solution/solve.sh
harbor tasks check ./my-task
harbor trials start -p ./my-task                    # oracle validates tests
harbor trials start -p ./my-task -a claude-code -m anthropic/claude-sonnet-4-1
harbor view ./trials
Run a benchmark evaluation
harbor datasets list
harbor datasets download [email protected]
harbor run -d [email protected] -a claude-code -m anthropic/claude-sonnet-4-1 -n 8
harbor view ./jobs
harbor traces export -p ./jobs/my-job --push --repo my-org/traces
Debug a failing task
harbor tasks start-env -p ./my-task         # interactive shell in the container
# Inside: bash /tests/test.sh && bash /solution/solve.sh
harbor tasks debug my-task-id -m sonnet     # AI analysis of failures
harbor trials start -p ./my-task            # re-test with oracle
Resume a failed job
harbor jobs resume -p ./jobs/my-job-2025-01-15
harbor jobs resume -p ./jobs/my-job -f AgentTimeoutError
harbor jobs summarize ./jobs/my-job

Common Gotchas

API keys: Most agents need keys passed via --ae. Claude Code needs ANTHROPIC_API_KEY, OpenHands needs LLM_API_KEY, Goose needs provider-specific keys. If the agent fails immediately, check the key.

Docker must be running. Harbor uses Docker for sandboxed environments. Network exhaustion from many concurrent trials can cause failures -- harbor cache clean helps.

Model name format varies by agent. Claude Code uses anthropic/claude-sonnet-4-1, Cline CLI uses provider:model-id (e.g., openrouter:anthropic/claude-opus-4.5), Goose uses provider/model_name. A ValueError about model format usually means the wrong format for that agent.

--env vs --environment-type: harbor run uses --env / -e. harbor trials start uses --environment-type / -e. Same short flag, different long name.

Default agent is oracle. Forgetting -a gives you the oracle agent, which just runs solve.sh. Fine for task validation, not for real evaluations.

--no-cleanup for debugging. Pass this to harbor trials start to keep the container running after a failed trial so you can inspect it.

Retry defaults skip common errors. --retry-exclude defaults to AgentTimeoutError, VerifierTimeoutError, RewardFileNotFoundError, RewardFileEmptyError, VerifierOutputParseError. These usually indicate task bugs, not transient failures.

Comments

Markdown supported