# Sharing commands

These commands decide who can open a project. Typing `grayspar access` or `grayspar open-path` alone runs its `list` command.

## grayspar access list

Show who can open a project.

```sh
grayspar access list [flags]
```

## grayspar access add

Let people or a whole company open a project.

```sh
grayspar access add [flags] <targets...>
```

| Argument | Description |
| --- | --- |
| `targets` | Email addresses, or @company.example for everyone at a company. |

```sh
grayspar access add alice@example.com bob@example.com
grayspar access add @northfold.example
```

Adding a company needs the owner role.

## grayspar access remove

Remove a person or company from a project's list.

```sh
grayspar access remove [flags] <target>
```

| Argument | Description |
| --- | --- |
| `target` | An email address, or @company.example. |

```sh
grayspar access remove alice@example.com
```

## grayspar access set

Choose whether only the list or anyone with the link can open a project.

```sh
grayspar access set [flags]
```

| Flag | Description |
| --- | --- |
| `--mode <mode>` | Restricted lets in the people and companies on the list, open lets in anyone with the link (choices: "restricted", "open"). |

```sh
grayspar access set --mode open
grayspar access set --mode restricted
```

This command needs the owner role.

## grayspar open-path list

List a project's open paths.

```sh
grayspar open-path list [flags]
```

## grayspar open-path add

Let anyone reach a path and everything below it.

```sh
grayspar open-path add [flags] <path>
```

| Argument | Description |
| --- | --- |
| `path` | A path such as /webhooks. |

```sh
grayspar open-path add /webhooks
```

This command needs the owner role.

## grayspar open-path remove

Make a path ask for login again.

```sh
grayspar open-path remove [flags] <path>
```

| Argument | Description |
| --- | --- |
| `path` | An open path such as /webhooks. |

```sh
grayspar open-path remove /webhooks
```