Skip to main content

Overview

The prime env push command publishes an environment to the Environments Hub, making it available for others to discover, install, and use. For OpenEnv-based environments, this command also builds and registers the Docker image using prime images push.

Usage

Arguments

string
required
Environment ID to publish. This should match the environment directory name.Example: my-env pushes from ./environments/my_env/

Options

string
default:"./environments"
Base path for environments directory.Aliases: -p

Prerequisites

Authentication

Log in to the Prime Intellect platform:

Environment Structure

Your environment must have:
  1. Valid pyproject.toml with metadata:
  2. Implementation file with load_environment() function
  3. README.md with documentation

OpenEnv Environments

For OpenEnv environments (with proj/ directory), you must also:
  1. Build the Docker image first:
  2. Verify .build.json exists:

Examples

Publish a Standard Environment

Output:

Publish an OpenEnv Environment

Output:

Custom Path

What Gets Published

The command packages and uploads:
  • Environment code (Python files)
  • pyproject.toml (metadata and dependencies)
  • README.md (documentation)
  • Additional files specified in tool.hatch.build.include
For OpenEnv environments, it also includes:
  • proj/ directory with OpenEnv project files
  • proj/.build.json with Docker image reference

Version Management

The version is read from pyproject.toml:
To publish a new version:
  1. Update the version number in pyproject.toml
  2. Run prime env push again

Visibility and Access

By default, environments are:
  • Public - anyone can view and install
  • Listed - appears in Hub search results
To make an environment private:
  1. Navigate to the environment page on the Hub
  2. Click “Settings”
  3. Change visibility to “Private”
Private environments can only be installed by authorized users using prime env pull.

Metadata and Tags

Configure environment metadata in pyproject.toml:
Recommended tags:
  • Domain: math, coding, reasoning, tool-use, web, games
  • Use case: train, eval, benchmark
  • Difficulty: easy, medium, hard
  • Format: single-turn, multi-turn, tool-env

OpenEnv Image Building

For OpenEnv environments, the vf-build command:
  1. Detects the contract (gym vs. mcp) from server/app.py
  2. Builds the Docker image using prime images push
  3. Waits for build completion (up to 20 minutes)
  4. Writes .build.json with image reference and metadata:
This metadata is included when pushing to the Hub.

Testing Before Publishing

Always test your environment locally before publishing:

Troubleshooting

Not Logged In

Solution:

Missing pyproject.toml

Solution: Ensure your environment has a valid pyproject.toml.

Build Failed (OpenEnv)

Solution:
  • Check Docker image build logs: prime images list
  • Verify Dockerfile is valid
  • Test Docker build locally:

Invalid Version

Solution: Increment the version number in pyproject.toml.

Missing .build.json (OpenEnv)

Solution:

Updating Published Environments

To update an environment on the Hub:
  1. Make changes to your local environment code
  2. Update version in pyproject.toml
  3. Test changes locally
  4. Rebuild image (if OpenEnv):
  5. Push update:
Users can then install the new version:

Next Steps

After publishing:
  1. Share your environment - post the Hub URL
  2. Test installation from Hub:
  3. Monitor usage on the Hub dashboard
  4. Iterate and improve based on feedback

Best Practices

  • Write clear documentation in README.md
  • Use semantic versioning (MAJOR.MINOR.PATCH)
  • Add comprehensive tags for discoverability
  • Test thoroughly before publishing
  • Include examples in the README
  • Document environment arguments and their defaults
  • Specify evaluation defaults in [tool.verifiers.eval]