Overview
Theprime 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
Environment ID to publish. This should match the environment directory name.Example:
my-env pushes from ./environments/my_env/Options
Base path for environments directory.Aliases:
-pPrerequisites
Authentication
Log in to the Prime Intellect platform:Environment Structure
Your environment must have:-
Valid
pyproject.tomlwith metadata: -
Implementation file with
load_environment()function - README.md with documentation
OpenEnv Environments
For OpenEnv environments (withproj/ directory), you must also:
-
Build the Docker image first:
-
Verify
.build.jsonexists:
Examples
Publish a Standard Environment
Publish an OpenEnv Environment
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
- proj/ directory with OpenEnv project files
- proj/.build.json with Docker image reference
Version Management
The version is read frompyproject.toml:
- Update the version number in
pyproject.toml - Run
prime env pushagain
Visibility and Access
By default, environments are:- Public - anyone can view and install
- Listed - appears in Hub search results
- Navigate to the environment page on the Hub
- Click “Settings”
- Change visibility to “Private”
prime env pull.
Metadata and Tags
Configure environment metadata inpyproject.toml:
- 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, thevf-build command:
- Detects the contract (gym vs. mcp) from
server/app.py - Builds the Docker image using
prime images push - Waits for build completion (up to 20 minutes)
- Writes
.build.jsonwith image reference and metadata:
Testing Before Publishing
Always test your environment locally before publishing:Troubleshooting
Not Logged In
Missing pyproject.toml
pyproject.toml.
Build Failed (OpenEnv)
- Check Docker image build logs:
prime images list - Verify Dockerfile is valid
- Test Docker build locally:
Invalid Version
pyproject.toml.
Missing .build.json (OpenEnv)
Updating Published Environments
To update an environment on the Hub:- Make changes to your local environment code
- Update version in
pyproject.toml - Test changes locally
- Rebuild image (if OpenEnv):
- Push update:
Next Steps
After publishing:- Share your environment - post the Hub URL
- Test installation from Hub:
- Monitor usage on the Hub dashboard
- 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]