skirl

The skirl commands

Everything in Skirl can be done in the browser. The skirl program also has commands for a shell: to back up and restore, to check that the server answers, and to manage people, tokens, topics and templates from a script, or when nobody can sign in any more (an admin who forgot their password, say).

Running a command#

How you start a command depends on how Skirl runs. With the program installed on the machine, type it as shown on this page, for example:

skirl user list

In Docker the image has no shell: run the program inside the container, and tell it where the data is with --data-dir /data:

docker exec skirl /skirl user list --data-dir /data

The image sets SKIRL_DATA_DIR=/data from Skirl 1.0.0-test.7 on, so --data-dir /data is only needed with an older image; it does no harm with a newer one. Without it, an older image's command looks in a folder of its own: it finds no data, or makes a new, empty database there and changes nothing in the real one. A command that asks for a password also needs -it:

docker exec -it skirl /skirl user add --data-dir /data --admin ann

With the systemd service, run it as the service's user, with its data directory:

sudo -u skirl skirl user list --data-dir /var/lib/skirl

The people, token, topic and template commands open the database directly. They work whether or not the server is running; a change they make applies to the running server too. The data directory is --data-dir, or the SKIRL_DATA_DIR variable, or else ./data in the folder you are in.

Each command ends with exit status 0 when it worked, 1 when it failed (it says why), and 2 when the command itself was mistyped, so a script can tell them apart.

A newer skirl updates an older database the first time it opens it, the commands as much as the server: see What happens to the database.

The server#

serve#

Starts the server: the web app, the API and the push notifications, all on one port.

skirl serve

With nothing set it listens on port 8080 and keeps everything in ./data. Its settings, as variables or flags, are on Configuration variables. Its log goes to the terminal (in Docker, to the container's log; with systemd, to the journal): a line when it starts, with the address, the data directory and the version, and one line per request.

Ctrl-C, or stopping the container or the service, stops it: it lets requests in progress finish for up to 10 seconds first. A second Ctrl-C stops it at once.

health#

Asks the server on this machine whether it is up, the way the Docker image's own health check does every 30 seconds.

skirl health
healthy

It exits with 0 when the server answers. Otherwise it says what went wrong, such as "connection refused", and exits with 1; --timeout is how long it waits for the answer (5 seconds unless given). It asks the address in SKIRL_LISTEN (or --listen), as the server reads it; with no host, or 0.0.0.0, it asks this machine. It cannot see a --listen given to the server as a flag: set SKIRL_LISTEN instead, or give health the same --listen.

version#

Says which Skirl this is: its version, the commit it was built from, when, the Go version and the database's schema version.

skirl version
skirl 1.0.0
commit 3f3abf3b2e13
built  2026-12-01T09:00:00Z
go     go1.27.4
schema 13

The version and what it means: Where the version shows.

Backups#

backup#

Writes a copy of the database to a file while the server runs; with --with-attachments, one archive with the files people sent too.

skirl backup --with-attachments /var/backups/skirl-2026-12-01.tar.gz

What it holds, where to keep it and how to do it in Docker: Backup and restore.

restore#

Puts a backup back into the data directory. The server must be stopped.

skirl restore --force /var/backups/skirl-2026-12-01.tar.gz

Without --force it only restores into an empty data directory. The whole of it: Restoring.

People#

These do what Admin → People does: People and roles.

user add#

Adds a person. It asks for the password twice (8 characters at least); --admin makes them an admin.

skirl user add --admin ann
user ann added (admin)

In a script, give the password on the input instead, with --password-stdin:

printf '%s\n' "$NEW_PASSWORD" | skirl user add --password-stdin ben

User names are lower case: Ann becomes ann.

Whether the new person may create topics follows New people may create topics in Admin → Settings, as Add person in the app does (New people may create topics). --can-create-topics=true or --can-create-topics=false decides instead, whatever the setting says:

printf '%s\n' "$NEW_PASSWORD" | skirl user add --password-stdin --can-create-topics=false ben

user list#

Lists everyone, with their role, whether they may create topics, whether they are disabled, and when they were added.

skirl user list
USERNAME  ROLE    DISPLAY NAME  CREATES TOPICS  STATUS  CREATED
ann       admin   -             yes             active  2026-12-01 09:00Z
ben       member  -             yes             active  2026-12-01 09:05Z

user passwd#

Sets a new password, and signs that person out everywhere. This is the way back in for an admin who forgot their password.

skirl user passwd ann
password of ann changed; their browser sessions were ended

--password-stdin works here as for user add.

user disable and user enable#

Disabling someone signs them out everywhere and stops their tokens. Enabling them lets them sign in again, and their tokens work again.

skirl user disable ben
user ben disabled; their sessions were ended and their tokens stop working
skirl user enable ben

The last active admin cannot be disabled or deleted: the command says "ann is the last active admin".

user delete#

Deletes a person, with their sessions, their tokens, their devices and their access to topics. The messages they sent and their files stay: Deleting a person.

skirl user delete ben
user ben deleted with their sessions, tokens, devices and topic access; their messages and files stay

The command runs apart from the server. A running server stops their sign-ins, tokens and notifications at once, and ends their open streams (the app's live updates, ntfy apps and scripts subscribed as them) at its next check of each stream, within 45 seconds. Deleting them in Admin → People ends those streams at once.

Tokens#

These do what Settings → Access tokens and Admin → Tokens do: Tokens and access.

token create#

Makes a token for a person. It needs a name (--name), and --read, --publish or both; --topic limits it to one topic (which must exist), and --expires ends it after a while (12h, 30d; without it, never).

skirl token create ann --name backups-cron --topic backups --publish

It prints the token and nothing else, once: copy it into the tool then, or catch it in a script.

token list#

Lists the tokens, everyone's or one person's, with their number (ID), the last characters of the secret, what they may do, and when they were last used.

skirl token list ann
ID  USER  NAME          TOKEN            TOPIC    RIGHTS   EXPIRES  LAST USED          STATUS
1   ann   backups-cron  tk_••••••••3f9a  backups  publish  never    2026-12-01 09:10Z  active

token revoke#

Ends a token for good, by its ID from token list.

skirl token revoke 1
token 1 revoked

Topics#

These do what a topic's Settings and Access tabs do: Topics. A topic is made by sending to it, or in the app; these commands change one that exists.

topic list#

skirl topic list
TOPIC    VISIBILITY  RETENTION  CREATED BY  CREATED
backups  private     30d        ann         2026-12-01 09:10Z

topic set#

Changes who may use a topic without signing in, and how many days its messages are kept (1 to 3650).

skirl topic set backups --visibility public_read --retention-days 7
topic backups: visibility public_read, retention 7 days

A number of days outside 1 to 3650, 0 included, is refused and changes nothing: "invalid retention: want 1 to 3650 days".

The four visibilities are the app's four choices: private (Private), public_read (Anyone can read), public_write (Anyone can send) and public (Public): Who can see a topic.

topic grant#

Lets one person read a topic (--read), send to it (--publish), or both. Given again, it replaces what they had.

skirl topic grant backups ben --read --publish
ben may now read and publish on backups

topic revoke#

Takes that access away again.

skirl topic revoke backups ben
ben no longer has access to backups

Templates#

These do what Admin → Templates does, so templates can live in files and in a repository: Templates.

template list#

Lists the built-in templates and your own, and which of yours replace a built-in one.

skirl template list

template show#

Prints a template as a file you can edit and set again: yours, or the built-in one of that name.

skirl template show grafana

template set#

Saves a template from a file. The name is lower-case letters, digits, _ and -. A template named like a built-in one replaces it. auto and forgejo are refused: they are other names for generic and gitea.

skirl template set backup-report --file backup-report.yml
template backup-report created

A small backup-report.yml:

title: 'Backup {{ .status }}'
message: '{{ .host }} finished in {{ .seconds }} s'

Instead of --file, --title, --message and --priority each take a file holding just that part.

template delete#

Deletes one of your templates. If it replaced a built-in one, the built-in one is back.

skirl template delete backup-report
template backup-report deleted

Help for each command#

Asking the program#

The list of commands:

skirl help

Every people, token, topic and template command with its arguments (user, token, topic and template all print the same list):

skirl user help

One command, with what it does and its flags: add -h (or --help) to any command or subcommand. It prints the help and does nothing else:

skirl user add -h
skirl serve -h

Every flag#

Each command's flags, with their variable where there is one and what they are when not given. This list is made from the program itself, so it is always complete. The flags of serve are on Configuration variables.

skirl backup FILE#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory
--with-attachments – false also the attachments: FILE is then one archive (tar.gz)

skirl restore FILE#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory
--force – false replace the database in a data directory that has one

skirl health#

Flag Environment Default
--listen SKIRL_LISTEN :8080 the address serve listens on
--timeout – 5s how long to wait for the answer

skirl template delete#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl template list#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl template set#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory
--file – none a template file (YAML)
--message – none a file holding the message template
--priority – none a file holding the priority template
--title – none a file holding the title template

skirl template show#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl token create#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory
--expires – none lifetime, e.g. 12h or 30d (default: never)
--name – none label
--publish – false allow publishing
--read – false allow subscribing
--topic – none limit the token to this topic

skirl token list#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl token revoke#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl topic grant#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory
--publish – false allow publishing
--read – false allow subscribing

skirl topic list#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl topic revoke#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl topic set#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory
--retention-days – none days to keep messages, 1 to 3650
--visibility – none private, public_read, public_write or public

skirl user add#

Flag Environment Default
--admin – false make the user an admin
--can-create-topics – none true or false: whether they may create topics (default: as "New people may create topics" in Admin → Settings says)
--data-dir SKIRL_DATA_DIR ./data data directory
--password-stdin – false read the password from stdin

skirl user delete#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl user disable#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl user enable#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl user list#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory

skirl user passwd#

Flag Environment Default
--data-dir SKIRL_DATA_DIR ./data data directory
--password-stdin – false read the password from stdin

This page on GitHub