> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlayer.com/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:

```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'))"
```

## Getting started

Once the CLI is installed, [`openlayer init`](https://docs.openlayer.com/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:

**1. Install the CLI**

Run the [install command](#installing-the-openlayer-cli) for your operating
system.

**2. Run openlayer init**

[`openlayer init`](https://docs.openlayer.com/api-reference/cli/commands/init) signs you in and
creates or links the project, so you do not need separate
[`login`](https://docs.openlayer.com/api-reference/cli/commands/login) and
[`link`](https://docs.openlayer.com/api-reference/cli/commands/link) steps.

**3. Push to Openlayer**

[`openlayer push`](https://docs.openlayer.com/api-reference/cli/commands/push) creates a commit on
your project and runs your tests. `init` offers to do this first push for
you.

## 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](https://docs.openlayer.com/workspace-and-projects/find-your-api-key.md)
and the `--api-key` option to authenticate. Refer to the [CI/CD guide](https://docs.openlayer.com/guides/gh-actions.md) for details.

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

## Available commands

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


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