<!-- Source: https://docs.biosimulant.com/references/cli -->

# Biosimulant CLI

There is one headless `biosimulant` CLI. The same Python package, command parser, JSON schema, and exit codes run in Biosimulant Desktop, Cloud Studio, local terminals, CI, servers, and containers.

Desktop and Studio provide interfaces and managed environments around the CLI; neither defines a separate command platform.

## Install

For an isolated command-line installation, `pipx` is recommended:

```bash
pipx install biosimulant
biosimulant --version
```

`uv` is a fast alternative:

```bash
uv tool install biosimulant
```

For a reproducible project environment, pin the package:

```bash
python -m pip install "biosimulant==0.0.22"
```

See [Install and upgrade](/references/cli/installing) for platform setup, upgrades, and shell completion.

**Info:**

  Cloud Studio workspaces already contain the CLI version tested with that workspace image. Desktop installs the exact checksum-verified package version associated with the app release.

## Verify

```bash
biosimulant --version
biosimulant doctor
biosimulant runtime status --json
```

## Authenticate

Biosimulant Hub is the default registry:

```bash
biosimulant auth login
biosimulant auth status
```

Authenticate to another Registry API v1 service by origin:

```bash
printf '%s\n' "$TOKEN" | \
  biosimulant auth login registry.example.com --token-stdin
```

Credentials are isolated per registry. Public pulls do not require authentication. See [Registry references and authentication](/references/cli/registry-auth).

Registry implementers should use the [Registry API v1 protocol reference](/references/cli/registry-api), including discovery, token exchange, immutable publishing, and checksum verification.

## Pull, validate, run, and publish

```bash
biosimulant labs pull acme/cell-study@1.0.0
biosimulant labs validate ./cell-study
biosimulant labs run ./cell-study --json
biosimulant labs publish ./cell-study
```

Custom registry references qualify the registry:

```bash
biosimulant labs pull registry.example.com/acme/cell-study@1.0.0
```

Versions are immutable. Pull may omit the version to resolve the registry default; publishing requires explicit package and version metadata.

`biosimulant validate` and `biosimulant run` are stable aliases for the corresponding `labs` commands.

## Automation

Use `--json` for one schema-v1 result or `--json-stream` for ordered JSONL progress followed by one terminal result:

```bash
biosimulant --json labs validate ./cell-study
biosimulant labs run ./cell-study --json-stream
```

Global flags may appear before or after subcommands. See [Machine-readable output](/references/cli/machine-output) for the envelope, progress contract, and exit-code table.

## Command catalog

```bash
biosimulant commands list --json
```

The [Command Reference](/references/cli/command-reference) is generated from that Python-owned catalog.

## Related

- [Install and upgrade](/references/cli/installing)
- [Registry references and authentication](/references/cli/registry-auth)
- [Machine-readable output and exit codes](/references/cli/machine-output)
- [Migrate from the native Desktop CLI](/references/cli/migration)
- [Package and publish](/how-to/library/package-and-publish)
