> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# circleci/circleci-cli

Easily install and configure the CircleCI command-line interface.


## Commands

### install

Install the CircleCI CLI

| Parameter | Type | Default | Description |
|---|---|---|---|
| `debug` | boolean | false | Extra output for orb developers
 |
| `install-dir` | string | /usr/local/bin | Directory in which to install the CircleCI CLI
 |
| `version` | string | latest | Version of CircleCI CLI to install, defaults to the latest release. If specifying a version other than latest, provide a full release tag, as listed at https://api.github.com/repos/CircleCI-Public/circleci-cli/tags, e.g., `v0.1.5581`.
 |

### setup

Run `circleci setup` to configure the CircleCI CLI (CLI must be installed first): https://circleci-public.github.io/circleci-cli/circleci_setup.html


| Parameter | Type | Default | Description |
|---|---|---|---|
| `host` | string | https://circleci.com | Full URL of your CircleCI host (use the default value unless you are using a hosted installation of CircleCI)
 |
| `token` | env_var_name | CIRCLECI_CLI_TOKEN | Name of environment variable storing a CircleCI API token to use for CircleCI CLI commands that require authentication
 |

## Executors

### default

The circleci-cli Docker image, which includes the CircleCI CLI


| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | latest | What version of the CircleCI CLI Docker image? For full list, see https://hub.docker.com/r/circleci/circleci-cli/tags
 |

## Examples

### executor-command-example

Run a job inside the CircleCI CLI container, via this orb's executor. In another job, use the orb to install the CLI.


```yaml
version: '2.1'
orbs:
  cli: circleci/circleci-cli@x.y.z
jobs:
  use-executor:
    executor: cli/default
    steps:
      - run: echo "this job is using the orb's default executor"
  use-install-command:
    docker:
      - image: circleci/circleci-cli:latest
    steps:
      - cli/install
      - run: echo "the CLI is now installed"
workflows:
  cli-orb-example:
    jobs:
      - use-executor
      - use-install-command
```