Goals
- Install and configure the
orwdCLI - Create, deploy, and manage environments without leaving the terminal
- Use structured output formats for scripting and automation
Prerequisites
- An OpenReward account and API key
- Python 3.11+
- GitHub CLI (
gh) — optional, needed for repo creation viaorwd new
Installation
Install theopenreward package, which includes the orwd CLI:
Most commands require
OPENREWARD_API_KEY. The only exception is orwd init, which scaffolds files locally without touching the API.Shell alias (for development)
If you’re developing the SDK locally and wantorwd to always point at your working copy:
--project (not --directory) so orwd runs relative to your current directory, not the SDK directory.
Creating an Environment
Interactive wizard
The fastest way to go from zero to a deployed environment:Non-interactive mode
Pass all arguments as flags and add-y to skip prompts:
-y is set, in which case it falls back to its default).
Harbor environments
To create an environment that uses the Harbor task specification:Step by step
If you prefer more control, you can run the individual steps yourself:Managing Environments
Listing environments
orwd list fetches all results (auto-paginating through the API). Use --limit to cap the number returned.
Getting environment details
Updating an environment
GitHub Integration
Linking
Override any of these:
Unlinking
Updating link settings
Change compute or scaling settings on an already-linked environment:Monitoring Deployments
Listing deployments
Viewing logs
Harbor task builds
For Harbor environments, each task gets its own Docker image build. To check their status:Use
orwd task-builds my-org/my-env -o json to get the full task build IDs for use with task-build-logs.File Management
Environments have a file store for uploading data files (datasets, ground truth, task inputs). These files are available at/orwd_data/ on the deployed environment server. See Where Environment Data Lives for details on how uploaded files are used.
Uploading files
--dest to set a custom destination path:
--concurrency:
Listing files
Deleting files
Runs and Rollouts
Browse your evaluation runs and their rollouts from the CLI:Structured Output
Every command (exceptinit and new) supports the -o / --output flag for machine-readable output. This is useful for piping into jq, scripting, or loading into other tools.
Examples
Command Reference
Run
orwd <command> --help for full usage details on any command.
