Small native macOS runner for one-shot Qoder agent reports.
Copy the example config and fill in your local values:
cp config.example.json config.local.jsonconfig.local.json is ignored by git. Keep real agent IDs, environment IDs, output folders, and secrets there or in your shell environment.
Example local config shape:
{
"active_profile": "default",
"profiles": {
"default": {
"base_url": "https://api.qoder.com.cn/api/v1/cloud",
"agent_id": "your-agent-id",
"agent_version": 1,
"environment_id": "your-environment-id",
"output_root": "~/QoderRuns",
"token_env": "QODER_PAT",
"env_file": ".env",
"network_mode": "auto"
}
}
}The token itself is read from the environment variable named by token_env, or from env_file when the process environment does not contain that variable. If env_file is omitted, the runner automatically checks for .env next to config.local.json. The UI also provides a temporary token field for one run; it is not written to config. The default API base URL remains https://api.qoder.com.cn/api/v1/cloud; override base_url per profile when needed.
network_mode controls app-level proxy behavior:
autofirst tries direct mode, then falls back to system networking only when direct DNS/connectivity fails.directclears common proxy environment variables and disables URLSession proxy settings.systemuses the system URLSession behavior and may use macOS proxy/VPN/TUN routing.
swift buildqoder-run is the CLI product built by this repository. Install it into a user-local bin directory and register it for tools such as academic-harness:
./scripts/install-cli.shBy default this installs qoder-run to ~/.local/bin/qoder-run and writes a secret-free registry file at ~/.config/mappedinfo/qoder-agent-runner.json. The registry stores only executable/config paths, repo metadata, and the selected profile. It never stores token values.
Useful options:
./scripts/install-cli.sh --prefix ~/.local --config config.local.json --profile default
./scripts/install-cli.sh --registry ~/.config/mappedinfo/qoder-agent-runner.jsonswift run qoder-run --prompt "调研推理时扩展与更大预训练模型在推理任务上的现状对比。"
swift run qoder-run --prompt-file /path/to/prompt.md
swift run qoder-run --config config.local.json --profile default --prompt-file /path/to/prompt.md
swift run qoder-run --prompt-file /path/to/prompt.md --run-id run_001 --metadata project_id=demo --metadata task_id=task_001
swift run qoder-run --config config.local.json --network-mode auto --prompt-file /path/to/prompt.md
swift run qoder-run --config config.local.json --profile default --check-configEach run writes a timestamped folder under the configured output_root, unless --run-id or --run-dir is supplied.
Run outputs include:
report.md: primary generated document. When the agent writes an artifact, this is copied from theWritetool content.summary.md: final assistant summary message.artifacts/: every file emitted through theWritetool.events.sse,events.jsonl,session.json,prompt.txt, andmetadata.json.
swift run QoderRunnerAppFor a double-clickable app bundle:
./scripts/build-app.sh
open dist/QoderRunner.appPackaging is intentionally local-only; this repository does not require GitHub Actions.
By default the app uses network_mode=auto: it tries no-proxy direct networking first, then falls back to system networking if direct hostname resolution/connectivity fails. Strict no-proxy behavior is still available with network_mode=direct, but it cannot bypass OS-level TUN/VPN routing when macOS itself captures traffic.