Skip to content

Commit 3619c62

Browse files
committed
Update README.md with OpenEnv CLI features
- Added details about the OpenEnv CLI, including commands for initializing and deploying environments. - Updated environment structure to include `openenv.yaml` for better organization. - Provided quick start instructions for using the CLI to scaffold new environments and deploy to Hugging Face Spaces.
1 parent b6899a9 commit 3619c62

File tree

1 file changed

+19
-40
lines changed

1 file changed

+19
-40
lines changed

README.md

Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ OpenEnv provides a standard for interacting with agentic execution environments
2323

2424
In addition to making it easier for researchers and RL framework writers, we also provide tools for environment creators making it easier for them to create richer environments and make them available over familar protocols like HTTP and packaged using canonical technologies like docker. Environment creators can use the OpenEnv framework to create environments that are isolated, secure, and easy to deploy and use.
2525

26+
The OpenEnv CLI (`openenv`) provides commands to initialize new environments and deploy them to Hugging Face Spaces.
27+
2628
> ⚠️ **Early Development Warning** OpenEnv is currently in an experimental
2729
> stage. You should expect bugs, incomplete features, and APIs that may change
2830
> in future versions. The project welcomes bugfixes, but to make sure things are
@@ -117,14 +119,21 @@ Type-safe data structures:
117119

118120
### For Environment Creators
119121

120-
When building a new environment, create the following structure:
122+
Use the CLI to quickly scaffold a new environment:
123+
124+
```bash
125+
openenv init my_env
126+
```
127+
128+
This creates the following structure:
121129

122130
```
123-
src/envs/your_env/
131+
my_env/
124132
├── __init__.py # Export YourAction, YourObservation, YourEnv
125133
├── models.py # Define Action, Observation, State dataclasses
126134
├── client.py # Implement YourEnv(HTTPEnvClient)
127135
├── README.md # Document your environment
136+
├── openenv.yaml # Environment manifest
128137
└── server/
129138
├── your_environment.py # Implement YourEnvironment(Environment)
130139
├── app.py # Create FastAPI app
@@ -145,53 +154,23 @@ See example scripts in `examples/` directory.
145154

146155
## CLI Commands
147156

148-
OpenEnv provides a command-line interface for managing environments:
157+
The OpenEnv CLI provides commands to manage environments:
149158

150-
### `openenv init`
159+
- **`openenv init <env_name>`** - Initialize a new environment from template
160+
- **`openenv push [--repo-id <repo>] [--private]`** - Deploy environment to Hugging Face Spaces
151161

152-
Initialize a new OpenEnv environment:
162+
### Quick Start
153163

154164
```bash
165+
# Create a new environment
155166
openenv init my_game_env
156-
openenv init my_env --output-dir /path/to/projects
157-
```
158-
159-
Creates a new directory with all necessary files based on the OpenEnv template.
160-
161-
### `openenv push`
162167

163-
Push an OpenEnv environment to Hugging Face Spaces:
164-
165-
```bash
166-
# From the environment directory (where openenv.yaml is located)
168+
# Deploy to Hugging Face (will prompt for login if needed)
169+
cd my_game_env
167170
openenv push
168-
169-
# With options
170-
openenv push --repo-id my-org/my-env --private
171-
openenv push --base-image ghcr.io/meta-pytorch/openenv-base:latest
172171
```
173172

174-
The `openenv push` command:
175-
1. Validates that the directory is an OpenEnv environment (checks for `openenv.yaml`)
176-
2. Prepares a custom build for Hugging Face Docker space (enables web interface)
177-
3. Uploads to Hugging Face (ensuring you're logged in)
178-
179-
**Prerequisites:**
180-
- Authenticate with Hugging Face: Set `HF_TOKEN` environment variable or the command will prompt for login
181-
182-
**Options:**
183-
- `--directory`, `-d`: Directory containing the OpenEnv environment (defaults to current directory)
184-
- `--repo-id`, `-r`: Repository ID in format 'username/repo-name' (defaults to 'username/env-name' from openenv.yaml)
185-
- `--base-image`, `-b`: Base Docker image to use (overrides Dockerfile FROM)
186-
- `--private`: Deploy the space as private (default: public)
187-
188-
After deployment, your space will be available at:
189-
`https://huggingface.co/spaces/<repo-id>`
190-
191-
The deployed space includes:
192-
- **Web Interface** at `/web` - Interactive UI for exploring the environment
193-
- **API Documentation** at `/docs` - Full OpenAPI/Swagger interface
194-
- **Health Check** at `/health` - Container health monitoring
173+
For detailed options: `openenv init --help` and `openenv push --help`.
195174

196175
## Design Principles
197176

0 commit comments

Comments
 (0)