---
title: "alpacon token acl command add"
description: "Allow a token to run a specified shell command. Check syntax, flag types, defaults, and practical examples for this command before using it in your workspace."
---

> Full documentation index: https://docs.alpacax.com/llms.txt

# alpacon token acl command add

Allow a token to run a specified shell command.

## Usage

`alpacon token acl command add TOKEN [flags]`

## Key facts

- Without `*`, the command must match exactly.
- Omitting `--username` restricts the rule to the token owner.
- Use `--groupname` to restrict the group.

## Flags

| Flag | Type | Description | Default |
| --- | --- | --- | --- |
| `-c, --command` | `string` | Server-side shell command (supports \* wildcard) | — |
| `--groupname` | `string` | Groupname restriction: "" = no restriction, "\*" = any group | — |
| `-h, --help` | `bool` | help for add | `false` |
| `--username` | `string` | Username restriction: "" = token owner only, "\*" = any user | — |
| `--output` | `string` | Output format: table or json | `table` |

## Examples

Allow an exact command

```bash
alpacon token acl command add my-api-token --command="whoami"
```

Allow a command with any arguments (wildcard)

```bash
alpacon token acl command add my-api-token --command="systemctl status *"
```

Restrict to a specific user running the command

```bash
alpacon token acl command add my-api-token --command="docker *" --username=root
```

Allow any user and group

```bash
alpacon token acl command add my-api-token --command="npm *" --username="*" --groupname="*"
```

If `add` or `delete` returns `command_acl_moved`, ask a Command ACL admin to manage the service token's pre-approved commands in the web console. On these servers, personal API tokens have no command list. `ls` remains available.

Source: https://docs.alpacax.com/reference/cli/token/acl-command-add/
