Weights & Biases CLI
$ wandb Official Med RiskThe wandb CLI manages Weights & Biases authentication (login), toggles offline logging (wandb offline), syncs local run directories (wandb sync --yes --dry-run), and pulls/inspects artifacts (wandb artifact).
pip install wandb Companion CLI for local ./wandb run syncing (wandb sync --dry-run) and status checks; Python SDK handles run logging.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports status, sync --dry-run, sync --yes, and WANDB_API_KEY env auth, though lacks native --json output across CLI subcommands and sync prompts without --yes.
- Supports
sync --dry-runand--yes, but lacks--jsonformatting
Writing API keys to ~/.netrc carries standard local secret hygiene risks; sync uploads experiment artifacts/logs to remote W&B servers.
- Writes plaintext API key into
~/.netrconwandb login
Available via pip and uvx across macOS, Linux, and Windows, though pulls a moderately heavy Python SDK dependency tree.
- Distributed via PyPI (
wandb) with full Python SDK
Essential companion for toggling offline mode (wandb offline), inspecting status, and syncing disconnected training runs.
- Handles offline run recovery (
wandb sync) and artifact transfers
Official Weights & Biases repository (wandb/wandb) under MIT license.
- Official
wandb/wandbrepository
Documented CLI reference at docs.wandb.ai/ref/cli/.
- Official CLI reference at docs.wandb.ai/ref/cli
Security, Auth & Guardrails
Reads WANDB_API_KEY env var or writes the API key into ~/.netrc; offline settings reside in ./wandb/settings.
MIT open-source Python CLI; W&B Cloud has free personal/academic tiers and paid team plans (self-hostable).
# wandb CLI Agent Rules - Always pass `--dry-run` before `wandb sync` and use `--yes` (`-y`) with explicit run paths so `wandb sync` never prompts interactively. - Set `WANDB_MODE=offline` during local test runs to avoid polluting team dashboards.
Agent-Ready Command Recipes
Safe Read-Only Queries
wandb status
Prints active entity, project, base URL, and login state without exposing raw keys.
wandb sync --dry-run ./wandb
Lists local offline run directories that would be synced (--dry-run) without uploading.
Controlled Writes & Previews
wandb sync --yes ./wandb/offline-run-*
Pushes saved offline runs to W&B without interactive selection prompts (--yes).
Strengths for Agents
- +
wandb sync --dry-runand--yesallow safe inspection and upload of offline training runs. - +
WANDB_API_KEYandWANDB_MODE=offlinework cleanly in CI/agent environments.
Caveats & Pitfalls
- ! CLI subcommands emit human-formatted text rather than
--json. - ! Bare
wandb syncandwandb loginprompt interactively unless--yesorWANDB_API_KEYis provided.