---
title: "af sparse"
description: "List or change the files the workspace holds"
---

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

# af sparse

<!-- Generated by tools/gen-reference.mjs from `af sparse --help`. Change the help text in crates/atoll-forge-cli/src/main.rs, then run `npm run gen:reference`. -->

As jj sparse: the workspace holds the files its glob patterns match, from the repository root. Changing them snapshots the files first, so your edits stay in the change, then brings the files newly matched and removes those matched no more.

## Usage

```text
af sparse [OPTIONS] <COMMAND>
```

## Commands

| Command | What it does |
| --- | --- |
| [`list`](#af-sparse-list) | List the workspace's patterns |
| [`set`](#af-sparse-set) | Add or remove patterns |
| [`reset`](#af-sparse-reset) | Hold every file again |

## Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## Examples

```sh
af sparse list
af sparse set --add 'docs/**' --remove 'tests/**'
af sparse reset
```

## af sparse list {#af-sparse-list}

List the workspace's patterns

### Usage

```text
af sparse list [OPTIONS]
```

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af sparse set {#af-sparse-set}

Add or remove patterns

### Usage

```text
af sparse set [OPTIONS]
```

### Options

- `--add <ADD>`

  Glob to add, from the repository root, such as `crates/foo/**`; repeat for more

- `--remove <REMOVE>`

  Glob to remove; repeat for more

- `--clear`

  Start from no patterns before adding

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

## af sparse reset {#af-sparse-reset}

Hold every file again

### Usage

```text
af sparse reset [OPTIONS]
```

### Global options

Every `af` command also takes the [global options](https://docs.forge.workreef.dev/reference/af/#global-options).

Source: https://docs.forge.workreef.dev/reference/af/sparse/index.mdx
