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

# Getting started with the platform CLI

export const GCell = ({children, className}) => <div className={`grid-table-cell ${className || ""}`} role="cell">
    {children}
  </div>;

export const GTH = ({children, className}) => <div className={`grid-table-th ${className || ""}`} role="columnheader">
    {children}
  </div>;

export const GRow = ({children}) => <div className="grid-table-row" role="row">{children}</div>;

export const GBody = ({children}) => <div className="grid-table-body" role="rowgroup">{children}</div>;

export const GHead = ({children}) => <div className="grid-table-head" role="rowgroup">{children}</div>;

export const GTable = ({children, className, cols}) => <div className={`grid-table not-prose overflow-hidden rounded-2xl ${className || ""}`} style={{
  "--grid-table-cols": cols
}} role="table">
    {children}
  </div>;

export const Comments = ({children}) => {
  return <div class="my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-zinc-500/20 bg-zinc-50/50 dark:border-zinc-500/30 dark:bg-zinc-500/10" data-callout-type="comments">
      <div class="w-4">
        <svg width="14" height="14" viewBox="0 0 640 640" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" aria-label="Comments">
            <path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM280 400C266.7 400 256 410.7 256 424C256 437.3 266.7 448 280 448L360 448C373.3 448 384 437.3 384 424C384 410.7 373.3 400 360 400L352 400L352 312C352 298.7 341.3 288 328 288L280 288C266.7 288 256 298.7 256 312C256 325.3 266.7 336 280 336L304 336L304 400L280 400zM320 256C337.7 256 352 241.7 352 224C352 206.3 337.7 192 320 192C302.3 192 288 206.3 288 224C288 241.7 302.3 256 320 256z" />
        </svg>
      </div>
      <div class="text-sm prose min-w-0 w-full">
        {children}
      </div>
    </div>;
};

Anaconda Platform uses the `outerbounds` CLI to interact with your organization from a terminal. It enables you to download models from the [model catalog](/docs/platform/concepts/what-is-the-model-catalog), run flows on your organization's compute, deploy and manage long-running services, and manage platform resources.

## Installing the CLI

The `outerbounds` CLI is available as a conda package from the `main` channel and as a Python package from PyPI:

<Tabs>
  <Tab title="conda">
    ```sh theme={null}
    conda install --name <ENVIRONMENT> outerbounds
    ```

    <Comments>
      Replace \<ENVIRONMENT> with the name of the environment where you want to install the CLI.
    </Comments>
  </Tab>

  <Tab title="uv">
    ```sh theme={null}
    uv pip install outerbounds
    ```
  </Tab>

  <Tab title="pip">
    ```sh theme={null}
    python -m pip install -U outerbounds
    ```
  </Tab>
</Tabs>

The model catalog commands (`outerbounds mc`) require `outerbounds` 0.12.45 or later. To upgrade an existing installation, run `conda update outerbounds` or `pip install --upgrade outerbounds`.

<Warning>
  The open-source `metaflow` package conflicts with the Metaflow distribution bundled with the `outerbounds` CLI. If `metaflow` is already installed in your environment, uninstall it by running `python -m pip uninstall metaflow`, then reinstall `outerbounds`.
</Warning>

## Authenticating to your Anaconda Platform organization

Your organization generates a personal configuration string for you, displayed in the Anaconda Platform UI as a ready-to-run `configure` command.

<Tip>
  On a [workstation](/docs/platform/concepts/what-is-a-workstation), the CLI is already installed and configured for you. If you're working in a workstation, skip ahead to [Downloading models from the catalog](#downloading-models-from-the-catalog).
</Tip>

To authenticate the CLI:

1. Log in to your Anaconda Platform organization.

2. Open your user settings by clicking on your profile in the lower-left corner, then select **Local Setup**.

3. Under **Configure Outerbounds**, copy the command shown and run it in your terminal. The command includes your personal configuration string.

   <Frame>
     <img src="https://mintcdn.com/anaconda-29683c67/VD0yQ0tXYWIdTsBU/images/platform/plat_local_setup.png?fit=max&auto=format&n=VD0yQ0tXYWIdTsBU&q=85&s=bf28f2f48912aaf2df4c4c252fa2ceba" alt="The Local Setup page showing the Configure Outerbounds section with a ready-to-copy configure command" width="1866" height="1082" data-path="images/platform/plat_local_setup.png" />
   </Frame>

4. To verify your installation and configuration, run:

   ```sh theme={null}
   outerbounds check
   ```

   If the check reports a problem, run `outerbounds check --verbose` for details.

The `configure` command decodes the string and writes a configuration file to `~/.metaflowconfig`. You only need to configure the CLI once per machine for each organization you belong to. Most users only belong to one organization.

The configuration string is specific to you and to the perimeter selected in the UI. If the **Local Setup** page does not show a configuration command, you might not have the required access to the perimeter. Contact your administrator.

### Configure options

<GTable cols="25% 25% 50%">
  <GHead>
    <GRow>
      <GTH>Option</GTH>
      <GTH>Default</GTH>
      <GTH>Description</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>`-d, --config-dir <PATH>`</GCell>
      <GCell>`~/.metaflowconfig`</GCell>
      <GCell>Path to the Metaflow configuration directory</GCell>
    </GRow>

    <GRow>
      <GCell>`-p, --profile <PROFILE>`</GCell>

      <GCell />

      <GCell>Save the configuration as a named profile instead of the default. Use the `METAFLOW_PROFILE` environment variable to switch between profiles. See [Working with multiple organizations](#working-with-multiple-organizations).</GCell>
    </GRow>

    <GRow>
      <GCell>`-e, --echo`</GCell>
      <GCell>`false`</GCell>
      <GCell>Print the configuration values to stdout</GCell>
    </GRow>

    <GRow>
      <GCell>`-f, --force`</GCell>
      <GCell>`false`</GCell>
      <GCell>Overwrite an existing configuration without prompting</GCell>
    </GRow>
  </GBody>
</GTable>

### Working with multiple organizations

To work with more than one organization, write each organization's configuration to a named profile, then set the `METAFLOW_PROFILE` environment variable to select the profile the CLI uses:

```sh theme={null}
outerbounds configure --profile <PROFILE_NAME> <TOKEN>
export METAFLOW_PROFILE=<PROFILE_NAME>
```

<Comments>
  Replace \<PROFILE\_NAME> with a name for the profile, such as your organization's name.<br />
  Replace \<TOKEN> with the organization's configuration string, shown on its **Local Setup** page.
</Comments>

## Authenticating the CLI in CI/CD pipelines

Machine users are identities for automated pipelines and jobs, such as deploying a project from a CI/CD workflow. Unlike human users, machine users authenticate with a token issued by their identity provider rather than a configuration string from the UI.

To configure the CLI for a machine user, run:

```sh theme={null}
outerbounds service-principal-configure --name <MACHINE_USER> --deployment-domain <DEPLOYMENT_DOMAIN> --perimeter <PERIMETER> --jwt-token <JWT_TOKEN>
```

<Comments>
  Replace \<MACHINE\_USER> with the name of the machine user to authenticate.<br />
  Replace \<DEPLOYMENT\_DOMAIN> with the full domain of your organization.<br />
  Replace \<PERIMETER> with the name of the perimeter where the machine user operates. If you omit the perimeter, the CLI uses the perimeter named default.<br />
  Replace \<JWT\_TOKEN> with the OIDC token issued by the machine user's identity provider.
</Comments>

<Tip>
  If your project contains an `obproject.toml` file, you can pass `--from-obproject-toml` instead of `--name`, `--deployment-domain`, and `--perimeter`. The CLI reads those values from the file. For more on project setup, see [Working with projects](/docs/platform/guides/projects/working-with-projects).
</Tip>

The token flag depends on the machine user's identity provider:

<GTable cols="25% 75%">
  <GHead>
    <GRow>
      <GTH>Provider</GTH>
      <GTH>How to authenticate</GTH>
    </GRow>
  </GHead>

  <GBody>
    <GRow>
      <GCell>GitHub Actions</GCell>
      <GCell>Pass `--github-actions` instead of `--jwt-token`. The CLI reads the OIDC token from the workflow environment automatically.</GCell>
    </GRow>

    <GRow>
      <GCell>GitLab CI</GCell>
      <GCell>Pass `--jwt-token "$OUTERBOUNDS_ID_TOKEN"`, issued by GitLab's `id_tokens` keyword</GCell>
    </GRow>

    <GRow>
      <GCell>CircleCI</GCell>
      <GCell>Pass `--jwt-token "$CIRCLE_OIDC_TOKEN_V2"`</GCell>
    </GRow>

    <GRow>
      <GCell>Other OIDC providers</GCell>
      <GCell>Pass `--jwt-token` with the OIDC token your provider issues</GCell>
    </GRow>
  </GBody>
</GTable>

The **Use** page for a machine user in the Anaconda Platform UI provides configuration commands and example CI/CD workflows, pre-filled for that machine user. To find it, select **Users** under **Governance**, open the **Machines** tab, and then select the machine user. For machine users backed by an AWS IAM role, the **Use** page provides an `outerbounds configure` command instead, which retrieves the configuration from AWS Secrets Manager and requires IAM credentials in the environment.

For the full CI/CD setup, see [Working with projects](/docs/platform/guides/projects/working-with-projects).

## Downloading models from the catalog

The `outerbounds mc pull` command downloads a model from the [model catalog](/docs/platform/concepts/what-is-the-model-catalog) to your local machine or a workstation. For usage, options, and examples, see [`outerbounds mc pull`](/docs/platform/cli/mc/pull).

## Deploying and managing apps

The `outerbounds app` commands deploy services on the platform and manage their lifecycle:

```sh theme={null}
outerbounds app deploy --config-file <CONFIG_FILE>
```

<Comments>
  Replace \<CONFIG\_FILE> with the path to your deployment configuration file, in YAML or JSON format.
</Comments>

The CLI creates deployments in your active perimeter. To change it, run `outerbounds perimeter switch`. For the full reference, including updating, inspecting, logs, and deletion, see the [app commands](/docs/platform/cli/app/deploy).

## Command overview

The CLI includes command groups for working with platform resources. For the full reference, see the [command overview](/docs/platform/cli/commands).

The `outerbounds` package also bundles Metaflow, the framework you use to develop and run flows:

```sh theme={null}
python myflow.py run
```

For more information on building and running flows, see [Connecting to the platform and running your first flow](/docs/platform/getting-started/connect-and-first-run).
