Metadata-Version: 2.5
Name: envloop-cli
Version: 0.4.0
Summary: EnvLoop CLI and Python SDK for jobs, training, checkpoints and inference
Project-URL: Homepage, https://envloop.ai
Project-URL: Documentation, https://docs.envloop.ai
Project-URL: Repository, https://github.com/EnvLoop/envloop-cli
Project-URL: Issues, https://github.com/EnvLoop/envloop-cli/issues
Project-URL: Agent instructions, https://docs.envloop.ai/skill.md
Requires-Python: >=3.11
Requires-Dist: tinker==0.34.0
Description-Content-Type: text/markdown

# envloop-cli: EnvLoop CLI and Python SDK

Install the public client to run agent Jobs, inspect Trials, manage training and
checkpoints, and deploy or call inference endpoints. The `el` and `envloop`
commands are equivalent. The Python import package is `envloop`.

## Install

Use a Python virtual environment:

```bash
python -m pip install --upgrade envloop-cli
el --help
```

The standard installation includes training support:

```bash
python -c 'from envloop import Client, training; print("EnvLoop SDK ready")'
```

The package installs the training protocol client by default. You do not need a source checkout, GitHub account,
local execution backend, Docker, or a GPU to install the client.

## Connect

Use an authorized EnvLoop account and project. Browser authorization:

```bash
el auth login
el auth status --check
```

For an existing project API key, use the masked configuration wizard:

```bash
el auth config
el auth status --check
```

CI can read credentials from `ENVLOOP_API_KEY` and connection settings from
`ENVLOOP_BASE_URL`, `ENVLOOP_WORKSPACE_ID` and `ENVLOOP_PROJECT_ID`. Keep keys in
your secret manager. Public API access is scoped to the authorized project.

## Explore your project

```bash
el job list --limit 5
el job list --type train --limit 5
el trail list --limit 5
el trail list --type train --job-id JOB_ID
el checkpoint list --limit 5
el job list --type inference
```

Query a returned Job ID with `el job get JOB_ID` and `el job result JOB_ID`.
Trial commands use the spelling `trail`, for example
`el trail artifact list TRIAL_ID`. Use each command's `--help` for options.

For the Python SDK:

```python
from envloop import Client

with Client.remote() as client:
    print(client.jobs.list(limit=5))
    print(client.trials.list(type="train", limit=5))
```

Submitting work, training a model or starting inference can allocate billable
resources. Follow the task-specific guide and retain the outputs you need before
cleaning up temporary resources.

## Sandbox jobs

With a matching platform and a published `envhub/base` ANS Runner, submit a
Sandbox Job without a Dataset:

```bash
el job submit --type sandbox --runner base --command 'python --version'
el job submit --type sandbox --runner base --image python:3.11 --wait
el job list --type sandbox
el job log JOB_ID --follow
```

The platform resolves `base` to the registered `envhub/base@main` source ref and
freezes its immutable Revision. The Sandbox image defaults to `python:3.11`;
`--image` accepts an image name, tag or digest. The execution provider is configured
by the server. Job logs retain the actual captured output and collection metadata.
Failures include a code, readable explanation, HTTP status when available, and
recovery guidance without echoing arbitrary response bodies or credentials.

## Existing installations

This distribution provides both the CLI and the `envloop` import package. Use a
fresh environment if you previously installed the separate source distribution
named `envloop`, so two distributions do not own the same Python module files.
Existing client configuration is reused; installing a package does not change
your account permissions or move remote resources. Check `el --help` when
upgrading because command groups may differ from your earlier installation.

## Documentation

- [English documentation](https://docs.envloop.ai/)
- [中文文档](https://docs.envloop.ai/zh-cn/)
- [Installation](https://docs.envloop.ai/cli-install)
- [CLI reference](https://docs.envloop.ai/reference/cli)
- [Training and deployment](https://docs.envloop.ai/training/train-deploy)
- [Agent entry: skill.md](https://docs.envloop.ai/skill.md)
