Skip to content

Command line

Cahut is a home to publish and share what your AIs make. The cahut binary serves the Cahuts of a server, and administers them from its command line.

cahut <command> [arguments]

Run cahut help for the list of commands, and add -h to a command for its flags. A flag takes one dash or two: -data and --data are the same. On a server, run the commands as the service user, with the full path of the binary: see Administration.

Command What it does
cahut serve Serve the Cahuts of this server: MCP for AIs, and the Windows
cahut setup Give the link to the first start of a Cahut, in the browser
cahut domain add Declare a domain, which creates its Cahut
cahut domain list List the Cahuts of this server
cahut domain rename Move a Cahut to another domain, or from the IP address of the server to a domain
cahut settings show Print the kind and limits of a Cahut, with what it holds
cahut settings set Change the kind or limits of a Cahut; what you leave out stays as it is
cahut settings links Link the legal pages of a Cahut, or print its links; what you leave out stays as it is
cahut mail show Print the e-mail relay of a Cahut
cahut mail set Set the e-mail relay of a Cahut, once it answers
cahut mail remove Remove the e-mail relay of a Cahut, which then sends no e-mail
cahut mail test Send a test message through the relay of a Cahut
cahut admin create Create an administrator of the server, with an activation link
cahut admin list List the administrators of the server
cahut admin rename Change the name of an administrator of the server
cahut admin link Give an administrator of the server a new link where they choose their password
cahut admin disable Disable an administrator of the server: their sessions end, and they cannot sign in
cahut admin enable Enable a disabled administrator of the server again
cahut user create Create a person, with their personal Room and an activation link
cahut user list List the people of a Cahut
cahut user link Give a person a new link where they choose their password
cahut user email Give a person an e-mail address, where their links go, or remove it
cahut token create Create a personal token for an AI
cahut token list List personal tokens
cahut token revoke Revoke a personal token
cahut service-token create Create a service token for a program on this server
cahut service-token list List service tokens
cahut service-token revoke Revoke a service token
cahut logbook Print the latest entries of the Logbook
cahut update Install a new release, as root, and go back if it fails
cahut doctor Diagnose this server, and say what to fix
cahut version Print the version of this binary

Serve the Cahuts of this server: MCP for AIs, and the Windows.

cahut serve [flags]
Flag Default Description
--acme-ca string ACME directory, or “staging” for Let’s Encrypt’s staging environment (env CAHUT_ACME_CA)
--admin-api string address of the machine itself, such as 127.0.0.1:8090, where programs with a service token call the admin API; off when empty (env CAHUT_ADMIN_API)
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--dev serve plain HTTP on --dev-addr, for Cahuts at localhost and *.localhost
--dev-addr string localhost:8080 address for --dev
--email string contact of the Let’s Encrypt account, optional (env CAHUT_ACME_EMAIL)
--http string :80 address for HTTP, which answers ACME challenges and redirects
--http-proxy-protocol string IP addresses or prefixes of the proxies whose PROXY protocol header the HTTP listener reads, and requires; off when empty (env CAHUT_HTTP_PROXY_PROTOCOL)
--https string :443 address for HTTPS
--https-proxy-protocol string IP addresses or prefixes of the proxies, such as 127.0.0.1, whose PROXY protocol header the HTTPS listener reads, and requires; off when empty (env CAHUT_HTTPS_PROXY_PROTOCOL)
--update-state string /var/lib/cahut-update directory where the updater leaves the state of updates (env CAHUT_UPDATE_STATE)

Give the link to the first start of a Cahut, in the browser.

cahut setup [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut

Manage the Cahuts of this server, one per domain.

Declare a domain, which creates its Cahut.

cahut domain add [--data DIR] [--admin-handle HANDLE --admin-name NAME] <domain>
Flag Default Description
--admin-handle string handle of the first administrator of the Cahut, a person of it, who gets an activation link
--admin-name string full name of the first administrator
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)

List the Cahuts of this server.

cahut domain list [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)

Move a Cahut to another domain, or from the IP address of the server to a domain.

cahut domain rename [--data DIR] <domain> <new domain>
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)

Set the kind, limits and legal pages of a Cahut.

Print the kind and limits of a Cahut, with what it holds.

cahut settings show [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut

Change the kind or limits of a Cahut; what you leave out stays as it is.

cahut settings set [--data DIR] [--domain DOMAIN] [--kind KIND] [--people N] [--admins N] [--rooms N] [--windows N] [--windows-per-room N] [--disk SIZE] [--rooms-per-person N] [--windows-per-person N] [--disk-per-person SIZE]
Flag Default Description
--admins N N of them may be administrators of the Cahut; none lifts the limit
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--disk SIZE the Cahut may keep SIZE, such as 10GB or 500MB, in units of 1000 bytes; none lifts the limit
--disk-per-person SIZE in an individual Cahut, the Windows of each person may keep SIZE; none lifts the limit
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--kind string collaborative or individual; the kind stays when left out
--people N the Cahut may have N people, administrators included, and disabled people do not count; none lifts the limit
--rooms N the Cahut may have N team Rooms; none lifts the limit
--rooms-per-person N in an individual Cahut, each person may have N Rooms beside their personal Room; none lifts the limit
--windows N the Cahut may hold N Windows out of the trash; none lifts the limit
--windows-per-person N in an individual Cahut, each person may hold N Windows out of the trash; none lifts the limit
--windows-per-room N each Room may hold N Windows out of the trash; none lifts the limit

Link the legal pages of a Cahut, or print its links; what you leave out stays as it is.

cahut settings links [--data DIR] [--domain DOMAIN] [--legal-notice URL] [--terms URL] [--privacy URL] [--support URL] [--legal-notice-fr URL] [--terms-fr URL] [--privacy-fr URL] [--support-fr URL]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--legal-notice URL the URL of the legal notice, which starts with https://; none removes the link, and its address in French
--legal-notice-fr URL the URL of the legal notice in French, where it differs, which the console links when it speaks French; none removes it
--privacy URL the URL of the privacy policy, which starts with https://; none removes the link, and its address in French
--privacy-fr URL the URL of the privacy policy in French, where it differs, which the console links when it speaks French; none removes it
--support URL the URL of the page where people get help, which starts with https://; none removes the link, and its address in French
--support-fr URL the URL of the page where people get help in French, where it differs, which the console links when it speaks French; none removes it
--terms URL the URL of the terms of use, which starts with https://; none removes the link, and its address in French
--terms-fr URL the URL of the terms of use in French, where it differs, which the console links when it speaks French; none removes it

Set the e-mail relay of a Cahut, and test it.

Print the e-mail relay of a Cahut.

cahut mail show [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut

Set the e-mail relay of a Cahut, once it answers.

cahut mail set [--data DIR] [--domain DOMAIN] --host HOST [--port PORT] [--security tls|starttls] [--user USER --password-stdin] --from ADDRESS [--name NAME]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--from string the address that messages come from, one that the relay accepts
--host string the name or the address of the SMTP relay, such as smtp.example.com
--name string the name that messages come from; the name of the Cahut when left out
--password-stdin read the password at the relay on the standard input; without it, the password kept stays when the host and the user name do not change
--port int its port: 465 for TLS from the start, 587 for STARTTLS; 465 with tls and 587 otherwise when left out
--security string tls or starttls; tls on port 465 and starttls otherwise when left out
--user string the user name at the relay; leave it out when the relay takes no authentication

Remove the e-mail relay of a Cahut, which then sends no e-mail.

cahut mail remove [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut

Send a test message through the relay of a Cahut.

cahut mail test [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--to string the address to send the test to

Manage the administrators of the server.

Create an administrator of the server, with an activation link.

cahut admin create [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut whose console the link opens; the first one declared when empty
--handle string short name of the administrator: 2 to 32 lowercase letters, digits and hyphens
--name string full name

List the administrators of the server.

cahut admin list [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)

Change the name of an administrator of the server.

cahut admin rename [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--handle string the administrator of the server, whose handle stays
--name string their new full name

Give an administrator of the server a new link where they choose their password.

cahut admin link [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut whose console the link opens; the first one declared when empty
--handle string the administrator who chooses a new password

Disable an administrator of the server: their sessions end, and they cannot sign in.

cahut admin disable [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--handle string the administrator of the server

Enable a disabled administrator of the server again.

cahut admin enable [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--handle string the administrator of the server

Manage the people of a Cahut.

Create a person, with their personal Room and an activation link.

cahut user create [flags]
Flag Default Description
--admin make the person an administrator of the Cahut
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--email string e-mail address of the person, where their link goes when the Cahut sends e-mail
--handle string short name, which also names the personal Room: 2 to 32 lowercase letters, digits and hyphens
--name string full name

List the people of a Cahut.

cahut user list [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut

Give a person a new link where they choose their password.

cahut user link [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--handle string the person who chooses a new password

Give a person an e-mail address, where their links go, or remove it.

cahut user email [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--email string their e-mail address; empty removes it
--handle string the person

Manage the personal tokens of AIs.

Create a personal token for an AI.

cahut token create [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--name string what the token is for, such as “Claude Code on my laptop”
--user string handle of the person the AI acts for

List personal tokens.

cahut token list [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--user string only the tokens of this person

Revoke a personal token.

cahut token revoke [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--id int the token to revoke, as token list shows it

Manage the service tokens of the admin API.

Create a service token for a program on this server.

cahut service-token create [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--name string what uses the token, such as “account” for the site where people sign up

List service tokens.

cahut service-token list [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut

Revoke a service token.

cahut service-token revoke [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--id int the token to revoke, as service-token list shows it

Print the latest entries of the Logbook.

cahut logbook [flags]
Flag Default Description
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--domain string the Cahut to act in, by its domain; optional when the server holds a single Cahut
--limit int 20 how many entries
--server print the Logbook of the server, not of a Cahut

Install a new release, as root, and go back if it fails.

sudo cahut update [--check] [--version VERSION] [--binary FILE]
Flag Default Description
--bin string /usr/local/bin/cahut the binary that the service runs
--binary string install this cahut binary instead of a release, with the same check and rollback, without signature
--check read the releases and say whether a newer one is out, without installing it
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--state string /var/lib/cahut-update directory of the state of updates
--unattended run as systemd does: what the console asked for, or else what CAHUT_UPDATES says
--version string install this release, such as 0.4.1, instead of the newest; never an older one

Diagnose this server, and say what to fix.

sudo cahut doctor [--data DIR]
Flag Default Description
--bin string /usr/local/bin/cahut the binary that the service runs
--data string /var/lib/cahut directory of the server’s data, which holds its Cahuts (env CAHUT_DATA)
--state string /var/lib/cahut-update directory of the state of updates

Print the version of this binary.

cahut version

This command takes no flags.