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

# nsc cache pants setup

Set up a remote cache for Pantsbuild.

Namespace provides high-performance remote caching with very low network latency between runners and the cache storage.
This allows your Pantsbuild workflows to reuse build artifacts across runs, irrespective of your chosen granularity, significantly reducing build times.
`cache pants setup` sets up a remote cache for Pantsbuild and generates a `pants.toml` to use it.

[Learn more about Pantsbuild caching →](/docs/integrations/pants)

## Usage

```bash theme={null}
nsc cache pants setup [--pants-toml <target pants toml path>]
```

### Example

The following example creates a remote cache and uses it during a Pantsbuild invocation.

<Steps titleSize="h4">
  <Step title="Configure the remote cache">
    Generate a Pants configuration for the remote cache:

    ```bash theme={null}
    nsc cache pants setup --pants-toml=/tmp/pants.toml
    ```
  </Step>

  <Step title="Run tests">
    Use the generated configuration during a Pants invocation:

    ```bash theme={null}
    pants --pants-config-files="['/your/own/pants.toml', '/tmp/pants.toml', ...]" test ::
    ```
  </Step>
</Steps>

## Options

<h3 id="--pants-toml">
  \--pants-toml
</h3>

If specified, write the toml to this path.
