# Where to Find Documentation for OpenEnv: A Complete Guide to API, CLI, and Environment References

> Find complete OpenEnv documentation for API, CLI, and environment references. Explore the central docs site and repository READMEs for quick access to all essential information.

- Repository: [Hugging Face/OpenEnv](https://github.com/huggingface/OpenEnv)
- Tags: api-reference
- Published: 2026-06-16

---

**OpenEnv's documentation is split between a central docs site at `huggingface.co/docs/openenv` and environment-specific READMEs stored in the repository under `envs/<name>/README.md`.**

The `huggingface/OpenEnv` repository provides a modular framework for creating and interacting with reinforcement learning environments. Whether you are building a new environment or consuming an existing one, understanding where to find the **documentation for OpenEnv** is essential for navigating the codebase, CLI tools, and API references.

## Central Documentation Hub

The primary entry point for users is the **official docs site** hosted at `https://huggingface.co/docs/openenv`. This site is automatically generated using Hugging Face's `hf-doc-builder` toolchain and contains the full reference guide, API documentation, tutorials, and a searchable environment catalog.

The website sources its content from Markdown files within the repository's `docs/source/` directory. When environment maintainers update their documentation, the changes propagate to this central hub, ensuring the site remains synchronized with the latest repository state.

## Repository Documentation Structure

Beyond the generated website, the repository contains several critical documentation sources that cover architecture decisions, implementation details, and per-environment specifications.

### Main README

The root **[`README.md`](https://github.com/huggingface/OpenEnv/blob/main/README.md)** provides the high-level project overview, installation instructions, architecture diagrams, and a quick-start guide for the CLI. It describes the relationship between environment servers and client libraries, and outlines the core abstractions found in [`src/openenv/core/__init__.py`](https://github.com/huggingface/OpenEnv/blob/main/src/openenv/core/__init__.py).

### Environment-Specific READMEs

Each built-in environment maintains its own documentation under `envs/<environment_name>/README.md`. For example:

- **[`envs/echo_env/README.md`](https://github.com/huggingface/OpenEnv/blob/main/envs/echo_env/README.md)**: Documents the Echo environment, a basic "hello world" example showing action/observation schemas and Docker deployment instructions.
- **[`envs/coding_env/README.md`](https://github.com/huggingface/OpenEnv/blob/main/envs/coding_env/README.md)**: Details the sandboxed Python execution environment used for code-act RL, including security constraints and tool specifications.

These files contain detailed usage patterns, client installation commands, and schema definitions that are too specific for the central overview.

### RFCs and Design Documents

Architectural decisions and future roadmaps are formalized in **[`rfcs/README.md`](https://github.com/huggingface/OpenEnv/blob/main/rfcs/README.md)**. This directory contains Requests for Comments (RFCs) covering major design changes such as baseline API standards and MCP (Model Context Protocol) support. Consult this section when contributing to core framework changes or understanding historical design trade-offs.

### Build Instructions

The **[`docs/README.md`](https://github.com/huggingface/OpenEnv/blob/main/docs/README.md)** file contains technical instructions for contributors who need to preview or extend the documentation locally. It covers the installation of `hf-doc-builder`, the preview server workflow, and the synchronization process for environment-specific content.

## CLI Reference

The command-line interface is documented in the **"CLI Commands"** section of the main [`README.md`](https://github.com/huggingface/OpenEnv/blob/main/README.md) and accessible directly via `openenv --help`. The entry point for all CLI operations is [`src/openenv/cli/__main__.py`](https://github.com/huggingface/OpenEnv/blob/main/src/openenv/cli/__main__.py), which implements commands such as:

- `openenv init`: Scaffolds a new environment skeleton
- `openenv push`: Uploads an environment to the Hub
- `openenv serve`: Starts a local development server
- `openenv validate`: Checks environment configuration against schemas

## Tutorial and Examples

For hands-on learning, the **[`tutorial/README.md`](https://github.com/huggingface/OpenEnv/blob/main/tutorial/README.md)** provides a step-by-step "Zero to Hero" guide. This resource walks through environment creation, GPU-mode configuration, and client-server communication patterns, bridging the gap between theoretical documentation and working implementations.

## How to Build Documentation Locally

Contributors can preview documentation changes before submitting pull requests. The workflow involves syncing environment READMEs into the doc source tree and running a local preview server.

First, synchronize environment documentation using the utility script:

```python

# Copy environment READMEs into docs/source/environments/

python scripts/sync_env_docs.py --fix

```

Then, install the documentation builder and start the preview server:

```bash
pip install hf-doc-builder watchdog
doc-builder preview openenv docs/source

```

This serves the site at `http://localhost:5173/openenv/main/en/index`, allowing you to verify rendering of Markdown files and API references before deployment.

## Summary

- **Primary docs site**: `huggingface.co/docs/openenv` hosts the generated reference guide and environment catalog.
- **Environment specifics**: Individual `envs/<name>/README.md` files contain detailed schemas and Docker instructions for each environment.
- **Architecture decisions**: [`rfcs/README.md`](https://github.com/huggingface/OpenEnv/blob/main/rfcs/README.md) catalogs formal design proposals and roadmap items.
- **CLI usage**: Documented in the main [`README.md`](https://github.com/huggingface/OpenEnv/blob/main/README.md) and accessible via `openenv --help` from [`src/openenv/cli/__main__.py`](https://github.com/huggingface/OpenEnv/blob/main/src/openenv/cli/__main__.py).
- **Local preview**: Use [`scripts/sync_env_docs.py`](https://github.com/huggingface/OpenEnv/blob/main/scripts/sync_env_docs.py) followed by `doc-builder preview` to validate changes before submission.

## Frequently Asked Questions

### Where is the API reference for OpenEnv client libraries?

The API reference is hosted on the central documentation site at `huggingface.co/docs/openenv`. Additionally, core abstractions like `EnvClient`, `Environment`, `Action`, and `Observation` are defined in [`src/openenv/core/__init__.py`](https://github.com/huggingface/OpenEnv/blob/main/src/openenv/core/__init__.py) and documented via docstrings that feed into the generated site.

### How do I find documentation for a specific environment like Echo or Coding?

Each environment maintains dedicated documentation in its respective directory under `envs/`. For example, [`envs/echo_env/README.md`](https://github.com/huggingface/OpenEnv/blob/main/envs/echo_env/README.md) details the Echo environment's action schemas, while [`envs/coding_env/README.md`](https://github.com/huggingface/OpenEnv/blob/main/envs/coding_env/README.md) covers the sandboxed execution environment. These files are also indexed in the central catalog after synchronization.

### Can I contribute to the OpenEnv documentation?

Yes. Documentation contributions follow the standard pull request workflow. Update the relevant Markdown files in `docs/source/` or the specific `envs/<name>/README.md`, then run `python scripts/sync_env_docs.py --fix` to ensure environment documentation is properly linked. Preview your changes locally using `doc-builder preview openenv docs/source` before submitting.

### What is the difference between the README and the official docs site?

The **README** provides high-level orientation, installation steps, and quick-start examples for the repository as a whole. The **official docs site** offers comprehensive API references, tutorials, and an interactive environment catalog. The site is generated from the repository's Markdown files using `hf-doc-builder`, ensuring consistency while providing a searchable, navigable interface.