> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primeintellect.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create & Upload Environment

> Learn how to create and upload environments to Prime Intellect's Environments Hub

## Prerequisites

Ensure you have:

1. **Prime CLI** installed and configured
   * See [CLI Overview](/cli-reference/introduction) for setup instructions.
2. **Username** set on your [profile](https://app.primeintellect.ai/dashboard/profile)
3. **Authenticate** the CLI:
   ```bash theme={null}
   prime login
   ```

## Creating a New Environment

### Initialize Environment

Create a new environment with our starter template:

```bash theme={null}
prime env init <your-env-name>
```

This creates a template for a Python module with:

* A [README.md](http://README.md) file (displayed on the Environments Hub)
* A `pyproject.toml` file for managing dependencies, versioning, tags, description, etc.
* A Python file containing stub code for a `load_environment` function which returns a `vf.Environment` object — this will be the entrypoint for downstream applications to use your Environment, and should be used encapsulate any necessary preprocessing, resource provisioning, exposing configurable args, etc.

### Develop Your Environment

After initialization, you can modify and test your environment.

If your environment needs API keys or credentials, see [Secrets](/tutorials-environments/secrets) for the recommended setup.

To install your environment locally, you can run:

```bash theme={null}
uv pip install -e .
```

To test/evaluate the environment:

```bash theme={null}
uv run vf-eval my-environment
```

<Info>
  Make sure to follow the [verifiers library patterns](https://github.com/PrimeIntellect-ai/verifiers) when implementing your environment. Your environment should inherit from appropriate base classes and implement required methods.
</Info>

### Upload Your Environment

Once you've developed and tested your environment, push it to the Environments Hub:

```bash theme={null}
# Inside the environments/<your-env-name>/ directory
prime env push
```

This will upload your environment under your user account. You can also upload it to a team using:

```bash theme={null}
prime env push --team <team-username>
```

<Note>
  Once uploaded, your environment will be available for installation by others using `prime env install owner/environment-name`, unless you use the `--visibility=PRIVATE` flag.
</Note>

## URL Dependencies

If your environment depends on packages from Git repositories (not published to PyPI), you need to use the PEP 440/508 format directly in your `dependencies` list.

### Correct Format

```toml theme={null}
[project]
dependencies = [
    "verifiers",
    "tau2 @ git+https://github.com/sierra-research/tau2-bench.git",
]
```

### Incorrect Format

Do **not** use `[tool.uv.sources]` for URL dependencies that need to work with the Environments Hub:

```toml theme={null}
# ❌ This won't work - uv.sources is not embedded in wheel metadata
[tool.uv.sources]
tau2 = { git = "https://github.com/sierra-research/tau2-bench.git" }
```

The `[tool.uv.sources]` section is uv-specific and not included in the wheel package metadata. When users install your environment, the URL dependency information would be lost.

<Info>
  The Environments Hub automatically extracts URL dependencies from your wheel and passes them as direct requirements during installation. This works around uv's security restriction on transitive URL dependencies from registry packages.
</Info>

## Version Management

### Updating Your Environment

When you make changes to your environment:

1. Update the version in `pyproject.toml`
2. Push the updated environment:

```bash theme={null}
prime env push
```

The system will automatically create a new version while keeping previous versions available.

<Tip>
  You can use `prime env push --auto-bump` to automatically increment the version number for you, so you don't need to manually update `pyproject.toml` each time.
</Tip>

## Getting Help

* Check the [verifiers GitHub repository](https://github.com/PrimeIntellect-ai/verifiers) for examples
* Review the [verifiers documentation](/verifiers/overview) for detailed guides
* Join our [Discord community](https://discord.gg/ZTFydGWPKj) for support
