DW CLI
The dw CLI is a terminal tool for the Doubleword platform. It handles everything from uploading files and running batches to streaming results and scaffolding multi-step projects — replacing curl commands and custom scripts with a single binary.
For the complete command reference, file tools documentation, and project system guide, see the full CLI documentation.
Install
curl -fsSL https://raw.githubusercontent.com/doublewordai/dw/main/install.sh | shOr via pip:
pip install dw-cliAuthenticate
dw loginThis opens your browser for SSO authentication. For headless environments (SSH, containers, CI):
dw login --api-key <YOUR_KEY>Quick Start
See available models:
dw models listRun a batch and stream results in one command:
dw stream batch.jsonl > results.jsonlOne-shot real-time inference:
dw realtime Qwen/Qwen3-VL-30B-A3B-Instruct-FP8 "Explain batch inference"Check what it cost:
dw batches analytics <batch-id>Working with JSONL Files
The CLI includes local tools for preparing and inspecting batch files — no upload or authentication needed:
dw files validate batch.jsonl # Check format
dw files stats batch.jsonl # Line count, models, estimated tokens
dw files prepare batch.jsonl --model Qwen/Qwen3-VL-30B-A3B-Instruct-FP8 # Set model
dw files sample batch.jsonl -n 10 -o sample.jsonl # Random sampleBatch Workflow
Step by step with full control:
dw files upload batch.jsonl # Upload
dw batches create --file <file-id> # Create batch
dw batches watch <batch-id> # Watch progress
dw batches results <batch-id> -o results.jsonl # Download resultsOr all at once:
dw batches run batch.jsonl --watch # Upload + create + watchProjects & Examples
The CLI includes a project system for building multi-step batch workflows. Each project has a dw.toml manifest that defines setup, custom steps, and the full workflow:
dw project init my-project # Scaffold a new project
dw project setup # Install dependencies
dw project info # See available steps and workflow
dw project run-all # Run everything end-to-endClone any of the example workbooks to get started with a real use case:
dw examples clone model-evals
cd model-evals
dw project setup
dw project run-allSee the Workbooks section for the full list of examples.
Resources
- GitHub Repository — source code, issues, and releases
- Full CLI Documentation — complete command reference, file tools, project system, and more
- Workbooks — production-ready examples with real data and measured costs