CLI Reference¶
Command and option tables are generated from the Click CLI at build time; the
section notes below are hand-written. Run hawk --help locally for the same
detail. When a command accepts an optional [EVAL_SET_ID] / [JOB_ID], omitting
it uses the last id of that kind saved on disk under ~/.config/hawk-cli/
(last-eval-set-id or last-job-id). last-job-id may be an eval set or a
scan run. Passing an id to a command that uses it writes that id back, so it
becomes the new default.
Authentication¶
Log in once with hawk login; the token is cached and refreshed automatically.
On headless hosts (containers, SSH) use --no-browser, which takes the device
code flow where the provider supports it and otherwise prints a URL you can open
on any device and paste the redirect back. --device forces the device flow,
which the default Cognito auth does not support. The auth subcommands print
raw tokens for scripting; they never start an interactive login and instead
exit with an error when you are not logged in or the session has expired.
hawk login¶
Log in to the Hawk API. Opens a browser for OAuth2 login (PKCE); falls back to a paste-back flow when no browser is available.
With HAWK_PROFILE set, creates a restricted profile instead, from your
full login (run hawk login --full first): choose its scope with --public
or --provider NAME on the first login; later logins reuse it.
Without HAWK_PROFILE, --public or --provider NAME logs this whole machine in with only that scope (a devbox): you approve it in the browser on your own computer, and the machine never holds your full login. A machine that holds your full login refuses this. --extend extends a devbox login.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--device |
boolean | Force device code flow (requires an OIDC provider with device-flow support; AWS Cognito does not have it) | False |
--no-browser |
boolean | Don't open a browser (headless/SSH environments): use the device code flow if the OIDC provider supports it, otherwise print the login URL to open on any device and paste back the redirect URL | False |
--approve |
text | Approve a credential destination set by a project .env without asking (repeatable). Only for a URL you have confirmed; for logins with no terminal, such as from a coding agent | None |
--public |
boolean | Restrict the login to reading only public data: for the profile HAWK_PROFILE names, or else for this whole machine (a devbox) | False |
--provider |
text | Restrict the login to what the cross-lab rules let NAME's models read (e.g. anthropic): for the profile HAWK_PROFILE names, or else for this whole machine (a devbox) | None |
--extend |
boolean | On a devbox: extend its login for another 12 hours, approved in the browser | False |
--full |
boolean | Log in with your full identity even with HAWK_PROFILE set, e.g. to renew the login your profiles are made from | False |
--help |
boolean | Show this message and exit. | False |
hawk logout¶
With HAWK_PROFILE set, end that profile's session and delete its local files; your full login is kept.
Without it, log this machine out of the deployment: a devbox login's session is ended and its files deleted, or else the stored full login is removed.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk auth¶
Authentication-related commands.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- access-token:
- login:
- refresh-token:
- sessions:
- status: Show whether a restricted profile or devbox login is in use, and its scope and expiry.
hawk auth access-token¶
Print a valid access token to stdout.
Refreshes an expired access token when possible. Intended for scripting, so it never starts an interactive login: exits with an error if you are not logged in or the session has expired. With HAWK_ACCESS_TOKEN set, it prints that token as it is, and exits with an error once it has expired. With HAWK_PROFILE set, it prints the profile's token, valid for at least 15 more minutes unless the profile's session ends sooner.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--profile |
text | Print this restricted profile's token, from its own deployment, whatever HAWK_PROFILE and HAWK_API_URL say. | None |
--api-url |
text | With --profile: the deployment the caller was set up for; refuses the profile if it has since been recreated against another. | None |
--help |
boolean | Show this message and exit. | False |
hawk auth login¶
Log in to the Hawk API. Opens a browser for OAuth2 login (PKCE); falls back to a paste-back flow when no browser is available.
With HAWK_PROFILE set, creates a restricted profile instead, from your
full login (run hawk login --full first): choose its scope with --public
or --provider NAME on the first login; later logins reuse it.
Without HAWK_PROFILE, --public or --provider NAME logs this whole machine in with only that scope (a devbox): you approve it in the browser on your own computer, and the machine never holds your full login. A machine that holds your full login refuses this. --extend extends a devbox login.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--device |
boolean | Force device code flow (requires an OIDC provider with device-flow support; AWS Cognito does not have it) | False |
--no-browser |
boolean | Don't open a browser (headless/SSH environments): use the device code flow if the OIDC provider supports it, otherwise print the login URL to open on any device and paste back the redirect URL | False |
--approve |
text | Approve a credential destination set by a project .env without asking (repeatable). Only for a URL you have confirmed; for logins with no terminal, such as from a coding agent | None |
--public |
boolean | Restrict the login to reading only public data: for the profile HAWK_PROFILE names, or else for this whole machine (a devbox) | False |
--provider |
text | Restrict the login to what the cross-lab rules let NAME's models read (e.g. anthropic): for the profile HAWK_PROFILE names, or else for this whole machine (a devbox) | None |
--extend |
boolean | On a devbox: extend its login for another 12 hours, approved in the browser | False |
--full |
boolean | Log in with your full identity even with HAWK_PROFILE set, e.g. to renew the login your profiles are made from | False |
--help |
boolean | Show this message and exit. | False |
hawk auth refresh-token¶
Print the current refresh token.
Never starts an interactive login: exits with an error if no refresh token is stored. Not available with HAWK_PROFILE set.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk auth sessions¶
List and end the sessions behind your restricted profiles. These commands use your full login, even with HAWK_PROFILE set.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- delete: End one session, given by its ID.
- list: Show each session's profile, host, creation, last use and expiry.
hawk auth sessions delete¶
End one session, given by its ID.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk auth sessions list¶
Show each session's profile, host, creation, last use and expiry.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk auth status¶
Show whether a restricted profile or devbox login is in use, and its scope and expiry.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Evaluations¶
hawk eval-set CONFIG submits an eval set (a YAML config — see
Running Evaluations and the
Eval Set Config Reference). hawk eval-set resume
restarts a crashed run from its last checkpoint. Both accept --priority low|medium|high,
defaulting to medium for the current launch or resume.
resume with --config FILE lets you resume with an updated,
checkpoint-compatible config (e.g. to fix a crashing scorer); it requires an
explicit ID and does not validate compatibility — see
Checkpointing & Resume for what's safe to change. If the
previous run has finished (or crashed), resume can clear its leftover release
automatically. A running job or a credential-mode mismatch returns 409; see
Credential mode.
With restricted credentials, unavailable state observations or pending cleanup
return 503 with Retry-After: 5. Follow Delete and resume
for recovery and retry guidance; some states require explicit deletion.
Sample-level checkpointing is configured in the eval-set YAML (checkpoint.enabled);
see Checkpointing & Resume for requirements, agent support, and
the resume workflow.
If the deployment enables its submission guard, hawk eval-set and
hawk eval-set resume count outstanding runner Jobs for the deployment and
submitting user before launch. --force skips the guard and its count;
authentication, config validation, and native admission still
apply.
hawk eval-set¶
Run, resume, and manage Inspect eval sets.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- resume: Resume a previously-launched eval set from its last checkpoint.
- run: Run an Inspect eval set remotely.
hawk eval-set resume¶
Resume a previously-launched eval set from its last checkpoint.
By default the eval-set configuration is restored from the state saved when the eval set was first created; pass --config to relaunch with an updated, checkpoint-compatible config (e.g. to fix a crashing scorer). Secrets must be re-provided via --secret/--secrets-file. Only checkpointed samples resume in progress; others restart from the beginning.
A leftover runner release from the finished/crashed run is cleared
automatically (resume reads the Kubernetes Job status and only tears down a
provably-finished Job). Resume fails with a conflict only if that run is
still running -- stop it first with hawk stop or hawk delete -- or if its
state can't be confirmed, in which case run hawk delete <id> and retry.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--image |
text | Full container image URI for the runner (e.g., 'ghcr.io/org/runner:v1') | None |
--image-tag |
text | Inspect image tag | None |
--secrets-file |
file | Secrets file to load environment variables from | None |
--secret |
text | Name of environment variable to pass as secret (can be used multiple times) | None |
--config |
file | Resume with this updated eval-set config (e.g. to fix a crashing scorer or bump a task pin). Must be checkpoint-compatible. Requires an explicit EVAL_SET_ID. | None |
--skip-confirm |
boolean | Skip the unknown-field confirmation when validating --config | False |
--allow-sensitive-cross-lab-scan |
boolean | Allow private transcript inputs to be sent to a different provider, when the deployment operator permits the override. | False |
--force |
boolean | Bypass the outstanding-job guard for an intentional large submission. | False |
--restricted-credentials / --user-credentials |
boolean | Choose restricted or user credentials; omit to use the server default. Resumes must match the job's existing mode. | None |
--priority |
choice (low | medium | high) |
Priority for cluster admission and inference requests. | medium |
--help |
boolean | Show this message and exit. | False |
hawk eval-set run¶
Run an Inspect eval set remotely.
EVAL_SET_CONFIG_FILE is a YAML file that contains a grid of tasks, solvers, and models. This configuration will be passed to the Inspect API and then an Inspect "runner" job, where the eval set will be run.
You can set environment variables for the environment where the Inspect
process will run using --secret or --secrets-file. These work for
non-sensitive environment variables as well, not just "secrets", but they're
all treated as sensitive just in case.
By default, API calls to model providers detected in your eval-set
configuration are automatically redirected to an LLM proxy server and use
OAuth JWTs (instead of real API keys) for authentication. This includes
native providers (OpenAI, Anthropic, Google Vertex) as well as
OpenAI-compatible providers accessed via the openai-api/<provider>/<model>
pattern (e.g., OpenRouter, DeepSeek, Groq, Together, and others).
The following environment variables are automatically set for convinience: - BASE_API_KEY: API key for the LLM proxy (your OAuth JWT) - AI_GATEWAY_BASE_URL: Base URL of the LLM proxy server
As an escape hatch (e.g. in case our LLM proxy server doesn't support some
newly released feature or model), you can override provider API keys and
base URLs using --secret. NOTE: you should only use this as a last resort,
and this functionality might be removed in the future.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--image |
text | Full container image URI for the runner (e.g., 'ghcr.io/org/runner:v1') | None |
--image-tag |
text | Inspect image tag | None |
--secrets-file |
file | Secrets file to load environment variables from | None |
--secret |
text | Name of environment variable to pass as secret (can be used multiple times) | None |
--skip-confirm |
boolean | Skip confirmation prompt for unknown configuration warnings | False |
--log-dir-allow-dirty |
boolean | Allow unrelated eval logs to be present in the log directory | False |
--allow-sensitive-cross-lab-scan |
boolean | Allow private transcript inputs to be sent to a different provider, when the deployment operator permits the override. | False |
--monitor |
boolean | Enable Datadog monitoring. Alerts via Slack DM if errors appear during execution. | False |
--force |
boolean | Bypass the outstanding-job guard for an intentional large submission. | False |
--restricted-credentials / --user-credentials |
boolean | Choose restricted or user credentials; omit to use the server default. Resumes must match the job's existing mode. | None |
--priority |
choice (low | medium | high) |
Priority for cluster admission and inference requests. | medium |
--help |
boolean | Show this message and exit. | False |
Scans¶
hawk scan run CONFIG starts a Scout scan; hawk scan resume continues an
interrupted one. hawk scan run CONFIG --all scans every imported eval set you can read as one
restricted scan (the config lists no sources or filters; --image or --image-tag
must name a runner from this release or later). Its scanners call no model unless
scanner_models lists candidates; then Hawk launches one scan per candidate that
gets evals, prints each id, and saves any refused evals as unscannable-<UTC time>.yaml
(see Model scanners over everything you can read).
Each scan runs as N worker pods plus a small orchestrator pod; the API picks N from the
corpus size and the per-worker CPU, runner.shards in the config overrides it, and
hawk scan resume --shards N overrides it for one resume.
hawk scan run CONFIG --transcripts FILE scans exactly the samples whose uuids
are listed in FILE (see Scanning a selection of transcripts),
also split into one scan per candidate when scanner_models is set.
hawk scan import PATH ingests a locally-produced scan directory
(or a folder of them) into the warehouse under a single run — pass --name NAME
to set a friendly slug. The scanned transcripts must already be in the warehouse.
The same optional submission guard covers hawk scan run and hawk scan resume.
Their --force option skips the guard and its count, as described above.
Both accept --priority low|medium|high, defaulting to low for the current
launch or resume.
hawk scan¶
Run and manage Scout scans.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- export: Export scan results as CSV.
- import: Upload locally-produced Scout scan(s) into Hawk's warehouse.
- resume: Resume a Scout scan.
- run: Run a Scout Scan remotely.
hawk scan export¶
Export scan results as CSV.
Note: The input and scan_events columns are excluded from the export
to reduce file size and memory usage.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output, -o |
path | Output file path (defaults to current directory with auto-generated filename) | None |
--help |
boolean | Show this message and exit. | False |
hawk scan import¶
Upload locally-produced Scout scan(s) into Hawk's warehouse.
PATH is either a single Scout scan results directory (the scan_id=...
directory Scout writes) or a folder of such directories. Each scan's
_scan.json, _summary.json, and per-scanner .parquet files are uploaded
under one newly-allocated, imported--prefixed scan run.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--name |
text | Friendly name for the imported scan (used in the auto-generated scan_run_id). | None |
--code-sources |
file | JSON array declaring all code sources used by the imported results, as canonical identities (github.com/org/repo or a normalized package name). Use [] for no additional sources beyond log origins. Without a file, confirm detected sources interactively; --yes alone or no identified sources records unknown. | None |
--yes, -y |
boolean | Skip the import confirmation (required in scripts). | False |
--help |
boolean | Show this message and exit. | False |
hawk scan resume¶
Resume a Scout scan.
The scan configuration is restored from the state saved when the scan was first created. Secrets must be re-provided via --secret or --secrets-file.
If no SCAN_RUN_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-scan-run-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--image |
text | Full container image URI for the runner (e.g., 'ghcr.io/org/runner:v1') | None |
--image-tag |
text | Inspect image tag | None |
--secrets-file |
file | Secrets file to load environment variables from | None |
--secret |
text | Name of environment variable to pass as secret (can be used multiple times) | None |
--allow-sensitive-cross-lab-scan |
boolean | Allow scanning private model transcripts with scanners their read policy doesn't allow (honoured only if the operator enables overrides). | False |
--shards |
integer range (1 and above) |
Worker pods for this resume of a scan of every readable eval set (default: recomputed from the corpus). | None |
--force |
boolean | Bypass the outstanding-job guard for an intentional large submission. | False |
--restricted-credentials / --user-credentials |
boolean | Choose restricted or user credentials; omit to use the server default. Resumes must match the job's existing mode. | None |
--priority |
choice (low | medium | high) |
Priority for cluster admission and inference requests. | low |
--help |
boolean | Show this message and exit. | False |
hawk scan run¶
Run a Scout Scan remotely.
SCAN_CONFIG_FILE is a YAML file that contains a matrix of scanners and models. This configuration will be passed to the Inspect API and then an Inspect "runner" job, where the scan will be run.
You can set environment variables for the environment where the Inspect
process will run using --secret or --secrets-file. These work for
non-sensitive environment variables as well, not just "secrets", but they're
all treated as sensitive just in case.
By default, API calls to model providers detected in your scan
configuration are automatically redirected to an LLM proxy server and use
OAuth JWTs (instead of real API keys) for authentication. This includes
native providers (OpenAI, Anthropic, Google Vertex) as well as
OpenAI-compatible providers accessed via the openai-api/<provider>/<model>
pattern (e.g., OpenRouter, DeepSeek, Groq, Together, and others).
The following environment variables are automatically set for convinience: - BASE_API_KEY: API key for the LLM proxy (your OAuth JWT) - AI_GATEWAY_BASE_URL: Base URL of the LLM proxy server
As an escape hatch (e.g. in case our LLM proxy server doesn't support some
newly released feature or model), you can override provider API keys and
base URLs using --secret. NOTE: you should only use this as a last resort,
and this functionality might be removed in the future.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--image |
text | Full container image URI for the runner (e.g., 'ghcr.io/org/runner:v1') | None |
--image-tag |
text | Inspect image tag | None |
--secrets-file |
file | Secrets file to load environment variables from | None |
--secret |
text | Name of environment variable to pass as secret (can be used multiple times) | None |
--skip-confirm |
boolean | Skip confirmation prompt for unknown configuration warnings | False |
--allow-sensitive-cross-lab-scan |
boolean | Allow scanning private model transcripts with scanners their read policy doesn't allow (honoured only if the operator enables overrides). | False |
--all |
boolean | Scan every imported eval set you can read as one restricted scan, or with scanner_models one per candidate that gets evals, each split across worker pods the API sizes from the corpus; runner.shards overrides the pod count and runner.cpu/runner.memory size one worker. --image or --image-tag must name a runner from this release or later. |
False |
--transcripts |
file | Scan exactly the samples whose uuids are listed in FILE (one per line, up to 5,000,000) as one restricted scan, or with scanner_models one per candidate that gets transcripts. The list is uploaded. Equivalent to transcripts.selection_file in the config; cannot be combined with --all or with transcripts.sources/filter. |
None |
--force |
boolean | Bypass the outstanding-job guard for an intentional large submission. | False |
--restricted-credentials / --user-credentials |
boolean | Choose restricted or user credentials; omit to use the server default. Resumes must match the job's existing mode. | None |
--priority |
choice (low | medium | high) |
Priority for cluster admission and inference requests. | low |
--help |
boolean | Show this message and exit. | False |
Running locally¶
hawk local eval-set and hawk local scan run a config on your own machine
instead of submitting it to the cluster — useful for quick iteration. Both accept
--priority low|medium|high for inference through Middleman, including with
--direct. Evals default to medium; scans default to low.
hawk local¶
Run evaluations and scans locally.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
hawk local eval-set¶
Run an Inspect eval set locally.
Requires installing hawk with the runner extra.
CONFIG_FILE is a YAML file with the eval set configuration.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--direct |
boolean | Run in current environment instead of creating a new venv | False |
--secrets-file |
file | Secrets file to load environment variables from | None |
--secret |
text | Name of environment variable to pass as secret (can be used multiple times) | None |
--priority |
choice (low | medium | high) |
Priority for cluster admission and inference requests. | medium |
--help |
boolean | Show this message and exit. | False |
hawk local scan¶
Run a Scout scan locally.
Requires installing hawk with the runner extra.
CONFIG_FILE is a YAML file with the scan configuration.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--direct |
boolean | Run in current environment instead of creating a new venv | False |
--secrets-file |
file | Secrets file to load environment variables from | None |
--secret |
text | Name of environment variable to pass as secret (can be used multiple times) | None |
--priority |
choice (low | medium | high) |
Priority for cluster admission and inference requests. | low |
--help |
boolean | Show this message and exit. | False |
Monitoring¶
Watch a running job with hawk watch (live per-task / per-sample view — the same
one the web viewer shows, streamed over SSE with a polling fallback). hawk logs
tails the job's logs, hawk status prints a one-shot JSON report.
If admission status is unknown while a job is pending, the CLI shows
Status unavailable. hawk watch keeps polling until status reads recover, even
if results from an earlier attempt suggest completion. This avoids exiting while a
resumed job's current status cannot be confirmed.
hawk trace streams the Inspect trace log — enter/exit events for model
calls, subprocesses, and other long-running actions — which is the fastest way to
see where a stuck eval is blocked. Records format like hawk logs output; --raw
emits the underlying JSON-lines for inspect trace anomalies. It needs the same
model-group permissions as viewing results and only works while the runner pod is
live.
hawk status performance statistics cover imported samples only
The performance block is aggregated from the warehouse, and samples reach
the warehouse only once their eval log is written to S3 and imported. Samples
that are still running are not in the warehouse yet, so they contribute
nothing to the sums or counts — a report taken mid-run describes the work
finished so far, not the work in flight. On an eval set where nothing has
been imported yet, the timing sums are null and the counts are 0.
For in-flight progress use hawk watch, which reads the runner's live sample
buffer instead of the warehouse.
hawk trace abc123 -f # Follow new trace lines live (Ctrl-C to stop)
hawk trace abc123 --full --raw > trace.log # Raw trace for: inspect trace anomalies trace.log
hawk stacktrace captures a live py-spy dump of the runner process (PID 1) —
shows exactly where each thread is blocked right now. Live only.
hawk logs¶
View logs for a job.
Examples:
hawk logs abc123 # Show last 100 logs
hawk logs abc123 -n 50 # Show last 50 lines
hawk logs -f # Follow mode (Ctrl+C to stop)
If no JOB_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-job-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-n, --lines |
integer | Number of lines to show (default: 100) | 100 |
-f, --follow |
boolean | Follow mode - continuously poll for new logs | False |
--hours |
integer | Hours of data to search (default: 5 years) | 43800 |
--poll-interval |
float | Seconds between polls in follow mode (default: 3.0) | 3.0 |
--help |
boolean | Show this message and exit. | False |
hawk status¶
Generate a monitoring report for a job.
Fetches logs, metrics, pod status, etc. and returns it as JSON.
If no JOB_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-job-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--hours |
integer | Hours of log data to fetch (default: 24) | 24 |
--help |
boolean | Show this message and exit. | False |
hawk watch¶
Watch live eval-set status: per-task / per-sample progress, retries, limits, and scheduling/pod trouble.
Streams updates via SSE until the run finishes (Ctrl-C to stop). Use --no-follow for a one-shot snapshot, or --json for the raw payload.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--no-follow |
boolean | Print a single snapshot and exit instead of streaming live updates. | False |
--json |
boolean | Output the raw status JSON (implies a single snapshot). | False |
--help |
boolean | Show this message and exit. | False |
hawk trace¶
View the Inspect trace log from a job's running runner pod.
The trace log records enter/exit events for model calls, subprocesses, and other long-running actions — useful for diagnosing a stuck or in-progress eval. Only available while the runner pod is running.
Trace records are formatted like hawk logs output; pass --raw for the
underlying JSON-lines (e.g. to analyze with inspect trace anomalies).
Examples:
hawk trace abc123 # Last 100 trace lines
hawk trace abc123 -f # Follow new lines (Ctrl-C to stop)
hawk trace abc123 --full --raw > trace.log # Full raw trace; then:
# inspect trace anomalies trace.log
If no JOB_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-job-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-n, --lines |
integer range (between 1 and 50000) |
Number of lines to show from the end of the trace (default: 100; ignored with --full) | None |
--full |
boolean | Fetch the entire trace file instead of just the tail | False |
-f, --follow |
boolean | Follow the trace, printing new lines as the eval appends them (Ctrl-C to stop) | False |
--poll-interval |
float range (0.5 and above) |
Seconds between polls in --follow mode (default: 3.0) | 3.0 |
--raw |
boolean | Output the unmodified JSON-lines trace records instead of formatted lines (use for inspect trace anomalies and other tooling) |
False |
--help |
boolean | Show this message and exit. | False |
hawk stacktrace¶
Capture a live Python stack trace of a job's running runner process.
Runs py-spy dump against the inspect runner (PID 1) inside the runner pod
and prints the result — useful for diagnosing a stuck or in-progress eval,
since it shows exactly where each thread is blocked right now. Only
available while the runner pod is running.
Examples:
hawk stacktrace abc123 # Text dump of the runner
hawk stacktrace abc123 --json # py-spy JSON (for tooling)
hawk stacktrace abc123 --native # Include native stack frames
If no JOB_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-job-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--native |
boolean | Include native (C-extension) stack frames. | False |
--json |
boolean | Output py-spy's JSON instead of the formatted text dump. | False |
--help |
boolean | Show this message and exit. | False |
Interactive sessions¶
Attach an interactive client to a running eval's pod through the per-env relay: the CLI opens a loopback TCP bridge and tunnels it to the pod over an authenticated WebSocket, reusing your hawk login token.
hawk acp [RUN_ID] is shorthand for hawk attach [RUN_ID] with no --port; both default to the last job used by hawk on this machine when RUN_ID is omitted. The relay URL is discovered from the server (GET /auth/config); set HAWK_RELAY_URL to override. The loopback port is unauthenticated for the session's lifetime — any local process can use it to reach the pod as you, the same trust model as kubectl port-forward.
hawk acp¶
Attach to a running eval's ACP server via the relay.
Bridges a local loopback port to the run's ACP (Agent Client Protocol)
server through the per-env relay and launches inspect acp against it
(unless --no-launch). This fronts Inspect's own inspect acp client; ACP is
the Agent Client Protocol (https://agentclientprotocol.com).
If no RUN_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-job-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--launch / --no-launch |
boolean | Launch inspect acp against the bridge, or just print the address. |
True |
--local-port |
integer range (between 1 and 65535) |
Bind the local bridge to this loopback port instead of an ephemeral one (useful with --no-launch so scripts connect to a known address). | None |
--help |
boolean | Show this message and exit. | False |
hawk attach¶
Bridge a local TCP port to a running eval's pod via the relay.
Without --port the relay resolves the run's ACP server and launches
inspect acp against it. With --port it bridges an arbitrary container port
and does not launch inspect acp (which only speaks ACP) unless you pass
--launch. See hawk acp for the ACP shorthand.
If no RUN_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-job-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--port |
integer range (between 1 and 65535) |
Target this container port instead of the run's ACP server. | None |
--launch / --no-launch |
boolean | Launch inspect acp against the bridge (default: on, unless --port is given). |
None |
--local-port |
integer range (between 1 and 65535) |
Bind the local bridge to this loopback port instead of an ephemeral one (useful with --no-launch so scripts connect to a known address). | None |
--help |
boolean | Show this message and exit. | False |
Viewing results¶
hawk web and hawk view-sample open results in the browser. hawk list ...
enumerates jobs, eval sets, evals, and samples. hawk transcript / hawk transcripts
download sample transcripts (markdown by default, --raw for JSON).
hawk search QUERY runs the viewer's full-text transcript search from the
terminal. It prints one page of matches and, when there are more, a --cursor
hint on stderr that continues with the next page (same query and options).
Like the viewer, it falls back to an unranked newest-first scan when
the index is too slow (skipping attachment text, with no per-transcript cap),
printing progress on stderr until a page has matches. An unscoped query too
broad to rank shows its newest matches with the server's notice on stderr; if
even those ran out of time the command fails, saying so, rather than
reporting no matches, since the search did not finish.
--csv [FILE] streams every match in one request and writes one CSV
row per hit (eval set, sample, matched node, snippet without highlight markers,
and the viewer link), with progress on stderr; --cursor also resumes an
export the server stopped early. A query too broad to rank exports only its 10,000
newest matches, with a note on stderr; narrow it or add --eval-set-id for
everything. If that capped export fails part-way, the command exits non-zero
and says the file is incomplete: --cursor cannot resume it, so run it again.
hawk download fetches raw .eval log files via presigned S3 URLs;
hawk transcript and hawk transcripts read the same presigned URLs directly.
hawk transcripts without a small --limit downloads eval files concurrently
and writes each transcript as its file finishes, so output is in
download-completion order rather than listing order; with a --limit of 10 or
fewer it range-reads the samples one at a time, in listing order.
hawk download-artifacts fetches sample artifact files, written as
<output-dir>/<task>_<model>_<sample-id>_epoch<n>_<sample-uuid>/<artifact-path>.
Missing metadata is omitted; at minimum the UUID remains. Default output dir:
artifacts/<eval-set-id>; existing files are overwritten.
hawk files (or hawk fs for short) lists and copies any file in an eval
set's or scan's folder, as aws s3 ls, cp and sync do: logs.json,
.config.yaml, artifacts/, a running eval's .buffer/, a scan's .parquet
results. Its PATH is the path in the bucket, evals/<eval-set-id>/ or
scans/<scan-run-id>/ and then a folder or file in it, or the
s3://<bucket>/... URL that aws s3, Inspect and the warehouse print for one:
its bucket isn't checked, as hawk reads the deployment it is logged in to,
which it names on stderr. A PATH names a file or a folder, never a string prefix:
evals/my-eval/progress.json is not progress.json.bak. hawk files ls PATH
lists one level, folders first, then
each file's size and path, printing every path so it pastes back as a PATH; -r
lists every file under PATH. --urls prints each file's path with a presigned
URL, valid for 15 minutes, that accepts Range requests. The URLs answer GET
only, so tools that send HEAD first, such as DuckDB, need the file downloaded.
hawk files cat PATH writes a file to stdout, and with --range only part of
it, in HTTP's forms: 0-65535, 1000- to the end, or -65536 for the last
64 KiB, where a .eval file keeps its zip index. On a terminal, control
characters print escaped; piped or redirected, the bytes pass as they are.
hawk files cp SRC DEST copies a file (with --range, only those bytes of it,
without S3's time), or with -r a folder, and hawk files sync SRC DEST copies
a folder, skipping files already in DEST with the same size and modification
time, so rerunning it picks up only what changed; it never deletes local files.
As with aws s3, a folder's files land under DEST by their path inside it
(hawk files sync evals/my-eval/.buffer/ buf writes buf/...), and a file
lands in DEST if DEST is a folder or ends in /, and otherwise as DEST; a DEST
of - writes the one file to stdout, as hawk files cat does (cp -r and
sync refuse it). Each file gets
its S3 modification time. Downloads
leave out repository metadata that agents write into artifacts (.git and .hg
directories, bare git repositories, counting files already in DEST) unless you
pass --include-git: its config can run commands once git or hg, or a shell
prompt that calls them, runs inside the copy. .env files are left out the same
way, since hawk run inside the copy would read one and could send its requests
and credentials elsewhere. Leaving these out doesn't make a copy safe to work in:
treat it as untrusted, since other agent-written files, such as a json.py that
Python imports from the current directory, or the .claude/settings.json and
.mcp.json a coding agent started there loads, can still run if you work inside
it.
Setting git config --global safe.bareRepository explicit guards against the
bare-repository case everywhere. Downloads also
skip, with a warning, paths that can't be a local file name, names shaped like a
Windows short name (NAME~1, which on Windows, WSL and FAT drives can open
another file), a path that would land through a link or junction already in
DEST, and, on macOS and Windows, a second path that differs from another only in
case or Unicode form. A copy that skipped any of these exits with status
2 once the rest are copied, as aws s3 does for files it skips, so a script can
tell it is incomplete. A file name you type as DEST is yours, and isn't checked.
These replace reading the bucket with the aws CLI or an S3 library:
| Instead of | Run |
|---|---|
aws s3 ls .../evals/<id>/ |
hawk files ls evals/<id>/ |
aws s3 ls --recursive .../evals/<id>/ |
hawk files ls -r evals/<id>/ |
aws s3 cp .../evals/<id>/<path> . |
hawk files cp evals/<id>/<path> . |
aws s3 cp .../evals/<id>/<path> - |
hawk files cat evals/<id>/<path> |
aws s3 cp --recursive .../evals/<id>/<folder>/ DIR |
hawk files cp -r evals/<id>/<folder>/ DIR |
aws s3 sync .../evals/<id>/ DIR |
hawk files sync evals/<id>/ DIR |
aws s3 sync .../evals/<id>/.buffer/ DIR |
hawk files sync evals/<id>/.buffer/ DIR |
aws s3api get-object --range bytes=0-65535 ... out |
hawk files cp evals/<id>/<path> out --range 0-65535 |
aws s3 sync .../scans/<id>/ DIR |
hawk files sync scans/<id>/ DIR |
boto3 / s3fs in a script |
HawkClient.list_files, list_level and get_file_download_urls (Python client) |
hawk web¶
Open the eval set log viewer in your web browser.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk view-sample¶
Open the sample log viewer in your web browser.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk search¶
Full-text search across the transcripts you can read.
QUERY uses web-search syntax: words are ANDed, "quoted phrases" match in order, and -word excludes. Words match across inflections and common function words are ignored. Prints the first page of matches, at most three per transcript, and a --cursor for the next page when there are more. When the index is too slow it falls back to an unranked newest-first scan that skips attachment text and does not cap hits per transcript, reporting progress on stderr until a page has matches or two minutes pass, then printing a --cursor to continue. An unscoped query too broad to rank shows its newest matches and the server's notice; if even those ran out of time the command fails, saying so, instead of reporting no matches. --csv exports every match with eval set, sample, matched node and viewer link columns. Highlight markers are removed from exported snippets, and a cell that a spreadsheet would read as a formula is prefixed with an apostrophe. A page that keeps failing with a server error ends the run with the rows so far written and a --cursor to resume. The export of a query too broad to rank stops at its 10,000 newest matches; if it fails part-way it cannot be resumed, and the command exits non-zero.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--eval-set-id |
text | Search one eval set instead of every transcript you can read. | None |
--sort |
choice (rank | recency) |
rank orders by relevance over each table's most recent matches and is the default for browsing; recency orders newest-first and walks every match, and is the only order --csv exports. | None |
--limit |
integer range (between 1 and 200) |
Results per request (and per page without --csv). | 200 |
--csv |
file | Export every match as CSV to FILE, or to stdout when FILE is omitted. Pages through all results without the viewer's per-transcript cap; progress goes to stderr. | None |
--cursor |
text | Continue from the cursor a previous run printed, the next page when browsing or the rest of an interrupted export (valid for an hour); keep the same QUERY and options. With --csv, appends to the CSV file without a header row. | None |
--help |
boolean | Show this message and exit. | False |
hawk list¶
List evaluations or samples in an eval set.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
hawk list eval-sets¶
List eval sets.
The Status column shows the same labels as hawk list jobs. - means the
eval set has no job (for example, an imported eval set); unknown means the
status lookup failed, so the listing is shown without it; Status unavailable
means the job exists but its admission status cannot be read right now.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--limit |
integer | Maximum number of eval sets to show | 10 |
--search |
text | Filter eval sets | None |
--help |
boolean | Show this message and exit. | False |
hawk list evals¶
List all evaluations in an eval set.
Shows task name, model, status, and sample counts for each evaluation.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk list jobs¶
List launched jobs (eval-sets and scans).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--all |
boolean | Show all jobs the caller can see (default: only the caller's own jobs; always on with HAWK_PROFILE set, whose session owns none) | False |
--limit |
integer | Maximum number of jobs to show | 10 |
--help |
boolean | Show this message and exit. | False |
hawk list samples¶
List samples within an eval set.
Shows sample UUID, ID, epoch, status, and scores for each sample.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--eval |
text | Filter to a specific eval file | None |
--limit |
integer | Maximum number of samples to show | 50 |
--json |
boolean | Output raw JSON instead of a table (includes each sample's scores, with intermediates flagged) | False |
--help |
boolean | Show this message and exit. | False |
hawk transcript¶
Download transcript for a single sample.
Shows all conversation turns with role, content, tool calls, and scores.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output-dir |
path | Write transcript to a file in this directory | None |
--raw |
boolean | Output raw sample JSON instead of markdown | False |
--help |
boolean | Show this message and exit. | False |
hawk transcripts¶
Download transcripts for all samples in an eval set.
Fetches all samples and outputs them with separator headers. Use --output-dir to write individual files instead of stdout. Use --limit to restrict the number of samples.
Eval files are fetched directly from S3 via presigned URLs. Without a small --limit, files are downloaded concurrently and transcripts are written as each file finishes, so the order is not the listing order; with a --limit of 10 or fewer, samples are read one at a time in listing order.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--output-dir |
path | Write transcripts to individual files in this directory | None |
--limit |
integer | Limit number of samples. Small limits (10 or fewer) read only the selected samples from each eval file; larger limits download the containing files whole. | None |
--raw |
boolean | Output raw sample JSON instead of markdown | False |
--help |
boolean | Show this message and exit. | False |
hawk download¶
Download eval log files via presigned S3 URLs.
Downloads eval files directly from S3, bypassing the S3 Object Lambda Access Point. Use this for large eval files that time out via the OLAP.
Use --list to list available eval files without downloading.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--eval |
text | Download a specific eval file (by filename) | None |
--output-dir, -o |
directory | Output directory (default: current directory) | . |
--list |
boolean | List eval files without downloading | False |
--jobs, -j |
integer range (1 and above) |
Number of concurrent downloads. | 16 |
--force |
boolean | Re-download files even if they already exist locally. | False |
--help |
boolean | Show this message and exit. | False |
hawk download-artifacts¶
Download sample artifact files for an eval set.
Downloads the artifacts tree for all samples in an eval set, or for one
sample when --sample is provided. Each sample's files land in a folder
named <task>_<model>_<sample-id>_epoch<n>_<sample-uuid>, with missing
metadata omitted. Existing files are overwritten.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--sample |
text | Download artifacts for a single sample UUID. | None |
--output-dir, -o |
directory | Output directory (default: artifacts/<eval-set-id>). | None |
--help |
boolean | Show this message and exit. | False |
hawk files¶
List and copy the files in an eval set's or scan's folder, as aws s3 ls, cp and sync do.
PATH is a path in the bucket: evals/<eval-set-id>/ or scans/<scan-run-id>/, then a folder or file in it, or the s3://<bucket>/... URL that aws s3 and Inspect print for one; its bucket isn't checked, as hawk reads the deployment it is logged in to, which it names on stderr. A PATH names a file or a folder, never a string prefix. hawk fs is short for hawk files.
hawk files ls evals/my-eval/ # one level
hawk files ls -r evals/my-eval/.buffer/ # every file under a folder
hawk files cat evals/my-eval/logs.json | jq . # a file, to stdout
hawk files cat evals/my-eval/a.eval --range -65536
hawk files cp evals/my-eval/logs.json . # one file
hawk files cp -r evals/my-eval/artifacts/<sample-uuid>/ out/
hawk files cp -r s3://<bucket>/evals/my-eval/artifacts/<sample-uuid>/ out/
hawk files sync evals/my-eval/ ./my-eval # a run, then what changed
hawk files sync scans/my-scan/ ./my-scan
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk files cat¶
Write the file at PATH to stdout, or with --range part of it.
On a terminal, control characters print escaped; piped or redirected, the bytes are written as they are.
hawk files cat evals/my-eval/logs.json | jq .
hawk files cat evals/my-eval/a.eval --range 0-65535 > head.bin
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--range |
text | Only these bytes, counted from 0, both ends included: 0-65535 is the first 64 KiB, 1000- everything from byte 1000, and -65536 the last 64 KiB. | None |
--help |
boolean | Show this message and exit. | False |
hawk files cp¶
Copy the file at SRC to DEST, or with -r every file under the folder at SRC.
A file lands in DEST if DEST is a folder or ends in /, and otherwise as DEST; a DEST of - writes it to stdout, as hawk files cat does, --range included. A folder's files land under DEST by their path inside it. Every file is downloaded again; hawk files sync skips those already copied. Exits 2 if it skipped a file it can't write safely here, each named as it is skipped.
hawk files cp evals/my-eval/logs.json .
hawk files cp evals/my-eval/logs.json ./logs-copy.json
hawk files cp evals/my-eval/a.eval head.bin --range 0-65535
hawk files cp evals/my-eval/logs.json - | jq .
hawk files cp -r evals/my-eval/.buffer/ ./buffer
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--recursive, -r |
boolean | Copy every file under the folder at SRC. | False |
--range |
text | Copy only these bytes of the file, counted from 0, both ends included: 0-65535 is the first 64 KiB, 1000- everything from byte 1000, and -65536 the last 64 KiB. | None |
--include-git |
boolean | Also download repository metadata (.git, .hg, bare git repositories) and .env files. Agents write these: git or hg runs commands their config names, and hawk reads ./.env, so only use this for agents you trust. | False |
--jobs, -j |
integer range (1 and above) |
Number of concurrent downloads. A file over 8 MiB downloads in 8 MiB parts, at most 16 at once, each counting as one. | 64 |
--help |
boolean | Show this message and exit. | False |
hawk files ls¶
List the files and folders at PATH, with each file's size in bytes.
Each path prints as a PATH, so it pastes back into hawk files.
hawk files ls evals/my-eval/
hawk files ls -r evals/my-eval/artifacts/<sample-uuid>/
hawk files ls evals/my-eval/progress.json --urls
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--recursive, -r |
boolean | List every file under PATH, not only those directly in it. | False |
--urls |
boolean | Print each file's path and a presigned download URL (valid 15 minutes, supports Range requests) instead of its size. | False |
--help |
boolean | Show this message and exit. | False |
hawk files sync¶
Copy the folder at SRC to DEST, skipping files already copied.
A folder's files land under DEST by their path inside it, so evals/<id>/.buffer/ syncs into DEST, not DEST/.buffer/. A file in DEST with the same size and modification time is skipped, so a rerun fetches only what changed. Local files are never deleted. Exits 2 if it skipped a file it can't write safely here, each named as it is skipped.
hawk files sync evals/my-eval/ ./my-eval
hawk files sync evals/my-eval/.buffer/ ./buffer
hawk files sync scans/my-scan/ ./my-scan
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--include-git |
boolean | Also download repository metadata (.git, .hg, bare git repositories) and .env files. Agents write these: git or hg runs commands their config names, and hawk reads ./.env, so only use this for agents you trust. | False |
--jobs, -j |
integer range (1 and above) |
Number of concurrent downloads. A file over 8 MiB downloads in 8 MiB parts, at most 16 at once, each counting as one. | 64 |
--help |
boolean | Show this message and exit. | False |
Management¶
hawk stop ends a run gracefully, scoring partial work; hawk delete tears down
its Kubernetes resources immediately (logs are kept either way) and accepts an
eval-set ID or a scan-run ID. hawk edit-samples submits sample edits (see Sample Editing), and
hawk import ingests locally-produced .eval files into the warehouse.
hawk stop¶
Gracefully stop an eval set or a specific sample.
Interrupts in-progress samples and scores them before the .eval files are written. Use --error to mark the interrupted samples as errors (retryable via eval_retry).
'delete' tears the job down without scoring. Neither command deletes .eval files already written to S3.
If no EVAL_SET_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-eval-set-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--sample |
text | UUID of a specific sample to stop (others continue running). | None |
--error |
boolean | Mark stopped samples as errors (retryable via eval_retry). | False |
--help |
boolean | Show this message and exit. | False |
hawk delete¶
Delete an eval set or scan run. Cleans up all the job's resources, including sandbox environments. Does not delete the job's logs.
If no JOB_ID is given, defaults to the last one used by hawk on this machine (~/.config/hawk-cli/last-job-id).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--yes, -y |
boolean | Skip confirmation. Requires an explicit JOB_ID. | False |
--help |
boolean | Show this message and exit. | False |
hawk edit-samples¶
Submit sample edits to the Hawk API.
EDITS_FILE is a JSON or JSONL file containing sample edits.
For JSON files, the format should be an array of edit objects:
[
{
"sample_uuid": "...",
"details": {
"type": "score_edit",
...,
}
},
{
"sample_uuid": "...",
"details": {
"type": "invalidate_sample",
...,
}
},
...
]
For JSONL files, each line should be a single edit object:
{"sample_uuid": "...", "details": {"type": "score_edit", ...}}
{"sample_uuid": "...", "details": {"type": "invalidate_sample", ...}}
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk import¶
Upload .eval files into Hawk's warehouse.
PATH may be a single .eval file or a directory containing one or more
.eval files (searched recursively). All files are uploaded under a
single newly-allocated eval-set ID.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--name |
text | Friendly name for the imported eval set. | None |
--code-sources |
file | JSON array declaring all code sources used by the imported results, as canonical identities (github.com/org/repo or a normalized package name). Use [] for no additional sources beyond log origins. Without a file, confirm detected sources interactively; --yes alone or no identified sources records unknown. | None |
--yes, -y |
boolean | Skip the import confirmation (required in scripts). | False |
--help |
boolean | Show this message and exit. | False |
Humans¶
Manage external participants (and their SSH public keys) with hawk human ...,
and run evaluations where a registered human works inside the sandbox — instead of
an LLM agent — with hawk human eval .... hawk human eval start accepts any
eval-set YAML: the server swaps in the configured human-agent solver and clamps
epochs=1 / limit=1. hawk human eval ssh-command prints a ready-to-run ssh -J
command that hops through the shared jumphost to the sandbox pod.
hawk human eval start is also covered by the optional submission guard. Its
--force option skips the guard and its count.
hawk human¶
Manage registered humans and run human evaluations.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- delete: Delete a human (owner or admin).
- eval: Run human evaluations.
- list: List all registered humans.
- register: Register a new human.
- update: Update a human's SSH key (owner or admin).
hawk human delete¶
Delete a human (owner or admin).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--force |
boolean | Discard eval-set assignment history and remove the human even if assignments exist. | False |
--help |
boolean | Show this message and exit. | False |
hawk human eval¶
Run human evaluations.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- ssh-command: Print a copy-paste-ready SSH command for a human-eval sandbox.
- start: Start a human evaluation.
hawk human eval ssh-command¶
Print a copy-paste-ready SSH command for a human-eval sandbox.
EVAL_SET_ID is the eval-set returned by hawk human eval start. If
omitted, defaults to the most recently started eval-set.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--timeout |
float | Seconds to wait for the agent's SSH connection line | 600.0 |
--skip-verify |
boolean | Print the connect command without checking that it works. | False |
--help |
boolean | Show this message and exit. | False |
hawk human eval start¶
Start a human evaluation.
EVAL_SET_CONFIG_FILE is a standard eval-set YAML config file. The --human flag specifies which registered human to assign.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--human |
text | Name of the registered human to assign | _required |
--secrets-file |
file | Secrets file to load environment variables from | None |
--secret |
text | Name of environment variable to pass as secret (can be used multiple times) | None |
--rewrite / --no-rewrite |
boolean | Rewrite the config to use the operator-configured default human agent and clamp epochs/limit to 1. Pass --no-rewrite to send the config through unchanged (the SSH public key is still injected). | True |
--image |
text | Full container image URI for the runner (e.g., 'ghcr.io/org/runner:v1') | None |
--image-tag |
text | Inspect image tag | None |
--force |
boolean | Bypass the outstanding-job guard for an intentional large submission. | False |
--priority |
choice (low | medium | high) |
Priority for cluster admission and inference requests. | medium |
--help |
boolean | Show this message and exit. | False |
hawk human list¶
List all registered humans.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk human register¶
Register a new human.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--name |
text | Human-readable name (e.g., jane) | _required |
--ssh-key |
text | SSH public key string | _required |
--help |
boolean | Show this message and exit. | False |
hawk human update¶
Update a human's SSH key (owner or admin).
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--ssh-key |
text | New SSH public key string | _required |
--help |
boolean | Show this message and exit. | False |
Proxy¶
hawk proxy setup-client ... points a coding agent at the proxy; see
Coding Agents. It needs no admin rights.
setup-client claude-code and setup-client doctor ask which deployment to use
when more than one is logged in and stdin is interactive — pass --api-url to
name one outright. On claude-code, --yes suppresses that question as well as
the confirmation before writing, so an ambiguous deployment fails rather than
prompting.
hawk proxy models ..., hawk proxy labs ... and hawk proxy secrets ... manage
the proxy's own configuration — models, labs and provider keys — and are admin-only. See
Middleman for that workflow.
hawk proxy¶
Work with the LLM proxy.
models, labs and secrets manage the proxy's own configuration; the
server enforces admin authorization on their endpoints. setup-client needs no
admin rights: it reads your own model access and writes coding-agent
configuration on this machine.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- labs: Manage lab configurations.
- models: Manage model configurations.
- secrets: Manage provider API keys.
- setup: Point a coding agent at the LLM proxy.
hawk proxy labs¶
Manage lab configurations.
Labs are the upstream APIs, URLs and keys models are routed to.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- activate: Activate a previously deactivated lab, re-checking it first.
- add: Add a lab.
- deactivate: Deactivate a lab so no route serves it.
- get: Show one lab, active or not.
- list: List labs configured in the database.
- update: Update a lab.
hawk proxy labs activate¶
Activate a previously deactivated lab, re-checking it first.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy labs add¶
Add a lab.
The key it names must be allowed for its host by the deployment's key-host allowlist.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--config |
text | JSON string or @path/to/file.json | _required |
--help |
boolean | Show this message and exit. | False |
hawk proxy labs deactivate¶
Deactivate a lab so no route serves it.
Refused while active models use the lab.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy labs get¶
Show one lab, active or not.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--format |
choice (json | table) |
Output format. | json |
--help |
boolean | Show this message and exit. | False |
hawk proxy labs list¶
List labs configured in the database.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--status |
choice (active | inactive | all) |
Filter by active/inactive status. | active |
--format |
choice (json | table) |
Output format. | json |
--help |
boolean | Show this message and exit. | False |
hawk proxy labs update¶
Update a lab.
Omitted fields keep their value; null clears a nullable one. A lab's name can't change.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--config |
text | JSON string or @path/to/file.json | _required |
--help |
boolean | Show this message and exit. | False |
hawk proxy models¶
Manage model configurations.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- activate: Load a deactivated model into Middleman again.
- add: Add a model configuration.
- deactivate: Stop loading a model's config. To retire a model, mark it dead instead.
- discovery: Show the last autodiscovery outcome per provider, without reloading.
- get: Show one database-configured model.
- list: List models configured in the database.
- reload: Reload model configs into running proxy workers.
- update: Update a model configuration.
hawk proxy models activate¶
Load a deactivated model into Middleman again.
This does not undo dead; set {"dead": false} with update for that.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy models add¶
Add a model configuration.
The config must set is_zdr and raw_cot (true or false) along with lab.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--group |
text | Model group for access control. | _required |
--config |
text | JSON string or @path/to/file.json | _required |
--help |
boolean | Show this message and exit. | False |
hawk proxy models deactivate¶
Stop loading a model's config. To retire a model, mark it dead instead.
Middleman drops the model's stored config. If no provider catalog offers the name, the model disappears: requests and group lookups 404, so Hawk can't resolve its group when importing, scanning or model-searching old data that references it. If a catalog does offer the name, Middleman rediscovers it as a public model served by that provider, so it stays callable. Viewing old logs and grep search use the groups stored with the data, so they work either way. Either way the model leaves the inventory restricted --provider profiles are judged against, which can open a mixed group's stored evals to them; marking it dead does not.
Marking a model dead keeps its config and group, hides it from hawk
models, and refuses new requests and jobs that would call it:
Without the shared Valkey cache, either change reaches running Middleman workers only at their hourly refresh; restart Middleman to apply it now.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy models discovery¶
Show the last autodiscovery outcome per provider, without reloading.
Answered by one proxy replica, so results can differ between calls.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy models get¶
Show one database-configured model.
404s for autodiscovered catalog models, which live outside the database.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--format |
choice (json | table) |
Output format. | json |
--help |
boolean | Show this message and exit. | False |
hawk proxy models list¶
List models configured in the database.
Autodiscovered models aren't stored there — use hawk models for the full catalog.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--status |
choice (active | inactive | all) |
Filter by active/inactive status. | active |
--format |
choice (json | table) |
Output format. | json |
--help |
boolean | Show this message and exit. | False |
hawk proxy models reload¶
Reload model configs into running proxy workers.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy models update¶
Update a model configuration.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--config |
text | JSON string or @path/to/file.json | _required |
--help |
boolean | Show this message and exit. | False |
hawk proxy secrets¶
Manage provider API keys.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- delete: Delete a provider API key.
- list: List providers that have an API key configured.
- set: Set a provider key. Reads the value from stdin when piped, else prompts.
hawk proxy secrets delete¶
Delete a provider API key.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--yes, -y |
boolean | Skip confirmation. | False |
--help |
boolean | Show this message and exit. | False |
hawk proxy secrets list¶
List providers that have an API key configured.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy secrets set¶
Set a provider key. Reads the value from stdin when piped, else prompts.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk proxy setup¶
Point a coding agent at the LLM proxy.
Writes the tool's own config, so it works as normal afterwards.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- claude-code: Configure Claude Code.
- doctor: Diagnose the proxy path without changing anything.
- remove: Undo a previous setup, restoring what was there before.
- status: Show what hawk has configured on this machine.
hawk proxy setup claude-code¶
Configure Claude Code.
Examples:
hawk proxy setup-client claude-code --dry-run
hawk proxy setup-client claude-code --model claude-opus-5
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--api-url |
text | Deployment to configure against. | None |
--hawk-command |
text | Path to hawk. Written into the tool's credential helper. | None |
--model |
text | Model the tool should use. | None |
--small-fast-model |
text | Model for background work. Left to Claude Code's own default if unset. | None |
--context-window |
integer | Override the context window instead of taking the model's. | None |
--scope |
choice (user | project | project-local) |
Which settings file to write. | user |
--dry-run |
boolean | Show the diff and write nothing. | False |
--yes |
boolean | Do not prompt. | False |
--verify |
choice (tokens | none) |
Verify the config works. | tokens |
--help |
boolean | Show this message and exit. | False |
hawk proxy setup doctor¶
Diagnose the proxy path without changing anything.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--api-url |
text | Deployment to check against. | None |
--model |
text | Model to check availability of. | None |
--help |
boolean | Show this message and exit. | False |
hawk proxy setup remove¶
Undo a previous setup, restoring what was there before.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--yes |
boolean | Do not prompt. | False |
--help |
boolean | Show this message and exit. | False |
hawk proxy setup status¶
Show what hawk has configured on this machine.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--json |
boolean | Machine-readable output. | False |
--help |
boolean | Show this message and exit. | False |
Inference¶
Beta, and unstable: hawk inference mirror-weights ... copies a public Hugging Face model into a self-hosted inference cell's weights
bucket, using your own AWS credentials through the aws CLI. See
Self-Hosted Inference.
hawk inference¶
[Beta] Work with self-hosted inference.
Unstable: these commands and their options may change or go away without notice.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
Subcommands
- mirror-weights: [Beta] Copy a public Hugging Face model into a cell's weights bucket.
hawk inference mirror-weights¶
[Beta] Copy a public Hugging Face model into a cell's weights bucket.
Unstable: this command and its options may change or go away without notice.
Starts the stack's weights mirror task with your AWS credentials (through the aws CLI), which streams every file of REPO at one commit into models/REPO/COMMIT/ in the cell's bucket, checking each file's hash. Files already mirrored are skipped, so rerunning a failed mirror resumes it. When it finishes, set the cell's engine.modelS3Prefix to the prefix it prints.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--revision |
text | Branch, tag or commit of the Hugging Face repository; resolved to a commit before anything is copied. | main |
--cell |
text | The inference cell whose weights bucket receives the model. | _required |
--env |
text | The hawk stack, e.g. prd. | _required |
--profile |
text | AWS profile to use; defaults to the aws CLI's own. | None |
--region |
text | The stack's AWS region; defaults to the aws CLI's own. | None |
--wait / --no-wait |
boolean | Follow the mirror's log until it finishes. | True |
--help |
boolean | Show this message and exit. | False |
Other¶
hawk config prints the current CLI configuration, hawk version compares the
local and deployed versions, hawk models lists models reachable via the proxy,
and hawk usage reports token counts per provider and model. hawk scan-export is the older name of
hawk scan export.
hawk config¶
Print the current CLI configuration.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk version¶
Show the hawk CLI version and, if reachable, the deployed server version.
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk models¶
List models you have access to via the LLM proxy.
By default prints a table of each model's name, provider, zero-data-retention status and whether it returns raw chain-of-thought. "unknown" means no value is recorded (or, for provider, that the model's details are secret), not "no".
Examples:
hawk models -i claude # All Claude models
hawk models -i claude -i sonnet # Claude Sonnet models
hawk models -i claude -x openrouter # Claude, excluding OpenRouter
hawk models -v -i gpt-4o # Detailed info for GPT-4o models
hawk models --zdr true # Only zero-data-retention models
hawk models --raw-cot true # Only models recorded as returning raw CoT
hawk models --raw-cot unknown # Models with no raw-CoT status recorded
hawk models --names-only -i claude # Just the names, one per line
Options:
| Name | Type | Description | Default |
|---|---|---|---|
-i, --include |
text | Regex pattern to include (all must match). Can be repeated. | None |
-x, --exclude |
text | Regex pattern to exclude (any match excludes). Can be repeated. | None |
-v, --verbose |
boolean | Show full model info as JSON lines instead of a table. | False |
--names-only |
boolean | Print just the model names, one per line (for scripting). | False |
--include-dead |
boolean | Also list dead models, kept only for permission checks on old data, and add a Dead column marking them. Requests to them fail. | False |
--zdr |
choice (true | false) |
Only list models an admin has recorded as covered (true) or not covered (false) by a zero-data-retention agreement. | None |
--raw-cot |
choice (true | false | unknown) |
Only list models recorded as returning raw (unsummarized) chain-of-thought (true), as not returning it (false), or with nothing recorded (unknown). | None |
--help |
boolean | Show this message and exit. | False |
hawk usage¶
Show your own token usage per provider/model via the LLM proxy.
Examples:
hawk usage # your tokens per model, about the last 24h
hawk usage --hours 168 # about the last 7 days
hawk usage --live # the recent ~5-minute window
hawk usage --json
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--hours |
integer | Lookback in hours (default: 24), rounded outward to whole bins; the output names the window summed. | 24 |
--live |
boolean | Show the recent ~5-minute live window instead of a lookback sum. | False |
--json |
boolean | Output raw JSON instead of a table. | False |
--help |
boolean | Show this message and exit. | False |
hawk fs¶
List and copy the files in an eval set's or scan's folder, as aws s3 ls, cp and sync do.
PATH is a path in the bucket: evals/<eval-set-id>/ or scans/<scan-run-id>/, then a folder or file in it, or the s3://<bucket>/... URL that aws s3 and Inspect print for one; its bucket isn't checked, as hawk reads the deployment it is logged in to, which it names on stderr. A PATH names a file or a folder, never a string prefix. hawk fs is short for hawk files.
hawk files ls evals/my-eval/ # one level
hawk files ls -r evals/my-eval/.buffer/ # every file under a folder
hawk files cat evals/my-eval/logs.json | jq . # a file, to stdout
hawk files cat evals/my-eval/a.eval --range -65536
hawk files cp evals/my-eval/logs.json . # one file
hawk files cp -r evals/my-eval/artifacts/<sample-uuid>/ out/
hawk files cp -r s3://<bucket>/evals/my-eval/artifacts/<sample-uuid>/ out/
hawk files sync evals/my-eval/ ./my-eval # a run, then what changed
hawk files sync scans/my-scan/ ./my-scan
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--help |
boolean | Show this message and exit. | False |
hawk fs cat¶
Write the file at PATH to stdout, or with --range part of it.
On a terminal, control characters print escaped; piped or redirected, the bytes are written as they are.
hawk files cat evals/my-eval/logs.json | jq .
hawk files cat evals/my-eval/a.eval --range 0-65535 > head.bin
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--range |
text | Only these bytes, counted from 0, both ends included: 0-65535 is the first 64 KiB, 1000- everything from byte 1000, and -65536 the last 64 KiB. | None |
--help |
boolean | Show this message and exit. | False |
hawk fs cp¶
Copy the file at SRC to DEST, or with -r every file under the folder at SRC.
A file lands in DEST if DEST is a folder or ends in /, and otherwise as DEST; a DEST of - writes it to stdout, as hawk files cat does, --range included. A folder's files land under DEST by their path inside it. Every file is downloaded again; hawk files sync skips those already copied. Exits 2 if it skipped a file it can't write safely here, each named as it is skipped.
hawk files cp evals/my-eval/logs.json .
hawk files cp evals/my-eval/logs.json ./logs-copy.json
hawk files cp evals/my-eval/a.eval head.bin --range 0-65535
hawk files cp evals/my-eval/logs.json - | jq .
hawk files cp -r evals/my-eval/.buffer/ ./buffer
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--recursive, -r |
boolean | Copy every file under the folder at SRC. | False |
--range |
text | Copy only these bytes of the file, counted from 0, both ends included: 0-65535 is the first 64 KiB, 1000- everything from byte 1000, and -65536 the last 64 KiB. | None |
--include-git |
boolean | Also download repository metadata (.git, .hg, bare git repositories) and .env files. Agents write these: git or hg runs commands their config names, and hawk reads ./.env, so only use this for agents you trust. | False |
--jobs, -j |
integer range (1 and above) |
Number of concurrent downloads. A file over 8 MiB downloads in 8 MiB parts, at most 16 at once, each counting as one. | 64 |
--help |
boolean | Show this message and exit. | False |
hawk fs ls¶
List the files and folders at PATH, with each file's size in bytes.
Each path prints as a PATH, so it pastes back into hawk files.
hawk files ls evals/my-eval/
hawk files ls -r evals/my-eval/artifacts/<sample-uuid>/
hawk files ls evals/my-eval/progress.json --urls
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--recursive, -r |
boolean | List every file under PATH, not only those directly in it. | False |
--urls |
boolean | Print each file's path and a presigned download URL (valid 15 minutes, supports Range requests) instead of its size. | False |
--help |
boolean | Show this message and exit. | False |
hawk fs sync¶
Copy the folder at SRC to DEST, skipping files already copied.
A folder's files land under DEST by their path inside it, so evals/<id>/.buffer/ syncs into DEST, not DEST/.buffer/. A file in DEST with the same size and modification time is skipped, so a rerun fetches only what changed. Local files are never deleted. Exits 2 if it skipped a file it can't write safely here, each named as it is skipped.
hawk files sync evals/my-eval/ ./my-eval
hawk files sync evals/my-eval/.buffer/ ./buffer
hawk files sync scans/my-scan/ ./my-scan
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--include-git |
boolean | Also download repository metadata (.git, .hg, bare git repositories) and .env files. Agents write these: git or hg runs commands their config names, and hawk reads ./.env, so only use this for agents you trust. | False |
--jobs, -j |
integer range (1 and above) |
Number of concurrent downloads. A file over 8 MiB downloads in 8 MiB parts, at most 16 at once, each counting as one. | 64 |
--help |
boolean | Show this message and exit. | False |