Skip to content

Command line ​

Everything ProjectWikit does outside the browser is a subcommand of the pwikit executable:

sh
pwikit <command> [options]

Options start with one dash (-name value or -name=value); two dashes work too. Boolean options are switched on by naming them (-force). Add -h to any command to list its options, and run a command group such as pwikit backup on its own to see its subcommands.

The examples write pwikit on its own, which works once pwikit is installed. Until then, write ./pwikit from pwikit's directory (.\pwikit.exe on Windows).

CommandPurpose
serveRun the web server
createsiteCreate a site
site listList the sites and their domains
site rebindMove a site to another domain
admin createCreate the first administrator, or take over an imported account
admin grantGive an existing account every right
admin revokeTake every right back from an account
user mergeJoin two accounts into one
seedWrite the starter pages
importImport a Wikidot site from a wikitCLI backup
reindexPut every page of a site back into the search index
backup createBack up the instance or one site
backup listList the backups in backups/
backup verifyCheck a backup file
backup restoreRestore a backup
serviceInstall, start, stop and remove the system service
pathMake pwikit runnable by name from any directory
updateInstall a new release, roll back, or manage automatic updates
migrate statusShow which schema migrations the database has
migrate upApply missing schema migrations
renderRender wikitext in the terminal
modulesList the [[module]] names pwikit knows
versionShow which release this is
helpPrint the command list

Common options ​

Data directory ​

All state lives in the data directory: pwikit.toml, files/, secrets/, pgdata/, backups/, logs/ and so on. pwikit picks it in this order:

  1. -data-dir <dir>
  2. the PWIKIT_DATA_DIR environment variable
  3. the directory that holds the pwikit executable

Commands that accept -data-dir must be given the same directory as the running server, or they work on a different instance. See Deployment for the layout.

How commands find the database ​

serve, createsite, site, admin, user, seed, import, migrate, backup create and backup restore connect to the database in this order:

  1. -database <connection string>
  2. the DATABASE_URL environment variable
  3. database in pwikit.toml
  4. otherwise, the bundled PostgreSQL in the data directory

With the bundled PostgreSQL:

  • If pwikit serve is running from the same data directory, the command uses the PostgreSQL that serve started.
  • If nothing is running, the command starts the bundled PostgreSQL, uses it, and stops it when the command finishes.
  • If another pwikit command is using it, the command stops with another pwikit command, process <pid>, is already running the bundled PostgreSQL in this directory. Wait for that command to finish. pwikit serve refuses to start for the same reason.
  • Run commands from the account that owns the data directory; when pwikit runs as a system service, that is the account the service runs as. On Linux, root works too, and the bundled PostgreSQL then runs under its own account (see Running as root). On macOS the bundled PostgreSQL does not run as root.

A connection string looks like postgres://user:password@host:5432/dbname. backup list, backup verify, service, render and modules do not use this lookup.

serve ​

sh
pwikit serve [options]

Runs the web server. On start, serve:

  1. creates the data directory and writes a commented-out pwikit.toml template if there is none;
  2. creates secrets/session-key if no session key is configured;
  3. starts the bundled PostgreSQL, unless a database is configured;
  4. refuses a PostgreSQL older than 14;
  5. applies pending schema migrations, unless -no-migrate is given;
  6. starts listening.

Stop it with Ctrl+C, or through the system service. It also stops the bundled PostgreSQL.

If something is already listening on port 5432 and no database is configured, serve prints a hint that a PostgreSQL of your own is running and how to use it with -database. It never connects to it by itself; the bundled PostgreSQL uses its own port.

Each setting is taken from the command line first, then the environment variable, then pwikit.toml, then the default. See Configuration.

OptionDefaultEnvironment variablepwikit.tomlMeaning
-data-direxecutable's directoryPWIKIT_DATA_DIRData directory
-databasebundled PostgreSQLDATABASE_URLdatabasePostgreSQL connection string
-listen127.0.0.1:8080, or :80 when HTTPS is onserver.listenAddress for plain HTTP. When HTTPS is on, this port redirects to HTTPS
-tlsoff, or auto when a site has a public domain (see below)PWIKIT_TLStls.modeoff: plain HTTP, for use behind a reverse proxy. file: HTTPS with a certificate you supply. auto: HTTPS with certificates obtained over ACME
-tls-listen:443PWIKIT_TLS_LISTENtls.listenAddress for HTTPS
-tls-certPWIKIT_TLS_CERTtls.certCertificate chain in PEM form, for -tls=file
-tls-keyPWIKIT_TLS_KEYtls.keyPrivate key in PEM form, for -tls=file
-acme-emailPWIKIT_ACME_EMAILtls.acme_emailContact address registered with the certificate authority
-acme-directoryLet's EncryptPWIKIT_ACME_DIRECTORYtls.acme_directoryACME directory URL
-trusted-proxiesnoneserver.trusted_proxiesReverse proxy addresses or CIDR ranges, comma separated, whose X-Forwarded-* headers are believed
-upload-limit0 (no limit)MEDIA_UPLOAD_LIMITserver.upload_limitTotal size the files attached to pages may reach, such as 4GB
-storage-limit0 (no limit)ABSOLUTE_MEDIA_UPLOAD_LIMITserver.storage_limitTotal size of all uploaded files on disk, deleted files included
-secret-keycontents of secrets/session-keySECRET_KEYKey that signs sign-in cookies and the links sent by mail
-no-migrateoffStart without applying pending schema migrations
-log-filestandard errorFile to append log lines to. It is rotated at 10 MB and five old files are kept
-static-dirbuilt-in assetsDirectory to serve the web interface's asset files from instead of the built-in copy, under /-/static/. Needed only when changing the web interface
-sidecarPWIKIT_FTML_SIDECARDeveloper option: path to a separate renderer program. Leave empty
-devoffDevelopment mode, see below
-update-autotruePWIKIT_UPDATE_AUTOupdate.autoInstall new releases by themselves when running as a system service
-update-public-bannertruePWIKIT_UPDATE_PUBLIC_BANNERupdate.public_bannerShow the automatic update banner to every visitor
-update-checktruePWIKIT_UPDATE_CHECKupdate.checkLook for new releases
-update-window03:00-05:00PWIKIT_UPDATE_WINDOWupdate.windowHours in which releases are installed automatically, read in -update-time-zone
-update-time-zoneemptyPWIKIT_UPDATE_TIME_ZONEupdate.time_zoneTime zone the update window is read in, such as Asia/Shanghai; empty uses the server's time zone
-update-min-age0sPWIKIT_UPDATE_MIN_AGEupdate.min_ageHow long a release must have been out before it is installed automatically
-update-mirrorPWIKIT_UPDATE_MIRRORupdate.mirrorMirror to use when GitHub cannot be reached. See Updating and rolling back

Sizes are a number with an optional unit: B, KB, MB, GB or TB (1 KB = 1024 bytes).

Automatic HTTPS. When none of -tls, -listen and -trusted-proxies is set (on the command line, in the environment or in pwikit.toml), serve looks at the sites in the database. If any site is bound to a public domain name, it switches to -tls=auto and listens on :80 and :443. Otherwise it serves plain HTTP on 127.0.0.1:8080. Switching from HTTP to HTTPS takes a restart; an instance already serving HTTPS picks up a newly bound domain without one. See Deployment.

Development mode ​

pwikit serve -dev serves plain HTTP that only this machine can reach, whatever the sites and settings say. Use it to look at a copy of a live site locally.

  • It listens on 127.0.0.1:8080. -listen 9000 or -listen :9000 picks another port on the same address; -listen localhost:9000 and other loopback addresses are accepted.
  • An address other machines can reach, such as -listen 0.0.0.0:9000, is refused with an error.
  • -tls=auto or -tls=file together with -dev is refused with an error.
  • The TLS, listen address and trusted proxy settings from the environment and pwikit.toml are ignored. The database, session key and upload limits are read as usual.

Examples ​

sh
# Bundled PostgreSQL, automatic HTTPS once a site has a public domain
pwikit serve

# Local copy of a site on http://127.0.0.1:9000
pwikit serve -dev -listen 9000

# Behind a reverse proxy on the same machine
pwikit serve -tls=off -listen 127.0.0.1:8080 -trusted-proxies 127.0.0.1

# Your own certificate
pwikit serve -tls=file -tls-cert /etc/pwikit/fullchain.pem -tls-key /etc/pwikit/privkey.pem

# Your own PostgreSQL
pwikit serve -database "postgres://pwikit:secret@db.internal:5432/pwikit"

createsite ​

sh
pwikit createsite -slug <slug> -domain <domain> -title <title> -headline <subtitle> [options]

Creates a site. -slug, -domain, -title and -headline are required. The command first creates files/, archive/ and secrets/ in the data directory and writes the pwikit.toml template when there is none, as serve does, so a new instance shows its whole layout once this command has run. Before creating the site, the command applies the migrations the database is missing, as migrate up does, and prints applied <name> or adopted <name> for each, so it also works on a new, empty database.

OptionDefaultMeaning
-slugSite identifier: letters, digits, - and _
-domainDomain the pages are served on, without scheme or path. A port is allowed, such as localhost:8080
-media-domainvalue of -domainDomain uploaded files are served on
-titleSite title
-headlineSite subtitle
-databasesee How commands find the databasePostgreSQL connection string
-data-direxecutable's directoryData directory

The command prints created site <slug> (<id>) on <domain>. When the domain is a public domain name, it adds that https://<domain> answers once pwikit serve starts, or restarts if it is already running.

sh
pwikit createsite -slug main -domain wiki.example.org -media-domain files.example.org \
  -title "Example Wiki" -headline "A wiki about examples"

site list ​

sh
pwikit site list [-database <url>] [-data-dir <dir>]

Prints the identifier, domain and media domain of every site.

text
SLUG  DOMAIN            MEDIA DOMAIN
main  wiki.example.org  files.example.org

site rebind ​

sh
pwikit site rebind -slug <slug> -domain <domain> [-media-domain <domain>] [options]

Points a site at another domain. Use it when the stored domain can no longer be reached, for example after the domain changed and nobody can open the admin panel. The change applies to the running server at once; moving a site from HTTP to a public domain with HTTPS needs a restart.

OptionDefaultMeaning
-slugSite to change
-domainNew domain for the pages
-media-domainvalue of -domainNew domain for uploaded files. Pass it again if the site uses a separate media domain
-databasesee How commands find the databasePostgreSQL connection string
-data-direxecutable's directoryData directory
sh
pwikit site rebind -slug main -domain wiki.example.net -media-domain files.example.net
text
main: wiki.example.org -> wiki.example.net
main: files.example.org -> files.example.net (media)
https://wiki.example.net answers once pwikit serve starts, or restarts if it is already running

admin ​

sh
pwikit admin <create|grant|revoke> -name <name> [options]

An account with every right is a superuser: it has every permission regardless of roles and can open the admin panel.

OptionDefaultMeaning
-nameAccount name. Spaces and non-Latin scripts are allowed
-password-stdinoffcreate only: read the password from standard input instead of prompting
-yesoffcreate only: create a new account without asking
-databasesee How commands find the databasePostgreSQL connection string
-data-direxecutable's directoryData directory

Account names ​

-name is the name as people see it. Runs of spaces are collapsed, and the name must:

  • be at most 50 characters long;
  • contain at least one letter or digit;
  • not start with a combining mark or contain invisible characters;
  • not have the form wkt-uid-<number>, which is reserved.

The account's username is derived from it: lowercase, with every run of characters that are not letters or digits replaced by one -. -name "Site Admin" gives the username site-admin. The commands print the username and account number, such as site-admin (#1).

admin create ​

Makes an account a superuser and sets its password.

  • Imported account. If an account with that username or Wikidot username exists and has no password yet, create takes it over: it sets the password, activates the account and makes it a superuser. The pages and posts it brought in stay with it. The command prints took over <username> (#<id>), imported as "<Wikidot name>". Import the Wikidot site first, see Importing from Wikidot.
  • Existing account with a password. The command stops and tells you to run pwikit admin grant instead.
  • No such account. The command explains that a new, empty account will be created and asks Create a new account? [y/N]. Anything but y cancels. -yes skips the question.

The password is prompted for without echo. With -password-stdin, or when standard input is not a terminal, the first line of standard input is used. When the confirmation question is asked, it is also read from standard input, so scripts that create a new account should pass -yes.

The password must be at least 8 characters, not entirely digits, not a commonly used password and not too similar to the account name.

sh
pwikit admin create -name "Site Admin"
sh
printf '%s\n' "$ADMIN_PASSWORD" | pwikit admin create -name "Site Admin" -yes -password-stdin

admin grant ​

sh
pwikit admin grant -name <name>

Makes an existing account a superuser. The account can be found by username or Wikidot username. If it already is one, nothing changes.

admin revoke ​

sh
pwikit admin revoke -name <name>

Removes superuser rights from an account; the account itself stays. When it was the last superuser, the command warns that nobody can reach the admin panel until pwikit admin grant runs.

user merge ​

sh
pwikit user merge -from <account> -into <account> [options]

Moves everything one account holds, on every site of the instance, onto another account, and then deletes the first. Use it to join two accounts of the same person, such as an account registered before a Wikidot site was imported and the wd: account the import created alongside it.

OptionDefaultDescription
-fromAccount to merge away
-intoAccount that keeps everything
-yesoffMerge without asking
-databasesee How commands find the databasePostgreSQL connection string
-data-dirdirectory holding the executableData directory

Both options name an account in one of three ways:

  • name: by user name. The name is turned into a user name by the rules in Account names.
  • wd:name: by the account's name on Wikidot, whether or not it has been claimed.
  • #number: by account number.

When merging:

  • Every record that points at -from is pointed at -into: page authorship, revisions, ratings, favourites, forum threads and posts, likes, roles, sanctions, private messages, notifications and watches, user reports and support tickets.
  • Where both accounts have a record for the same thing, the one of -into is kept. For example, if both rated the same page, the rating of -into stays; if both hold the same role, it is kept once.
  • If -into has no Wikidot name and number, it takes those of -from, so sites imported later go straight to -into. It also takes the display name, avatar and bio when its own are empty. The user name, email, password and superuser rights of -into are always kept.
  • -from is deleted, and sessions still signed in as it become signed out.

The command refuses when both options name the same account; when -into is an unclaimed Wikidot account, which cannot sign in, so merge the other way round; and when the two accounts come from two different Wikidot accounts.

Without -yes, the command explains what will happen and asks Merge? [y/N]; any answer other than y cancels. A merge cannot be undone, so run pwikit backup create first. When it finishes, the command prints, for each kind of record, how many were moved and how many were dropped as duplicates, and then merged <from> into <into>.

sh
pwikit user merge -from wd:Kakushi -into kakushi

seed ​

sh
pwikit seed [-site <slug>] [options]

Writes the starter pages of a new site: main, nav:top, nav:top-impl, nav:side, search:site, forum:start, forum:category, forum:thread, forum:new-thread and forum:recent-posts. Pages that already exist are left alone, so running it again is safe. It prints each page it writes and then <n> of 10 pages written, the rest were already there.

OptionDefaultMeaning
-sitethe only siteSite to write into. Required when the database holds more than one
-databasesee How commands find the databasePostgreSQL connection string
-data-direxecutable's directoryData directory
sh
pwikit seed

import ​

sh
pwikit import [directory] [options]

Imports a Wikidot site from an unpacked wikitCLI backup. The directory is a site directory, or the directory holding several of them next to _users/. Naming a site directory also reads the _users/ next to it. Without a directory, archive/ in the data directory is read. Options may come before or after the directory. See Importing from Wikidot.

OptionDefaultMeaning
-sitethe only siteSite to write into. Required when the database holds more than one
-fromthe only site in the backupSite inside the backup. Required when it holds more than one
-no-tagsoffLeave the tags out
-no-votesoffLeave the ratings out
-no-filesoffLeave the attachments out
-no-accountsoffCreate no accounts, even when the backup holds some, leaving everything without an author
-own-usersoffRead accounts only from the _users/ inside the site directory, not the shared _users/ next to it
-used-usersoffCreate accounts only for the users named by the imported revisions, ratings, attachments and forum
-user-backfilloffOn pages that already exist, fill in the missing authors and ratings from the backup; see Importing from Wikidot
-updateoffBring pages that already exist up to a newer backup and add the missing ratings, attachments and forum posts, after confirmation; see Importing from Wikidot
-yesoffWith -update, go ahead without asking
-databasesee How commands find the databasePostgreSQL connection string
-data-direxecutable's directoryData directory; the backup is read from its archive/ when no directory is given, and attachments are copied into its files/
sh
pwikit import
pwikit import /srv/wikidot-backup -from my-wiki

reindex ​

sh
pwikit reindex [-site <slug>] [options]
pwikit reindex -all [options]

Reads every page of a site, including hidden ones, and writes it into the search index again. Use it after a page turns out to be missing from search results, or after importing pages. Pages with no source are skipped. For each site it prints <slug>: <n> pages indexed.

OptionDefaultMeaning
-sitethe only siteSite to go through. Required when the database holds more than one
-alloffGo through every site in the database. Cannot be combined with -site
-databasesee How commands find the databasePostgreSQL connection string
-data-direxecutable's directoryData directory
-sidecarvalue of PWIKIT_FTML_SIDECARDeveloper option: path to a separate renderer program
sh
pwikit reindex
pwikit reindex -all

backup ​

sh
pwikit backup <create|list|verify|restore> [options] [file]

A backup is one .pwbak file holding the database and, unless left out, the uploaded files. The backup file name may come before or after the options. See Operations for what a backup contains and how to use it.

OptionUsed byDefaultMeaning
-outputcreatebackups/pwikit-<UTC time>.pwbakFile to write
-no-filescreate, restoreoffcreate: leave the uploaded files out. restore: leave files/ unchanged
-sitecreatewhole instanceExport one site on its own
-keep-passwordscreateoffKeep account passwords in a single-site export
-dirlistbackups/Directory to list
-forcerestoreoffReplace a database that already holds sites, accounts or pages
-no-safety-backuprestoreoffSkip the backup of the current state that restore takes first
-databasecreate, restoresee How commands find the databasePostgreSQL connection string
-data-dirallexecutable's directoryData directory

backup create ​

sh
pwikit backup create [-output <file>] [-no-files] [-site <slug> [-keep-passwords]]

Writes a backup. It can run while pwikit serve is running. Progress goes to standard error; at the end the command prints the file path and a summary such as 63 tables, 12840 rows, 312 files, 85.2 MB. Without -output, the file goes to backups/ as pwikit-20260911-030000.pwbak, or pwikit-<slug>-20260911-030000.pwbak for a single-site export (time in UTC).

sh
pwikit backup create
pwikit backup create -output /mnt/backup/wiki.pwbak
pwikit backup create -site main

backup list ​

sh
pwikit backup list [-dir <dir>]

Lists the .pwbak files in backups/, newest first. It needs no database.

text
FILE                           MADE              PWIKIT        POSTGRES  ROWS   FILES  SIZE
pwikit-20260911-030000.pwbak   2026-09-11 03:00  0a1b2c3d4e5f  18.6      12840  312    85.2 MB

MADE is in UTC. FILES is no for a backup made with -no-files. A file that cannot be read shows UNREADABLE, and the reason is printed after the table.

backup verify ​

sh
pwikit backup verify <file>

Reads the whole backup and checks it against its manifest. It needs no database. It prints when and by which pwikit the backup was made, the PostgreSQL version, what it holds, any notes and any problems, then sound if there are none. The command exits with an error when the backup is not sound.

text
backups/pwikit-20260911-030000.pwbak
  made      2026-09-11T03:00:00Z by pwikit 0a1b2c3d4e5f
  postgres  18.6
  holds     63 tables, 12840 rows, 312 files
  sound

backup restore ​

sh
pwikit backup restore <file> [-force] [-no-safety-backup] [-no-files] [-database <url>]

Replaces the database, and the uploaded files if the backup holds them and -no-files is not given, with the contents of the backup. Stop pwikit serve first. Before changing anything, the command backs up the current state to backups/before-restore-pwikit-<UTC time>.pwbak, unless -no-safety-backup is given or the database holds no data yet. See Restoring a backup.

sh
pwikit backup restore backups/pwikit-20260911-030000.pwbak -force

service ​

sh
pwikit service <install|uninstall|start|stop|status|print> [options] [-- serve options]

Registers pwikit with the operating system so that pwikit serve starts at boot: a systemd unit on Linux, a launchd job on macOS, a Windows service on Windows. See Deployment for installing and Operations for day-to-day use.

SubcommandMeaning
installRegister the service, start it now and at every boot
uninstallStop the service and remove it
startStart the installed service
stopStop the installed service
statusShow whether the service is running
printShow what install would register, without registering it
OptionDefaultMeaning
-namepwikitName the service is registered under: letters, digits, ., - and _
-userthe account sudo was run frominstall and print on Linux and macOS: account the service runs as. On Linux, installed by root without it, the service runs as root; on macOS it cannot be root
-data-direxecutable's directoryinstall and print: data directory the service uses
-no-pathoffinstall and uninstall: leave the pwikit command alone

Everything after -- is passed to pwikit serve and checked at install time. install also lets pwikit through the firewall: on Windows with an inbound rule for the program; on macOS, for a service installed with sudo, through the application firewall when it is on; on Linux by opening the needed ports in firewalld or ufw when one of them is running. uninstall removes what install added and closes only the ports it opened.

Platforminstall / uninstall / start / stopstatus
Linuxsudoany account
macOSsudo for a service that starts at boot; without sudo, a service that starts when you log in. Use the same choice for every later commandsame as install
Windowsa terminal opened with Run as administratorany account

install also runs pwikit path install by default, so that pwikit can be typed from any directory, and uninstall undoes it. When that step fails, a warning is printed and the service is installed anyway.

install also registers the task that looks for and installs new releases, and uninstall removes it. See Updating and rolling back.

install refuses to run from go run; build pwikit and install the built executable.

sh
sudo ./pwikit service install
sudo ./pwikit service install -- -tls=auto -acme-email admin@example.org
./pwikit service print

path ​

sh
pwikit path <install|uninstall|status> [options]

Makes pwikit runnable by name from any directory. Run this command itself as ./pwikit (.\pwikit.exe on Windows). See Deployment for background and for its use when moving an instance.

SubcommandMeaning
installOn Linux and macOS, create a pwikit link that leads to this program; on Windows, add the directory holding it to your own Path
uninstallUndo install, removing only a link that leads to this program or leads nowhere
statusShow where the pwikit command leads, whether it still works, and whether its directory is on PATH
OptionDefaultMeaning
-dir/usr/local/bin, or ~/.local/bin when that cannot be writtenLinux and macOS only: directory the link goes in
-forceoffReplace a link that leads to another pwikit, or a plain file of the same name

An old link that leads to a location that no longer exists is replaced without asking, so running install again from the new location is all a moved instance needs. -dir does not apply on Windows; open a new terminal afterwards.

sh
sudo ./pwikit path install
./pwikit path install -dir ~/bin
pwikit path status

update ​

sh
pwikit update [check|status|rollback|unpin|postpone|skip|mirror] [options] [-- serve options]

Installs a new release, goes back to the previous one, or manages automatic updates. See Updating and rolling back for the full picture.

SubcommandMeaning
noneInstall the newest release
checkLook up the newest release and change nothing
statusShow the last check, the scheduled update, the last update's outcome and the rollback point
rollbackGo back to the release before the last update, with the database when the rollback point holds it
unpinRelease the hold set by -to or rollback
postponeCancel the scheduled update and update nothing automatically for 24 hours
skipCancel the scheduled update and never install that release automatically
mirror [address]Without an address, show the mirror in pwikit.toml. With one, write it into [update] mirror and leave the rest of the file as it is. An empty address clears it
OptionDefaultMeaning
-tothe newest releaseRelease to install. When it is older than the running one, it is held after installing
-servicepwikitName of the installed service
-data-direxecutable's directoryData directory
-mirror[update] mirrorMirror to use when GitHub cannot be reached
-yesoffrollback: do not ask for confirmation

Options after -- are the ones the service was installed with, such as -database, so the command finds the same database and settings.

For an instance running as a system service, installing and rolling back need sudo on Linux and macOS and a terminal opened with Run as administrator on Windows. For an instance that does not run as a service, stop pwikit serve first.

sh
sudo pwikit update
sudo pwikit update -to v1.0.1
pwikit update check
pwikit update status
sudo pwikit update rollback

migrate ​

sh
pwikit migrate <status|up> [-database <url>] [-data-dir <dir>]

migrate status ​

Lists every schema migration and its state. It changes nothing.

text
STATUS   MIGRATION
applied  0001_baseline.sql
applied  0002_admin_log_and_addresses.sql
pending  0003_site_columns.sql
StatusMeaning
appliedThe database has this migration
pendingThe database is missing it; pwikit serve, pwikit createsite or pwikit migrate up applies it
existingThe database was created by an earlier ProjectWikit release and already has this schema; it is recorded as applied without being run
newerA migration a newer pwikit applied. This pwikit does not carry it, but it is declared compatible with older releases, so this pwikit keeps running
newer-breakingA migration a newer pwikit applied and declared incompatible with older releases. This pwikit refuses to start on the database

migrate up ​

Applies the missing migrations and prints applied <name> for each. A migration listed as existing is recorded without being run and printed as adopted <name>. When nothing is missing, the command prints already up to date. pwikit serve does the same on start unless -no-migrate is given.

render ​

sh
pwikit render [options] < page.txt
pwikit render -file page.txt [options]

Renders wikitext from standard input or a file and prints the result. Use it to check how a piece of wikitext renders without opening a browser. Without -dsn no database is used: links are never resolved and includes find nothing. This command reads only -dsn, not DATABASE_URL, pwikit.toml or the bundled PostgreSQL.

OptionDefaultMeaning
-filestandard inputFile to read
-modearticlearticle, message, inline, system or system-with-modules
-outputhtmlhtml; text; backlinks, which prints the pages included and linked; code, which prints the [[code]] and [[html]] blocks
-dsnPostgreSQL connection string
-sitethe only siteSite identifier; required with -dsn when the database holds more than one site
-pagepagePage name the text is rendered as
-category_defaultCategory of that page
-domainexample.orgSite domain
-modulesrealreal renders modules; stub prints each module's name and arguments instead
-traceWrite the renderer's requests to this file, or - for standard error
-data-direxecutable's directoryData directory, for role icons
-sidecarvalue of PWIKIT_FTML_SIDECARDeveloper option: path to a separate renderer program
sh
echo "**bold** [[[main]]]" | pwikit render -output text

modules ​

sh
pwikit modules

Lists every [[module]] name pwikit recognizes.

ColumnMeaning
MODULEModule name
BODYtrue when the module takes content up to [[/module]]
STATUSported: available. pending: recognized but not available in this release. removed: no longer available

See Modules for how to use them.

version ​

sh
pwikit version

Shows which release this executable is, without connecting to the network. Include this output when reporting a problem.

text
pwikit v1.0.0
commit      1a2b3c4d5e6f
committed   2026-09-13T05:58:17Z
platform    linux/amd64
postgresql  18.6.0, bundled
go          go1.26.4
LineMeaning
pwikitThe release. A build made without a release number shows its commit instead
commitThe commit it was built from, followed by -modified when there were uncommitted changes
committedWhen that commit was made, in UTC
platformOperating system and processor architecture
postgresqlThe version of the bundled PostgreSQL, or not bundled for a build without it
goThe Go version it was built with