Scope and rules

Updated on November 10, 2026

A CLI machine only has access to what you gave it. The scope is chosen on approval and can be changed later in Settings › CLI machines (or on app.konsolity.com/cli-machines, vault open). It is enforced twice: by the server, which refuses any call outside the scope, and by the machine itself, which applies encrypted rules the server can neither read nor change. Both refuse what is not allowed.

Domains

Domain What it allows
hosts List the chosen hosts; with full access, run commands on them (konsolity run).
snippets List the chosen snippets; with full access and hosts, run them (konsolity snippet run).
sessions See the CLI sessions running on the account and end them (konsolity sessions).
mcp Serve as tools for Claude agents (konsolity mcp, konsolity serve).

Default: hosts and snippets.

Read-only or full access

  • Read-only: lists and status only. No command can be run, not even through a snippet. This is the default access, and the right choice for a dashboard or monitoring.
  • Full access: commands are allowed on the chosen hosts, within the command rules below.

The machine vault

The machine never receives the key of your vault. On approval, your device draws a machine key specific to this machine, hands it over sealed, then copies, encrypted with this key, only the items the scope allows:

  • the chosen hosts, with their identities, their SSH keys and their pinned host keys;
  • the chosen snippets;
  • the rules of the machine.

The server stores these copies as opaque blobs. A host outside the scope has no copy: its SSH key never leaves your vault. The machine has no access to the account vault.

  • Adding a host to the scope: a device where the vault is open writes its copy.
  • Removing a host: the server deletes its copy at once.
  • Editing a host in the vault (address, key): your devices update the copies of the machines at their next sync. Deleting the host deletes its copies too.

Only hosts whose host key is already pinned in the vault can be used: the CLI never accepts an unknown host key (host_key_unknown). Connect to the host once from the app to pin it.

Command rules

With full access, konsolity run (and Claude's run_command tool) is only allowed if the host is in the scope and the command, without its leading and trailing spaces, matches a rule. Three ways to compare:

Type Rule Example pattern Accepts Refuses
exact the whole command, identical df -h df -h df -h /
prefix the command starts with the pattern uptime uptime -p w
glob * stands for a run of characters systemctl status * systemctl status nginx systemctl restart nginx

What * never allows

In a glob pattern, * cannot contain:

  • ; & | (chaining and pipe);
  • ` and $( (command substitution);
  • > and < (redirection);
  • a line break.

So systemctl status * accepts neither systemctl status nginx; rm -rf / nor systemctl status x | sh. A prefix pattern accepts whatever follows the prefix as is: keep it for harmless commands.

Any command

The Any command option allows any text on the chosen hosts. It asks for an explicit confirmation on screen and is discouraged: the machine becomes the equivalent of full shell access. Destructive commands stay confirmed (see below).

On activation with full access, no rule is checked and "Any command" is off: you must write rules or explicitly check "Any command", otherwise every free command is refused. Allowed snippets run as they are saved.

Maximum timeout

Every command is stopped beyond the maximum timeout: 60 seconds by default, 1 hour at most. The value asked by --timeout or by Claude is always capped by this timeout.

Destructive commands: always confirmed

Some commands are never run without your explicit confirmation in the app or on the console, whatever the scope, even with "Any command". A command (or the content of a snippet) is destructive if it contains, as a separate word, for example:

  • deletion and erasure: rm -r, rm -f, rmdir, shred, truncate, dd, mkfs, fdisk, parted, wipefs;
  • shutdown: shutdown, reboot, poweroff, halt, init 0, init 6, systemctl stop, disable, mask, kill, service ... stop, kill -9, killall, pkill;
  • accounts and permissions: userdel, deluser, passwd, chmod -R, chown -R, crontab -r;
  • firewall: iptables -F, ufw disable, ufw reset;
  • databases: DROP, TRUNCATE, DELETE FROM, ALTER TABLE ... DROP, migrate:fresh, migrate:reset, migrate:rollback;
  • repositories and infrastructure: git push --force, git reset --hard, git clean -f, docker rm, docker rmi, docker system prune, docker volume rm, docker compose down -v, kubectl delete, terraform destroy;
  • a > redirection to a disk (/dev/sd*, /dev/nvme*) or to /etc/.

The same list is applied by the CLI and by the server: a destructive command started without an approved confirmation is refused on both sides. The flow is described in Confirmations.

Change the scope

  • Widening (adding a domain, going from read-only to full access) requires the second factor again (TOTP or passkey).
  • Narrowing (removing a domain, going back to read-only, removing a host) is immediate and asks for nothing: copies outside the scope are deleted at once.

Command rules and the timeout can be changed at any time, vault open. To see what the machine actually applies:

konsolity policy

Examples

Monitoring (read-only, hosts + sessions): lists and status, no command.

Day-to-day operations (full access, a few hosts):

glob     systemctl status *
exact    df -h
exact    free -m
prefix   uptime
glob     journalctl -u * --since *
glob     tail -n * /var/log/nginx/error.log
exact    docker ps

plus the snippets "Restart nginx" and "Clear the application cache".

Deployment from CI (long-lived token, full access, hosts + snippets): a single "Deploy" snippet on the production host, no free command rule.