# atmos ci cache paths

Print the resolved cache **key**, **paths**, and **restore-keys** so a native cache (such as GitHub's `actions/cache`) can do the storage while Atmos supplies _what_ to cache from your `ci.cache` configuration. Unlike `restore`/`save`, this needs no CI provider or runtime token, so it works on any OS and CI system.

> ⚠️ Experimental

**Configure the CI Cache**

The key and paths printed by this command come from the `ci.cache` section of your `atmos.yaml`.

CI Cache Configuration Reference[Read more](/cli/configuration/ci/cache)

## Usage

```shell
atmos ci cache paths [flags]
```

With `--format=github`, the values are appended to `$GITHUB_OUTPUT` (as `key`, `path`, and `restore-keys`) so a following `actions/cache` step can reference them as step outputs.

## Examples

```shell
# Emit GitHub Actions step outputs (key, path, restore-keys)
atmos ci cache paths --format=github

# Structured output for any other CI or tooling
atmos ci cache paths --format=json
atmos ci cache paths --format=yaml

# Shell-evaluable ATMOS_CI_CACHE_* variables
eval "$(atmos ci cache paths --format=env)"
```

### Use with `actions/cache`

```yaml
- name: Resolve Atmos cache key & paths
  id: atmos-cache
  run: atmos ci cache paths --format=github

- name: Cache Atmos toolchain
  uses: actions/cache@v4
  with:
    key:          ${{ steps.atmos-cache.outputs.key }}
    path:         ${{ steps.atmos-cache.outputs.path }}
    restore-keys: ${{ steps.atmos-cache.outputs.restore-keys }}
```

:::tip One-line equivalent
The [`cloudposse/atmos/actions/cache`](/cli/configuration/ci/cache#github-actions-integration) composite action bundles this `paths` step and `actions/cache` into a single `uses:`.
:::

## Flags

- **`--format`**
  Output format: 
  `github`
   (default, writes 
  `$GITHUB_OUTPUT`
  ), 
  `json`
  , 
  `yaml`
  , or 
  `env`
  .
- **`--key` / `-k`**
  Exact cache key. Defaults to a key derived from the toolchain lockfile plus OS/arch.
- **`--path` / `-p`**
  Root-relative subpaths to cache. Defaults to the entire cache root. Repeatable.
- **`--root`**
  Override the cache root directory (defaults to the Atmos XDG cache directory, e.g. 
  `~/.cache/atmos`
  ).

## Environment Variables

- **`ATMOS_CI_CACHE_ENABLED`**
  Must be 
  `true`
   (or 
  `ci.cache.enabled: true`
   in 
  `atmos.yaml`
  ) for the command to run.
- **`ATMOS_CI_CACHE_FORMAT`**
  Overrides 
  `--format`
  .
- **`ATMOS_CI_CACHE_KEY`**
  Overrides 
  `--key`
  .

## Related

- [CI Cache Configuration](/cli/configuration/ci/cache) - Configure the cache and the GitHub Actions integration options
- [`atmos ci cache restore`](/cli/commands/ci/cache/restore) - Restore via the Atmos-managed backend
- [`atmos ci cache save`](/cli/commands/ci/cache/save) - Save via the Atmos-managed backend
