CLI Reference
gibil job
Manage background jobs started with gibil run --background
Manage background jobs started with gibil run --background. Poll for completion, view logs, cancel running jobs.
Usage
gibil job status <id> [--json]
gibil job list [--json]
gibil job cancel <id> [--json]
gibil job logs <id> [--json] [-f]Subcommands
| Subcommand | Description |
|---|---|
status <id> | Poll a job's status — returns exit code and output when done |
list | List all background jobs across all instances |
cancel <id> | Kill the remote process and mark the job as cancelled |
logs <id> | Fetch the output log from the remote server |
Options
| Flag | Description | Default |
|---|---|---|
--json | Output as JSON | false |
-f, --follow | Follow log output in real time (logs only) | false |
Examples
# Start a background job
gibil run my-app "cd /root/project && pnpm build && pnpm test" --background --json
# → { "job_id": "j-a3f1b2c8", "instance": "my-app", "status": "running" }
# Check if it's done
gibil job status j-a3f1b2c8 --json
# → { "status": "running" } or { "status": "done", "exit_code": 0, "stdout": "..." }
# List all jobs
gibil job list
# View output
gibil job logs j-a3f1b2c8
# Follow output in real time
gibil job logs j-a3f1b2c8 -f
# Cancel a stuck job
gibil job cancel j-a3f1b2c8How it works
gibil run --backgroundfires the command vianohupon the remote server- Output is captured to
/root/.gibil-jobs/{id}.log - When the command finishes, exit code is written to
/root/.gibil-jobs/{id}.exit gibil job statusSSHes in and checks for the exit file- Job metadata is stored locally in
~/.gibil/jobs/{id}.json
Jobs are cleaned up automatically when you destroy the instance with gibil destroy.
MCP equivalent
Background execution is also available via MCP tools:
vm_bash({ command: "pnpm test", background: true })
→ { job_id: "j-a3f1b2c8", status: "running" }
vm_job_status({ job_id: "j-a3f1b2c8" })
→ { status: "done", exit_code: 0, stdout: "..." }Next steps
- gibil run — foreground execution
- Parallel Test Sharding — background jobs across fleet servers
- Claude Code via MCP — MCP-based agent workflows