---
title: "af folder"
description: "Manage restricted folders and who can access them"
---

> 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 folder

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

A restricted folder, and everything under it, can be read and written only by the teams and people given access to it. A folder can also be restricted for writing only, so that everyone can still read it.

## Usage

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

## Commands

| Command | What it does |
| --- | --- |
| [`list`](#af-folder-list) | List restricted folders, and who can read and write in each |
| [`restrict`](#af-folder-restrict) | Request that a folder be restricted |
| [`unrestrict`](#af-folder-unrestrict) | Request that a folder's restriction be removed |
| [`grant`](#af-folder-grant) | Request access to a restricted folder for a team or person |
| [`revoke`](#af-folder-revoke) | Request that a team or person lose access to a restricted folder |

## Global options

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

## Examples

```sh
af folder list
af folder restrict payroll --team payroll --reason "salary data"
af folder restrict docs/policies --person ada@example.com --only-writes --reason "policy has owners"
```

## af folder list {#af-folder-list}

List restricted folders, and who can read and write in each

### Usage

```text
af folder list [OPTIONS]
```

### Global options

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

## af folder restrict {#af-folder-restrict}

Request that a folder be restricted

Restricts the folder, and everything under it, to the teams and people named. With --only-writes, everyone can still read it. Requires an administrator; it takes effect at once unless the forge requires a second administrator.

### Usage

```text
af folder restrict [OPTIONS] <FOLDER>
```

### Arguments

- `<FOLDER>`

  Path of the folder, from the repository root

### Options

- `--only-writes`

  Restrict writing only, so that everyone can still read the folder

- `--team <TEAMS>`

  Team to give access, as the identity provider names the group; repeatable

- `--person <PEOPLE>`

  Person to give access, by sign-in email; repeatable

- `--reason <REASON>`

  Reason for the request, recorded with it

  Default: `""`

### Global options

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

## af folder unrestrict {#af-folder-unrestrict}

Request that a folder's restriction be removed

Requires an administrator; it takes effect at once unless the forge requires a second administrator.

### Usage

```text
af folder unrestrict [OPTIONS] <FOLDER>
```

### Arguments

- `<FOLDER>`

  Path of the folder, from the repository root

### Options

- `--reason <REASON>`

  Reason for the request, recorded with it

  Default: `""`

### Global options

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

## af folder grant {#af-folder-grant}

Request access to a restricted folder for a team or person

Approved by an administrator, or by someone else who already has access to the folder.

### Usage

```text
af folder grant [OPTIONS] <FOLDER>
```

### Arguments

- `<FOLDER>`

  Path of the folder, from the repository root

### Options

- `--team <TEAM>`

  Team to give access, as the identity provider names the group

- `--person <PERSON>`

  Person to give access, by sign-in email

- `--reason <REASON>`

  Reason for the request, recorded with it

  Default: `""`

### Global options

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

## af folder revoke {#af-folder-revoke}

Request that a team or person lose access to a restricted folder

Approved by an administrator, or by someone else who has access to the folder.

### Usage

```text
af folder revoke [OPTIONS] <FOLDER>
```

### Arguments

- `<FOLDER>`

  Path of the folder, from the repository root

### Options

- `--team <TEAM>`

  Team to remove access from, as the identity provider names the group

- `--person <PERSON>`

  Person to remove access from, by sign-in email

- `--reason <REASON>`

  Reason for the request, recorded with it

  Default: `""`

### 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/folder/index.mdx
