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

# Overview

> Use the Openlayer CLI to interact with Openlayer

## Installing the Openlayer CLI

To download and install Openlayer CLI, run the command that corresponds to your OS:

<CodeGroup>
  ```bash Mac (Apple silicon) theme={null}
  curl -o- "https://downloads.openlayer.com/cli/install/osx_arm64.sh" | sh
  ```

  ```bash Mac (Intel) theme={null}
  curl -o- "https://downloads.openlayer.com/cli/install/osx_64.sh" | sh
  ```

  ```bash Linux (Arm) theme={null}
  curl -o- "https://downloads.openlayer.com/cli/install/linux_arm64.sh" | sh
  ```

  ```bash Linux (x86) theme={null}
  curl -o- "https://downloads.openlayer.com/cli/install/linux_64.sh" | sh
  ```

  ```bash Windows (x86) theme={null}
  powershell.exe -NoProfile -InputFormat None -ExecutionPolicy AllSigned -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://downloads.openlayer.com/cli/install/windows_64.ps1'))"
  ```
</CodeGroup>

## Getting started

Once the CLI is installed, [`openlayer init`](/docs/api-reference/cli/commands/init) is the fastest
way to connect a project. It signs you in, creates or links the Openlayer project, and sets up
development mode, monitoring, or both:

```bash theme={null}
cd my-ai-app
openlayer init
```

So the recommended first run is:

<Steps>
  <Step title="Install the CLI">
    Run the [install command](#installing-the-openlayer-cli) for your operating
    system.
  </Step>

  <Step title="Run openlayer init">
    [`openlayer init`](/docs/api-reference/cli/commands/init) signs you in and
    creates or links the project, so you do not need separate
    [`login`](/docs/api-reference/cli/commands/login) and
    [`link`](/docs/api-reference/cli/commands/link) steps.
  </Step>

  <Step title="Push to Openlayer">
    [`openlayer push`](/docs/api-reference/cli/commands/push) creates a commit on
    your project and runs your tests. `init` offers to do this first push for
    you.
  </Step>
</Steps>

## Checking the version

The `--version` option can be used to verify the version of Openlayer CLI being used.

```bash theme={null}
openlayer --version
```

## Using in a CI/CD environment

Openlayer CLI requires you to log in and authenticate before performing tasks, such as pushing
or accessing test results.

In a terminal environment, you can use `openlayer login`, which requires manual input.

In a CI/CD environment where manual input is not possible, you can use your [Openlayer API key](/docs/workspace-and-projects/find-your-api-key)
and the `--api-key` option to authenticate. Refer to the [CI/CD guide](/docs/guides/gh-actions) for details.

`openlayer init` is interactive by default, but it also has a
[non-interactive mode](/docs/api-reference/cli/commands/init#non-interactive-use) for CI and coding
agents.

## Available commands

* [batch](/docs/api-reference/cli/commands/batch)
* [data-sources](/docs/api-reference/cli/commands/data-sources)
* [export](/docs/api-reference/cli/commands/export)
* [help](/docs/api-reference/cli/commands/help)
* [init](/docs/api-reference/cli/commands/init)
* [inspect](/docs/api-reference/cli/commands/inspect)
* [install](/docs/api-reference/cli/commands/install)
* [link](/docs/api-reference/cli/commands/link)
* [login](/docs/api-reference/cli/commands/login)
* [metrics](/docs/api-reference/cli/commands/metrics)
* [profile](/docs/api-reference/cli/commands/profile)
* [projects](/docs/api-reference/cli/commands/projects)
* [push](/docs/api-reference/cli/commands/push)
* [tests](/docs/api-reference/cli/commands/tests)
* [update](/docs/api-reference/cli/commands/update)
* [validate](/docs/api-reference/cli/commands/validate)
* [whoami](/docs/api-reference/cli/commands/whoami)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.