Zum Hauptinhalt springen

Command reference

Every command, subcommand and flag the semaphore binary accepts, in the order semaphore help walks the tree. Use it to confirm a flag name or a default; the pages next to it explain what the commands are for.

Every command reads the same configuration as the server, so point it at the right configuration file with --config when you run more than one instance on a host. See CLI for the lookup order.

Global flags​

These are accepted by every command.

FlagTypeDefaultDescription
--configstring—Configuration file path
--debug-filterstring—Debug namespace filter (only with DEBUG level), e.g. 'runner,task_' or ',-db'
--log-levelstring—Log level: DEBUG, INFO, WARN, ERROR, FATAL, PANIC
--no-configbool—Don't use configuration file

semaphore client​

Manage a Semaphore UI server from the terminal or from scripts over its REST API. The client needs a server URL and an API token. Give them with flags, with SEMAPHORE_CLIENT_* environment variables, or save them once as a named context with 'semaphore client auth login' (stored in ~/.semaphore/client.yml with mode 0600). Precedence: flag > environment > context > default. Commands follow the form 'semaphore client <resource> <action> [id|name]'. Results go to stdout as a table, JSON (-o json) or YAML (-o yaml); messages and errors go to stderr. Exit codes: 0 success, 1 client or API error, 2 usage error, 3 the awaited task failed, 4 authentication failed, 5 not found, 6 the awaited task was stopped, 124 wait timeout, 130 interrupted.

semaphore client

Example:

# Save a server and its token as the current context
echo "$TOKEN" | semaphore client auth login --url https://semaphore.example.com --with-token

# List templates of project 1 as JSON
semaphore client template list -p 1 -o json

# Run a template and follow its log; exit code tells how the task ended
semaphore client template run deploy -p 1 --follow
FlagTypeDefaultDescription
--ca-certstring—PEM file with the CA that signed the server certificate ($SEMAPHORE_CLIENT_CA_CERT)
--contextstring—Named context from the configuration file ($SEMAPHORE_CLIENT_CONTEXT)
--debugbool—Trace HTTP requests to stderr with secrets masked ($SEMAPHORE_CLIENT_DEBUG)
--fieldsstringSlice—Fields to show, comma-separated JSON field names (e.g. id,name,status)
--insecurebool—Skip TLS certificate verification ($SEMAPHORE_CLIENT_INSECURE)
--no-colorbool—Disable colors (also $NO_COLOR)
--no-headersbool—Omit the table header line
--no-inputbool—Never prompt; fail instead ($SEMAPHORE_CLIENT_NO_INPUT, $CI)
--output, -ostring—Output format: table, json or yaml ($SEMAPHORE_CLIENT_OUTPUT, default table)
--project, -pstring—Project id or name for project-scoped commands ($SEMAPHORE_CLIENT_PROJECT)
--quiet, -qbool—Print only ids, one per line
--timeoutduration0sHTTP request timeout, e.g. 30s ($SEMAPHORE_CLIENT_TIMEOUT, default 30s)
--urlstring—Server URL, e.g. https://semaphore.example.com ($SEMAPHORE_CLIENT_URL)
--yes, -ybool—Answer yes to confirmations
SubcommandPurpose
semaphore client authLog in to a server and manage the saved token
semaphore client contextManage saved servers (contexts)
semaphore client environmentManage variable groups (environments)
semaphore client infoShow the server version and settings
semaphore client inventoryManage inventories
semaphore client keyManage access keys (SSH keys, passwords)
semaphore client projectManage projects
semaphore client repositoryManage repositories
semaphore client runnerManage runners (global, or a project's with --project)
semaphore client scheduleManage schedules (cron runs of templates)
semaphore client taskInspect, follow, stop and rerun tasks
semaphore client templateManage task templates
semaphore client userManage users of the server (administrators only)
semaphore client viewManage views (template groups on the project page)

semaphore client auth​

Log in to a Semaphore server and save the server URL and an API token as a named context in ~/.semaphore/client.yml (mode 0600). Later commands use the current context unless --url, --context or SEMAPHORE_CLIENT_* say otherwise.

semaphore client auth

Example:

semaphore client auth login --url https://semaphore.example.com
echo "$TOKEN" | semaphore client auth login --url https://semaphore.example.com --with-token
semaphore client auth status
SubcommandPurpose
semaphore client auth loginSave a server and an API token as a context
semaphore client auth logoutForget the token of the current context
semaphore client auth statusShow which server and token are in use and whether they work
semaphore client auth tokenPrint the API token in use

semaphore client auth login​

Save a server and an API token as a context and make it the current one. Two ways to authenticate: * Paste a token: with --with-token, or whenever stdin is not a terminal, the first line of stdin is read as an existing API token and checked against the server. Create one in the web UI under Settings > API tokens. * Log in with a password: in an interactive terminal the command asks for the login and the password (and a one-time code when two-factor authentication is enabled), creates an API token named --name with lifetime --ttl, and closes the web session. The password is never stored. The context is named by --context, or after the server host. The token is written to the configuration file with mode 0600; use --ca-cert or --insecure to describe a server with a private certificate and they are saved as well.

semaphore client auth login [flags]

Example:

# Paste an existing token (CI, scripts)
echo "$SEMAPHORE_TOKEN" | semaphore client auth login --url https://semaphore.example.com --with-token

# Interactive login with a password, token valid for 30 days
semaphore client auth login --url https://semaphore.example.com --ttl 720h

# Save a second server under its own name
semaphore client auth login --url https://staging.example.com --context staging
FlagTypeDefaultDescription
--loginstring—Login or e-mail for the password flow (asked when omitted)
--namestring—Name of the API token to create (default semaphore-cli@<hostname>)
--ttlduration0sLifetime of the created token, e.g. 720h (default: never expires)
--with-tokenbool—Read an existing API token from the first line of stdin

semaphore client auth logout​

Remove the token from the current context in the configuration file. With --revoke the token is also deleted on the server, so it stops working everywhere. The context itself (URL, project, TLS settings) stays; delete it with 'semaphore client context delete'.

semaphore client auth logout [flags]

Example:

semaphore client auth logout
semaphore client auth logout --context staging --revoke
FlagTypeDefaultDescription
--revokebool—Also delete the token on the server

semaphore client auth status​

Show the current context, the server URL, where the token comes from (flag, environment, context file) and the user the token belongs to. Exit code 4 means the server rejected the token.

semaphore client auth status

Example:

semaphore client auth status
semaphore client auth status --context staging -o json

semaphore client auth token​

Print the API token the client would send, for handing it to another tool: curl -H "Authorization: Bearer $(semaphore client auth token)" ... The token is written to stdout only; a warning goes to stderr when stdout is a terminal, because a token on screen tends to end up in screenshots and logs.

semaphore client auth token

Example:

curl -H "Authorization: Bearer $(semaphore client auth token)" https://semaphore.example.com/api/user

semaphore client context​

Manage the contexts saved in ~/.semaphore/client.yml. A context is a server URL with its token, an optional default project and TLS settings. One context is current; --context or SEMAPHORE_CLIENT_CONTEXT selects another one per call.

semaphore client context

Aliases: contexts, ctx.

Example:

semaphore client context list
semaphore client context use staging
semaphore client context set prod --url https://semaphore.example.com --project 3
SubcommandPurpose
semaphore client context deleteDelete a context
semaphore client context getShow one context (the current one by default)
semaphore client context listList saved contexts
semaphore client context setCreate or change a context without logging in
semaphore client context useMake a context the current one

semaphore client context delete​

Remove a context from the configuration file. The token stored in it is forgotten but not revoked on the server; use 'auth logout --revoke' for that. Asks for confirmation in a terminal; pass --yes to skip it.

semaphore client context delete NAME

Aliases: rm.

Example:

semaphore client context delete staging -y

semaphore client context get​

Show one saved context without its token. Without a name the current context is shown.

semaphore client context get [NAME]

Aliases: show.

Example:

semaphore client context get
semaphore client context get staging -o yaml

semaphore client context list​

List the contexts of the configuration file: name, whether it is current, server URL, default project and where its token comes from (inline, file or none). Token values are never shown. Works without a server connection.

semaphore client context list

Aliases: ls.

Example:

semaphore client context list

semaphore client context set​

Create or change a context field by field. The global flags --url, --project, --ca-cert and --insecure give the new values; only the flags you pass change. The token comes from --token-file (a file holding the token) or from 'semaphore client auth login'; there is no flag that takes the token itself.

semaphore client context set NAME [flags]

Example:

semaphore client context set staging --url https://staging.example.com --token-file ~/.semaphore/staging.token
semaphore client context set prod -p 3
semaphore client context set lab --insecure
FlagTypeDefaultDescription
--no-insecurebool—Turn TLS verification back on
--no-projectbool—Remove the default project
--token-filestring—File holding the API token (replaces an inline token)

semaphore client context use​

Make a saved context the current one, so later commands use its server, token and default project unless --context or SEMAPHORE_CLIENT_CONTEXT say otherwise.

semaphore client context use NAME

Example:

semaphore client context use staging

semaphore client environment​

Manage variable groups (environments): the extra variables, environment variables and secrets a task receives. Secret values are never printed — 'get' and 'list' show only the names of the secrets. An object is addressed by its numeric id or by its name (case-insensitive). A name shared by several objects is an error (exit code 5); use the id then.

semaphore client environment

Aliases: environments, env.

Example:

semaphore client environment list -p 1
semaphore client environment get "default" -p 1 -o json
semaphore client environment delete "default" -p 1 -y
SubcommandPurpose
semaphore client environment createCreate a environment
semaphore client environment deleteDelete a environment
semaphore client environment getShow one environment
semaphore client environment listList environments of the project
semaphore client environment updateChange a environment

semaphore client environment create​

Create a environment from flags, from a JSON or YAML file (--from-file, same field names as the API), or both: flags override the file. The created object is printed; with -q only its id.

semaphore client environment create [flags]

Example:

semaphore client environment create -p 1 --name prod --json vars.json --secrets-file secrets.yml
semaphore client environment create -p 1 --name empty --json '{}'
FlagTypeDefaultDescription
--delete-secretstringArray—Name of a secret to delete (update only); repeatable
--envstring—Environment variables as a JSON object, inline or a file path
--from-filestring—JSON or YAML file with the object (API field names)
--jsonstring—Extra variables as a JSON object, inline or a file path
--namestring—Environment name
--secretstringArray—Secret extra variable NAME=VALUE (visible in ps; prefer --secrets-file); repeatable
--secret-envstringArray—Secret environment variable NAME=VALUE (visible in ps); repeatable
--secrets-filestring—JSON or YAML file: {vars: {NAME: VALUE}, env: {NAME: VALUE}} or a flat {NAME: VALUE} map of secret variables

semaphore client environment delete​

Delete a environment. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client environment delete <id|name>

Aliases: rm.

Example:

semaphore client environment delete "default" -p 1 -y

semaphore client environment get​

Show one environment, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client environment get <id|name>

Aliases: show.

Example:

semaphore client environment get 12 -p 1
semaphore client environment get "default" -p 1 -o json

semaphore client environment list​

List environments of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client environment list

Aliases: ls.

Example:

semaphore client environment list -p 1
semaphore client environment list -p 1 -o json
semaphore client environment list -p 1 -q

semaphore client environment update​

Change fields of a environment. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client environment update <id|name> [flags]

Example:

semaphore client environment update prod --env '{"ANSIBLE_FORCE_COLOR":"1"}'
semaphore client environment update prod --secrets-file secrets.yml
FlagTypeDefaultDescription
--delete-secretstringArray—Name of a secret to delete (update only); repeatable
--envstring—Environment variables as a JSON object, inline or a file path
--from-filestring—JSON or YAML file with the fields to change (API field names)
--jsonstring—Extra variables as a JSON object, inline or a file path
--namestring—Environment name
--secretstringArray—Secret extra variable NAME=VALUE (visible in ps; prefer --secrets-file); repeatable
--secret-envstringArray—Secret environment variable NAME=VALUE (visible in ps); repeatable
--secrets-filestring—JSON or YAML file: {vars: {NAME: VALUE}, env: {NAME: VALUE}} or a flat {NAME: VALUE} map of secret variables

semaphore client info​

Show the version and public settings of the server the client is pointed at, next to the client version. Use it to check that the URL and the token work.

semaphore client info

Example:

semaphore client info
semaphore client info --url https://semaphore.example.com -o json

semaphore client inventory​

Manage inventories. The subcommands work on the inventories of the project given with --project (or the context's default project). An object is addressed by its numeric id or by its name (case-insensitive). A name shared by several objects is an error (exit code 5); use the id then.

semaphore client inventory

Aliases: inventories, inv.

Example:

semaphore client inventory list -p 1
semaphore client inventory get "prod" -p 1 -o json
semaphore client inventory delete "prod" -p 1 -y
SubcommandPurpose
semaphore client inventory createCreate a inventory
semaphore client inventory deleteDelete a inventory
semaphore client inventory getShow one inventory
semaphore client inventory listList inventories of the project
semaphore client inventory updateChange a inventory

semaphore client inventory create​

Create a inventory from flags, from a JSON or YAML file (--from-file, same field names as the API), or both: flags override the file. The created object is printed; with -q only its id.

semaphore client inventory create [flags]

Example:

semaphore client inventory create -p 1 --name prod --type static --inventory-file hosts.ini --ssh-key deploy
semaphore client inventory create -p 1 --name repo-hosts --type file --inventory inventories/prod.yml --repository infra
FlagTypeDefaultDescription
--become-keystring—Access key id or name for become (sudo)
--from-filestring—JSON or YAML file with the object (API field names)
--inventorystring—Inventory content (static types) or path inside the repository (file type)
--inventory-filestring—Local file whose content becomes the inventory
--namestring—Inventory name
--repositorystring—Repository id or name (file type)
--ssh-keystring—Access key id or name for SSH
--typestring—Type: static, static-yaml, file, terraform-workspace, tofu-workspace, terragrunt-workspace

semaphore client inventory delete​

Delete a inventory. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client inventory delete <id|name>

Aliases: rm.

Example:

semaphore client inventory delete "prod" -p 1 -y

semaphore client inventory get​

Show one inventory, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client inventory get <id|name>

Aliases: show.

Example:

semaphore client inventory get 12 -p 1
semaphore client inventory get "prod" -p 1 -o json

semaphore client inventory list​

List inventories of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client inventory list

Aliases: ls.

Example:

semaphore client inventory list -p 1
semaphore client inventory list -p 1 -o json
semaphore client inventory list -p 1 -q

semaphore client inventory update​

Change fields of a inventory. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client inventory update <id|name> [flags]

Example:

semaphore client inventory update prod --inventory-file hosts.ini
FlagTypeDefaultDescription
--become-keystring—Access key id or name for become (sudo)
--from-filestring—JSON or YAML file with the fields to change (API field names)
--inventorystring—Inventory content (static types) or path inside the repository (file type)
--inventory-filestring—Local file whose content becomes the inventory
--namestring—Inventory name
--repositorystring—Repository id or name (file type)
--ssh-keystring—Access key id or name for SSH
--typestring—Type: static, static-yaml, file, terraform-workspace, tofu-workspace, terragrunt-workspace

semaphore client key​

Manage access keys: SSH private keys, login/password pairs and plain secrets used by repositories, inventories and templates. Secret material is read only from files or stdin and is never printed. An object is addressed by its numeric id or by its name (case-insensitive). A name shared by several objects is an error (exit code 5); use the id then.

semaphore client key

Aliases: keys.

Example:

semaphore client key list -p 1
semaphore client key get "deploy-key" -p 1 -o json
semaphore client key delete "deploy-key" -p 1 -y
SubcommandPurpose
semaphore client key createCreate a key
semaphore client key deleteDelete a key
semaphore client key getShow one key
semaphore client key listList keies of the project
semaphore client key updateChange a key

semaphore client key create​

Create a key from flags, from a JSON or YAML file (--from-file, same field names as the API), or both: flags override the file. The created object is printed; with -q only its id.

semaphore client key create [flags]

Example:

semaphore client key create -p 1 --name deploy --type ssh --login git --ssh-key-file ~/.ssh/id_ed25519
semaphore client key create -p 1 --name vault --type login_password --login admin --password-file ./pw.txt
echo "$SECRET" | semaphore client key create -p 1 --name api --type string --secret-stdin
FlagTypeDefaultDescription
--from-filestring—JSON or YAML file with the object (API field names)
--loginstring—Login (ssh, login_password)
--namestring—Key name
--passphrase-filestring—File with the key passphrase (ssh)
--password-filestring—File with the password (login_password)
--password-stdinbool—Read the password from stdin (login_password)
--secret-filestring—File with the secret (string)
--secret-stdinbool—Read the secret from stdin (string)
--ssh-key-filestring—File with the private key (ssh)
--typestring—Type: ssh, login_password, string, none

semaphore client key delete​

Delete a key. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client key delete <id|name>

Aliases: rm.

Example:

semaphore client key delete "deploy-key" -p 1 -y

semaphore client key get​

Show one key, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client key get <id|name>

Aliases: show.

Example:

semaphore client key get 12 -p 1
semaphore client key get "deploy-key" -p 1 -o json

semaphore client key list​

List keies of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client key list

Aliases: ls.

Example:

semaphore client key list -p 1
semaphore client key list -p 1 -o json
semaphore client key list -p 1 -q

semaphore client key update​

Change fields of a key. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client key update <id|name> [flags]

Example:

semaphore client key update deploy --ssh-key-file ~/.ssh/new_key
semaphore client key update 4 --name "deploy (old)"
FlagTypeDefaultDescription
--from-filestring—JSON or YAML file with the fields to change (API field names)
--loginstring—Login (ssh, login_password)
--namestring—Key name
--passphrase-filestring—File with the key passphrase (ssh)
--password-filestring—File with the password (login_password)
--password-stdinbool—Read the password from stdin (login_password)
--secret-filestring—File with the secret (string)
--secret-stdinbool—Read the secret from stdin (string)
--ssh-key-filestring—File with the private key (ssh)
--typestring—Type: ssh, login_password, string, none

semaphore client project​

Manage projects: list and inspect them, create, change, back up, restore and delete them, and manage their members. A project is addressed by numeric id or by name; most other commands take it through -p / --project.

semaphore client project

Aliases: projects.

Example:

semaphore client project list
semaphore client project get Homelab
semaphore client project backup Homelab --file homelab.json
SubcommandPurpose
semaphore client project backupDownload a project backup (JSON)
semaphore client project createCreate a project
semaphore client project deleteDelete a project with everything in it
semaphore client project getShow one project (the configured one by default)
semaphore client project listList projects
semaphore client project memberManage the users of a project and their roles
semaphore client project restoreCreate a project from a backup file
semaphore client project updateChange a project

semaphore client project backup​

Download the backup of a project — its templates, inventories, keys, repositories, environments, views and schedules — as the JSON document the 'Restore' page of the UI accepts. Without --file the document goes to stdout; with --file it is written with mode 0600, because it contains secrets.

semaphore client project backup [id|name] [flags]

Example:

semaphore client project backup Homelab --file homelab.json
FlagTypeDefaultDescription
--filestring—Write the backup to this file (mode 0600) instead of stdout

semaphore client project create​

Create a project from flags or from a JSON/YAML file (--from-file, API field names); flags override the file. --demo also fills it with the demo template, inventory and repository. The created project is printed.

semaphore client project create [flags]

Example:

semaphore client project create --name Homelab
semaphore client project create --name Playground --demo
FlagTypeDefaultDescription
--alertbool—Send alerts about tasks (use --alert=false to stop)
--alert-chatstring—Alert chat id
--demobool—Fill the project with the demo resources
--from-filestring—JSON or YAML file with the project fields
--max-parallel-tasksint0Maximum tasks running at once (0 = unlimited)
--namestring—Project name
--typestring—Project type (empty for a regular project)

semaphore client project delete​

Delete a project and all its templates, tasks, keys and other resources. This cannot be undone, so the project name has to be typed back (or passed with --confirm=<name>); --yes alone is not enough.

semaphore client project delete <id|name> [flags]

Aliases: rm.

Example:

semaphore client project delete Playground --confirm=Playground
FlagTypeDefaultDescription
--confirmstring—The project name, to confirm without a prompt

semaphore client project get​

Show one project by numeric id or name. Without an argument the project of --project, SEMAPHORE_CLIENT_PROJECT or the current context is shown.

semaphore client project get [id|name]

Aliases: show.

Example:

semaphore client project get
semaphore client project get Homelab -o json

semaphore client project list​

List projects as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client project list

Aliases: ls.

Example:

semaphore client project list
semaphore client project list -o json
semaphore client project list -q

semaphore client project member​

Manage the members of a project: which users belong to it and with which role (owner, manager, task_runner, guest). A member is addressed by user id or login.

semaphore client project member

Aliases: members.

Example:

semaphore client member list -p 1
semaphore client member get "bob" -p 1 -o json
semaphore client member delete "bob" -p 1 -y
SubcommandPurpose
semaphore client project member addAdd a user to the project with a role
semaphore client project member getShow one member
semaphore client project member listList members of the project
semaphore client project member removeRemove a user from the project
semaphore client project member updateChange the role of a project member

semaphore client project member add​

Add an existing user of the server to the project with a role: owner, manager, task_runner or guest.

semaphore client project member add <user id|login|email> [flags]

Example:

semaphore client project member add bob --role manager -p 1
FlagTypeDefaultDescription
--rolestring—Role slug: owner, manager, task_runner, guest or a custom role

semaphore client project member get​

Show one member, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client project member get <id|name>

Aliases: show.

Example:

semaphore client member get 12 -p 1
semaphore client member get "bob" -p 1 -o json

semaphore client project member list​

List members of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client project member list

Aliases: ls.

Example:

semaphore client member list -p 1
semaphore client member list -p 1 -o json
semaphore client member list -p 1 -q

semaphore client project member remove​

Remove a user from the project. The user keeps the account on the server. Asks for confirmation in a terminal; pass --yes to skip it.

semaphore client project member remove <user id|login>

Aliases: rm, delete.

Example:

semaphore client project member remove bob -p 1 -y

semaphore client project member update​

Give a project member another role: owner, manager, task_runner or guest.

semaphore client project member update <user id|login> [flags]

Example:

semaphore client project member update bob --role guest -p 1
FlagTypeDefaultDescription
--rolestring—New role slug

semaphore client project restore​

Create a new project from a backup file produced by 'project backup' or by the UI. The new project is printed.

semaphore client project restore [flags]

Example:

semaphore client project restore --file homelab.json
FlagTypeDefaultDescription
--filestring—Backup file produced by 'project backup'

semaphore client project update​

Change fields of a project. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client project update <id|name> [flags]

Example:

semaphore client project update Homelab --max-parallel-tasks 4
semaphore client project update 3 --alert --alert-chat ops
FlagTypeDefaultDescription
--alertbool—Send alerts about tasks (use --alert=false to stop)
--alert-chatstring—Alert chat id
--from-filestring—JSON or YAML file with the fields to change (API field names)
--max-parallel-tasksint0Maximum tasks running at once (0 = unlimited)
--namestring—Project name
--typestring—Project type (empty for a regular project)

semaphore client repository​

Manage repositories. The subcommands work on the repositories of the project given with --project (or the context's default project). An object is addressed by its numeric id or by its name (case-insensitive). A name shared by several objects is an error (exit code 5); use the id then.

semaphore client repository

Aliases: repositories, repo.

Example:

semaphore client repository list -p 1
semaphore client repository get "infra" -p 1 -o json
semaphore client repository delete "infra" -p 1 -y
SubcommandPurpose
semaphore client repository createCreate a repository
semaphore client repository deleteDelete a repository
semaphore client repository getShow one repository
semaphore client repository listList repositories of the project
semaphore client repository updateChange a repository

semaphore client repository create​

Create a repository from flags, from a JSON or YAML file (--from-file, same field names as the API), or both: flags override the file. The created object is printed; with -q only its id.

semaphore client repository create [flags]

Example:

semaphore client repository create -p 1 --name infra --url [email protected]:org/infra.git --branch main --ssh-key deploy
FlagTypeDefaultDescription
--branchstring—Branch
--from-filestring—JSON or YAML file with the object (API field names)
--namestring—Repository name
--ssh-keystring—Access key id or name used to fetch (type none for public repositories)
--urlstring—Git URL or local path

semaphore client repository delete​

Delete a repository. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client repository delete <id|name>

Aliases: rm.

Example:

semaphore client repository delete "infra" -p 1 -y

semaphore client repository get​

Show one repository, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client repository get <id|name>

Aliases: show.

Example:

semaphore client repository get 12 -p 1
semaphore client repository get "infra" -p 1 -o json

semaphore client repository list​

List repositories of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client repository list

Aliases: ls.

Example:

semaphore client repository list -p 1
semaphore client repository list -p 1 -o json
semaphore client repository list -p 1 -q

semaphore client repository update​

Change fields of a repository. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client repository update <id|name> [flags]

Example:

semaphore client repository update infra --branch release
FlagTypeDefaultDescription
--branchstring—Branch
--from-filestring—JSON or YAML file with the fields to change (API field names)
--namestring—Repository name
--ssh-keystring—Access key id or name used to fetch (type none for public repositories)
--urlstring—Git URL or local path

semaphore client runner​

Manage runners. Without --project the commands work on the global runners (administrators only), even when the context has a default project; with --project they work on the runners of that project. A runner is addressed by its numeric id or by its name (case-insensitive).

semaphore client runner

Aliases: runners.

Example:

semaphore client runner list
semaphore client runner get "worker-1" -o json
semaphore client runner delete "worker-1" -y
SubcommandPurpose
semaphore client runner clear-cacheAsk a runner to drop its repository cache
semaphore client runner createRegister a runner record and print its registration token
semaphore client runner deleteDelete a runner
semaphore client runner disableDisable a runner
semaphore client runner enableEnable a runner
semaphore client runner getShow one runner
semaphore client runner listList runners of the project
semaphore client runner registration-tokenRe-issue the registration token of a runner (printed once)
semaphore client runner updateChange a runner

semaphore client runner clear-cache​

Ask a runner to delete its local clones of the repositories, so the next task fetches them afresh.

semaphore client runner clear-cache <id|name>

Example:

semaphore client runner clear-cache worker-1

semaphore client runner create​

Create a runner record (global, or a project's with --project) and print the registration token the runner process needs. The token is shown only once; re-issue it later with 'runner registration-token'.

semaphore client runner create [flags]

Example:

semaphore client runner create --name builder-1 --tags docker,linux
semaphore client runner create --name proj-runner -p 1 -q # prints only the token
FlagTypeDefaultDescription
--from-filestring—JSON or YAML file with the runner fields
--max-parallel-tasksint0Maximum tasks at once
--namestring—Runner name
--tagsstringSlice—Tags, comma-separated
--webhookstring—Webhook URL called when a task is assigned

semaphore client runner delete​

Delete a runner. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client runner delete <id|name>

Aliases: rm.

Example:

semaphore client runner delete "worker-1" -y

semaphore client runner disable​

Disable a runner. A disabled runner stays registered but is not given tasks until it is enabled again.

semaphore client runner disable <id|name>

Example:

semaphore client runner disable worker-1

semaphore client runner enable​

Enable a runner. A disabled runner stays registered but is not given tasks until it is enabled again.

semaphore client runner enable <id|name>

Example:

semaphore client runner enable worker-1

semaphore client runner get​

Show one runner, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client runner get <id|name>

Aliases: show.

Example:

semaphore client runner get 12
semaphore client runner get "worker-1" -o json

semaphore client runner list​

List runners of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client runner list

Aliases: ls.

Example:

semaphore client runner list
semaphore client runner list -o json
semaphore client runner list -q

semaphore client runner registration-token​

Issue a new registration token for a runner and print it. The previous token stops working; the server keeps only a hash, so the token cannot be shown again later.

semaphore client runner registration-token <id|name>

Example:

semaphore client runner registration-token worker-1 > runner.token

semaphore client runner update​

Change fields of a runner. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client runner update <id|name> [flags]

Example:

semaphore client runner update builder-1 --tags docker,linux --max-parallel-tasks 4
FlagTypeDefaultDescription
--from-filestring—JSON or YAML file with the fields to change (API field names)
--max-parallel-tasksint0Maximum tasks at once
--namestring—Runner name
--tagsstringSlice—Tags, comma-separated
--webhookstring—Webhook URL called when a task is assigned

semaphore client schedule​

Manage schedules (cron runs of templates). The subcommands work on the schedules of the project given with --project (or the context's default project). An object is addressed by its numeric id or by its name (case-insensitive). A name shared by several objects is an error (exit code 5); use the id then.

semaphore client schedule

Aliases: schedules.

Example:

semaphore client schedule list -p 1
semaphore client schedule get "nightly" -p 1 -o json
semaphore client schedule delete "nightly" -p 1 -y
SubcommandPurpose
semaphore client schedule createCreate a schedule
semaphore client schedule deleteDelete a schedule
semaphore client schedule disableDisable a schedule
semaphore client schedule enableEnable a schedule
semaphore client schedule getShow one schedule
semaphore client schedule listList schedules of the project
semaphore client schedule updateChange a schedule
semaphore client schedule validateCheck a cron expression with the server

semaphore client schedule create​

Create a schedule from flags, from a JSON or YAML file (--from-file, same field names as the API), or both: flags override the file. The created object is printed; with -q only its id.

semaphore client schedule create [flags]

Example:

semaphore client schedule create -p 1 --template deploy --cron "0 3 * * *" --name nightly
semaphore client schedule create -p 1 --template 12 --cron "@hourly" --inactive
FlagTypeDefaultDescription
--cronstring—Cron expression, e.g. "0 3 * * *" or @daily
--from-filestring—JSON or YAML file with the object (API field names)
--inactivebool—Create the schedule disabled
--namestring—Schedule name
--templatestring—Template id or name to run

semaphore client schedule delete​

Delete a schedule. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client schedule delete <id|name>

Aliases: rm.

Example:

semaphore client schedule delete "nightly" -p 1 -y

semaphore client schedule disable​

Disable a schedule without changing anything else about it. A disabled schedule keeps its cron expression but does not start tasks.

semaphore client schedule disable <id|name>

Example:

semaphore client schedule disable nightly -p 1

semaphore client schedule enable​

Enable a schedule without changing anything else about it. A disabled schedule keeps its cron expression but does not start tasks.

semaphore client schedule enable <id|name>

Example:

semaphore client schedule enable nightly -p 1

semaphore client schedule get​

Show one schedule, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client schedule get <id|name>

Aliases: show.

Example:

semaphore client schedule get 12 -p 1
semaphore client schedule get "nightly" -p 1 -o json

semaphore client schedule list​

List schedules of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client schedule list

Aliases: ls.

Example:

semaphore client schedule list -p 1
semaphore client schedule list -p 1 -o json
semaphore client schedule list -p 1 -q

semaphore client schedule update​

Change fields of a schedule. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client schedule update <id|name> [flags]

Example:

semaphore client schedule update nightly --cron "0 4 * * *"
FlagTypeDefaultDescription
--cronstring—Cron expression, e.g. "0 3 * * *" or @daily
--from-filestring—JSON or YAML file with the fields to change (API field names)
--inactivebool—Create the schedule disabled
--namestring—Schedule name
--templatestring—Template id or name to run

semaphore client schedule validate​

Ask the server whether a cron expression is valid, before putting it into a schedule. Exit code 0 when it is, 1 with the server's message when it is not.

semaphore client schedule validate [flags]

Example:

semaphore client schedule validate --cron "0 3 * * *" -p 1
FlagTypeDefaultDescription
--cronstring—Cron expression to check

semaphore client task​

Work with the tasks of a project: list and inspect them, print or follow their logs, wait for them, stop, confirm, reject or rerun them. New tasks are started with 'template run'. Tasks are addressed by numeric id. Waiting commands exit with 0 when the task ends in 'success', 3 on 'error', 6 on 'stopped' and 124 when --wait-timeout runs out (the task keeps running).

semaphore client task

Aliases: tasks.

Example:

semaphore client task list -p 1 --status error
semaphore client task logs 42 -p 1 --follow
semaphore client task wait 42 -p 1 --wait-timeout 30m
SubcommandPurpose
semaphore client task confirmLet a task that waits for confirmation proceed
semaphore client task getShow one task
semaphore client task listList recent tasks of the project, newest first
semaphore client task logsPrint the log of a task
semaphore client task rejectRefuse a task that waits for confirmation
semaphore client task rerunStart a new task with the parameters of an existing one
semaphore client task stopStop a running task
semaphore client task waitWait silently until a task finishes; exit code follows its status
semaphore client task watchShow the status of a task until it finishes

semaphore client task confirm​

Approve a task whose template requires a confirmation before it runs (status 'waiting_confirmation'). The task is queued and runs as usual afterwards.

semaphore client task confirm <id>

Example:

semaphore client task confirm 42 -p 1

semaphore client task get​

Show one task with all its fields: status, template, who started it, when it ran, its parameters.

semaphore client task get <id>

Aliases: show.

Example:

semaphore client task get 42 -p 1 -o json

semaphore client task list​

List the recent tasks of the project, newest first. --template and --status filter the list; --limit bounds the number of rows and --all lifts it.

semaphore client task list [flags]

Aliases: ls.

Example:

semaphore client task list -p 1
semaphore client task list -p 1 --template deploy --status success --limit 10
semaphore client task list -p 1 -o json -q
FlagTypeDefaultDescription
--allbool—Fetch every task (ignores --limit)
--limitint50Maximum number of tasks to fetch
--statusstring—Only tasks with this status (waiting, running, success, error, stopped, …)
--templatestring—Only tasks of this template (id or name)

semaphore client task logs​

Print the log of a task. --raw streams the plain-text log the server keeps (ANSI codes stripped); otherwise the stored lines are printed, or listed as records with -o json. With --follow new lines are printed until the task finishes and the exit code follows its status.

semaphore client task logs <id> [flags]

Example:

semaphore client task logs 42
semaphore client task logs 42 -f
semaphore client task logs 42 --raw > task-42.log
FlagTypeDefaultDescription
--follow, -fbool—Keep printing new lines until the task finishes
--rawbool—Stream the plain-text log as the server stores it

semaphore client task reject​

Refuse a task whose template requires a confirmation before it runs (status 'waiting_confirmation'). The task does not run.

semaphore client task reject <id>

Example:

semaphore client task reject 42 -p 1

semaphore client task rerun​

Start a new task with the template, inventory, branch, variables and parameters of an existing task. Overrides given on the command line replace the copied values. --wait and --follow work as for 'template run'.

semaphore client task rerun <id> [flags]

Example:

semaphore client task rerun 42 -p 1
semaphore client task rerun 42 -p 1 --branch hotfix --follow
FlagTypeDefaultDescription
--argumentsstring—Extra CLI arguments as a JSON array, e.g. '["-vv"]' (if the template allows it)
--auto-approvebool—Terraform/OpenTofu: apply without approval
--branchstring—Git branch to check out (if the template allows it)
--checkbool—Ansible check mode (dry run, no changes)
--debug-levelint0Ansible verbosity level 1-4 (implies --debug-task)
--debug-taskbool—Ansible verbose output (-vvvv)
--destroybool—Terraform/OpenTofu: destroy
--diffbool—Ansible --diff
--extra-vars-filestring—JSON or YAML file with extra variables
--followbool—Print the task log while waiting (implies --wait)
--inventorystring—Inventory id or name (if the template allows overriding it)
--limitstringSlice—Ansible --limit hosts, comma-separated
--messagestring—Message shown in the task history
--planbool—Terraform/OpenTofu: plan only
--reconfigurebool—Terraform/OpenTofu: init -reconfigure
--skip-galaxybool—Skip ansible-galaxy requirements install
--skip-tagsstringSlice—Ansible --skip-tags, comma-separated
--stop-on-interruptbool—On Ctrl+C ask the server to stop the task (by default only the client disconnects)
--tagsstringSlice—Ansible --tags, comma-separated
--upgradebool—Terraform/OpenTofu: init -upgrade
--varstringArray—Extra variable NAME=VALUE; repeatable
--waitbool—Wait until the task finishes; exit code follows its status (0 success, 3 error, 6 stopped)
--wait-timeoutduration0sGive up waiting after this long, exit 124; the task keeps running (default: no limit)

semaphore client task stop​

Ask the server to stop a task. Without --force the process gets a chance to end gracefully; --force kills it at once. --wait blocks until the task has actually stopped.

semaphore client task stop <id> [flags]

Example:

semaphore client task stop 42 -p 1
semaphore client task stop 42 -p 1 --force --wait
FlagTypeDefaultDescription
--forcebool—Kill the task process immediately
--waitbool—Wait until the task has stopped

semaphore client task wait​

Wait until a task finishes without printing anything, for scripts. Exit code 0 on success, 3 on error, 6 when the task was stopped, 124 when --wait-timeout runs out (the task keeps running on the server).

semaphore client task wait <id> [flags]

Example:

semaphore client task wait 42; case $? in 0) echo ok;; 3) echo failed;; 6) echo stopped;; 124) echo timeout;; esac
FlagTypeDefaultDescription
--wait-timeoutduration0sGive up after this long, exit 124 (default: no limit)

semaphore client task watch​

Show the status of a task as it changes, until the task finishes. By default the exit code is 0 whatever the outcome; with --exit-status it follows the task (3 error, 6 stopped), like 'gh run watch --exit-status'.

semaphore client task watch <id> [flags]

Example:

semaphore client task watch 42 -p 1
semaphore client task watch 42 -p 1 --exit-status --wait-timeout 1h
FlagTypeDefaultDescription
--exit-statusbool—Exit with 3 or 6 when the task failed or was stopped
--wait-timeoutduration0sGive up after this long, exit 124 (default: no limit)

semaphore client template​

Manage task templates. The subcommands work on the templates of the project given with --project (or the context's default project). An object is addressed by its numeric id or by its name (case-insensitive). A name shared by several objects is an error (exit code 5); use the id then.

semaphore client template

Aliases: templates, tpl.

Example:

semaphore client template list -p 1
semaphore client template get "deploy" -p 1 -o json
semaphore client template delete "deploy" -p 1 -y
SubcommandPurpose
semaphore client template createCreate a template
semaphore client template deleteDelete a template
semaphore client template getShow one template
semaphore client template listList templates of the project
semaphore client template runStart a task from a template
semaphore client template stop-allStop every running task of a template
semaphore client template tasksList recent tasks of a template
semaphore client template updateChange a template

semaphore client template create​

Create a template from flags, from a JSON or YAML file (--from-file, same field names as the API), or both: flags override the file. The created object is printed; with -q only its id.

semaphore client template create [flags]

Example:

semaphore client template create -p 1 --name deploy --app ansible --playbook site.yml --repository infra --inventory prod --environment default
semaphore client template create -p 1 --from-file template.yml
FlagTypeDefaultDescription
--allow-override-argsbool—Let a task override the arguments (use =false to forbid)
--appstring—Application: ansible, terraform, tofu, bash, python, powershell, pulumi, terragrunt
--argumentsstring—Extra CLI arguments as a JSON array
--branchstring—Git branch
--descriptionstring—Description
--environmentstring—Environment (variable group) id or name
--from-filestring—JSON or YAML file with the object (API field names)
--inventorystring—Inventory id or name
--namestring—Template name
--playbookstring—Playbook or script path inside the repository
--repositorystring—Repository id or name
--viewstring—View id or title to show the template in
--working-directorystring—Working directory inside the repository

semaphore client template delete​

Delete a template. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client template delete <id|name>

Aliases: rm.

Example:

semaphore client template delete "deploy" -p 1 -y

semaphore client template get​

Show one template, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client template get <id|name>

Aliases: show.

Example:

semaphore client template get 12 -p 1
semaphore client template get "deploy" -p 1 -o json

semaphore client template list​

List templates of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client template list

Aliases: ls.

Example:

semaphore client template list -p 1
semaphore client template list -p 1 -o json
semaphore client template list -p 1 -q

semaphore client template run​

Start a task from a template. By default the task id is printed and the command returns at once; --wait blocks until the task finishes and sets the exit code from its status (0 success, 3 error, 6 stopped); --follow also streams the log. Overrides (--limit, --tags, --check, --branch, --inventory, …) apply only when the template allows them; otherwise the server rejects the task. Ctrl+C while waiting only disconnects the client — the task goes on — unless --stop-on-interrupt is given.

semaphore client template run <id|name> [flags]

Example:

# Fire and forget: prints the task id
semaphore client template run deploy -p 1

# Run and follow the log; exit 0 only if the task succeeded
semaphore client template run deploy -p 1 --follow

# Check mode on two hosts with extra variables, give up after 30 minutes
semaphore client template run deploy --check --limit web1,web2 --var version=1.4.2 --wait --wait-timeout 30m
FlagTypeDefaultDescription
--argumentsstring—Extra CLI arguments as a JSON array, e.g. '["-vv"]' (if the template allows it)
--auto-approvebool—Terraform/OpenTofu: apply without approval
--branchstring—Git branch to check out (if the template allows it)
--checkbool—Ansible check mode (dry run, no changes)
--debug-levelint0Ansible verbosity level 1-4 (implies --debug-task)
--debug-taskbool—Ansible verbose output (-vvvv)
--destroybool—Terraform/OpenTofu: destroy
--diffbool—Ansible --diff
--extra-vars-filestring—JSON or YAML file with extra variables
--followbool—Print the task log while waiting (implies --wait)
--inventorystring—Inventory id or name (if the template allows overriding it)
--limitstringSlice—Ansible --limit hosts, comma-separated
--messagestring—Message shown in the task history
--planbool—Terraform/OpenTofu: plan only
--reconfigurebool—Terraform/OpenTofu: init -reconfigure
--skip-galaxybool—Skip ansible-galaxy requirements install
--skip-tagsstringSlice—Ansible --skip-tags, comma-separated
--stop-on-interruptbool—On Ctrl+C ask the server to stop the task (by default only the client disconnects)
--tagsstringSlice—Ansible --tags, comma-separated
--upgradebool—Terraform/OpenTofu: init -upgrade
--varstringArray—Extra variable NAME=VALUE; repeatable
--waitbool—Wait until the task finishes; exit code follows its status (0 success, 3 error, 6 stopped)
--wait-timeoutduration0sGive up waiting after this long, exit 124; the task keeps running (default: no limit)

semaphore client template stop-all​

Ask the server to stop every running or queued task of one template. Asks for confirmation in a terminal; pass --yes to skip it.

semaphore client template stop-all <id|name>

Example:

semaphore client template stop-all deploy -p 1 -y

semaphore client template tasks​

List the recent tasks of one template, newest first — the same as 'task list --template'. --limit bounds the number of rows, --all lifts it.

semaphore client template tasks <id|name> [flags]

Example:

semaphore client template tasks deploy -p 1
semaphore client template tasks 12 -p 1 --limit 5 -o json
FlagTypeDefaultDescription
--allbool—List every task (ignores --limit)
--limitint50Maximum number of tasks

semaphore client template update​

Change fields of a template. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client template update <id|name> [flags]

Example:

semaphore client template update deploy --description "Deploys the site"
semaphore client template update 12 --inventory staging --branch release
FlagTypeDefaultDescription
--allow-override-argsbool—Let a task override the arguments (use =false to forbid)
--appstring—Application: ansible, terraform, tofu, bash, python, powershell, pulumi, terragrunt
--argumentsstring—Extra CLI arguments as a JSON array
--branchstring—Git branch
--descriptionstring—Description
--environmentstring—Environment (variable group) id or name
--from-filestring—JSON or YAML file with the fields to change (API field names)
--inventorystring—Inventory id or name
--namestring—Template name
--playbookstring—Playbook or script path inside the repository
--repositorystring—Repository id or name
--viewstring—View id or title to show the template in
--working-directorystring—Working directory inside the repository

semaphore client user​

Manage the users of the server. Every subcommand needs an administrator token. A user is addressed by numeric id, login or e-mail address.

semaphore client user

Aliases: users.

Example:

semaphore client user list
semaphore client user get "bob" -o json
semaphore client user delete "bob" -y
SubcommandPurpose
semaphore client user createCreate a user
semaphore client user deleteDelete a user
semaphore client user getShow one user
semaphore client user listList users
semaphore client user set-passwordSet a user's password (read from stdin)
semaphore client user updateChange a user

semaphore client user create​

Create a user. The password is read from stdin with --password-stdin and is never accepted as an argument; an --external user has no local password.

semaphore client user create [flags]

Example:

echo "$PASSWORD" | semaphore client user create --login bob --name "Bob" --email [email protected] --password-stdin
semaphore client user create --login alice --name Alice --email [email protected] --external
FlagTypeDefaultDescription
--adminbool—Administrator (use --admin=false to revoke)
--alertbool—Send alerts to this user
--emailstring—E-mail
--externalbool—External user (LDAP/OIDC), no local password
--from-filestring—JSON or YAML file with the user fields
--loginstring—Login (username)
--namestring—Full name
--password-stdinbool—Read the password from stdin

semaphore client user delete​

Delete a user. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client user delete <id|name>

Aliases: rm.

Example:

semaphore client user delete "bob" -y

semaphore client user get​

Show one user, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client user get <id|name>

Aliases: show.

Example:

semaphore client user get 12
semaphore client user get "bob" -o json

semaphore client user list​

List users as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client user list

Aliases: ls.

Example:

semaphore client user list
semaphore client user list -o json
semaphore client user list -q

semaphore client user set-password​

Set a new password for a user. The password is read from stdin with --password-stdin (or prompted for in a terminal) and is never accepted as an argument, so it does not show up in the shell history or in 'ps'.

semaphore client user set-password <id|login> [flags]

Example:

echo "$NEW_PASSWORD" | semaphore client user set-password bob --password-stdin
FlagTypeDefaultDescription
--password-stdinbool—Read the new password from stdin

semaphore client user update​

Change fields of a user. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client user update <id|name> [flags]

Example:

semaphore client user update bob --email [email protected]
semaphore client user update bob --admin=false
FlagTypeDefaultDescription
--adminbool—Administrator (use --admin=false to revoke)
--alertbool—Send alerts to this user
--emailstring—E-mail
--externalbool—External user (LDAP/OIDC), no local password
--from-filestring—JSON or YAML file with the fields to change (API field names)
--loginstring—Login (username)
--namestring—Full name

semaphore client view​

Manage views (template groups on the project page). The subcommands work on the views of the project given with --project (or the context's default project). An object is addressed by its numeric id or by its name (case-insensitive). A name shared by several objects is an error (exit code 5); use the id then.

semaphore client view

Aliases: views.

Example:

semaphore client view list -p 1
semaphore client view get "Deploy" -p 1 -o json
semaphore client view delete "Deploy" -p 1 -y
SubcommandPurpose
semaphore client view createCreate a view
semaphore client view deleteDelete a view
semaphore client view getShow one view
semaphore client view listList views of the project
semaphore client view templatesList the templates shown in a view
semaphore client view updateChange a view

semaphore client view create​

Create a view from flags, from a JSON or YAML file (--from-file, same field names as the API), or both: flags override the file. The created object is printed; with -q only its id.

semaphore client view create [flags]

Example:

semaphore client view create -p 1 --title Ops --position 2
FlagTypeDefaultDescription
--from-filestring—JSON or YAML file with the object (API field names)
--positionint0Position among the views
--titlestring—View title

semaphore client view delete​

Delete a view. Asks for confirmation in a terminal; pass --yes to skip it (required when stdin is not a terminal).

semaphore client view delete <id|name>

Aliases: rm.

Example:

semaphore client view delete "Deploy" -p 1 -y

semaphore client view get​

Show one view, addressed by its numeric id or by its name. With -o json or -o yaml every field of the object is printed; the table shows the main ones, --fields chooses others.

semaphore client view get <id|name>

Aliases: show.

Example:

semaphore client view get 12 -p 1
semaphore client view get "Deploy" -p 1 -o json

semaphore client view list​

List views of the project as a table (default), JSON (-o json) or YAML (-o yaml). --fields picks the columns, -q prints only the ids, one per line.

semaphore client view list

Aliases: ls.

Example:

semaphore client view list -p 1
semaphore client view list -p 1 -o json
semaphore client view list -p 1 -q

semaphore client view templates​

List the templates that belong to one view, in the same columns as 'template list'.

semaphore client view templates <id|name>

Example:

semaphore client view templates Deploy -p 1

semaphore client view update​

Change fields of a view. The object is read from the server first, the fields from --from-file and then from the flags are applied, and the whole object is written back — so nothing you did not mention is lost.

semaphore client view update <id|name> [flags]

Example:

semaphore client view update Ops --title Operations
FlagTypeDefaultDescription
--from-filestring—JSON or YAML file with the fields to change (API field names)
--positionint0Position among the views
--titlestring—View title

semaphore migrate​

Execute migrations

semaphore migrate
FlagTypeDefaultDescription
--apply-tostring—Apply to specific version
--err-log-sizeint0Error log size
--merge-existing-usersbool—Reuse existing users matched by username instead of failing on conflict
--skip-task-outputbool—Skip task output importing during migration
--undo-tostring—Undo to specific version

semaphore projects​

Manage projects

semaphore projects

Aliases: project.

SubcommandPurpose
semaphore projects exportExport project backup
semaphore projects importImport project(s)

semaphore projects export​

Export project backup

semaphore projects export
FlagTypeDefaultDescription
--filestring—Output file path (default: stdout)
--project-idint0Project ID to export
--project-namestring—Project name to export

semaphore projects import​

Import project(s)

semaphore projects import
FlagTypeDefaultDescription
--dirstring—Directory path with project backups to import
--filestring—Backup file path to import
--project-namestring—Override project name (only valid with --file)

semaphore runner​

Run in runner mode

semaphore runner
SubcommandPurpose
semaphore runner registerRegister runner on the server
semaphore runner setupPerform interactive setup
semaphore runner startRun in runner mode
semaphore runner unregisterUnregister runner from the server

semaphore runner register​

Register runner on the server

semaphore runner register
FlagTypeDefaultDescription
--enabledbooltrueEnable or disable the runner on the server
--namestring—Runner name to register with
--project-idint0Project ID for project-level runner (global runner if not provided)
--registration-token-filestring—Read registration token from a file
--stdin-registration-tokenbool—Read registration token from stdin
--tagsstringSlice—Runner tags (comma-separated or repeat the flag)
--webhookstring—Runner webhook URL

semaphore runner setup​

Perform interactive setup

semaphore runner setup

semaphore runner start​

Run in runner mode

semaphore runner start
FlagTypeDefaultDescription
--auto-registerbool—Register new runner if not registered
--registerbool—Alias of --auto-register

semaphore runner unregister​

Unregister runner from the server

semaphore runner unregister

semaphore server​

Run in server mode

semaphore server

Aliases: service.

semaphore setup​

Perform interactive setup

semaphore setup

semaphore users​

Manage users

semaphore users

Aliases: user.

SubcommandPurpose
semaphore users addAdd new user
semaphore users change-by-emailChange user found by email
semaphore users change-by-loginChange user found by login
semaphore users deleteRemove existing user
semaphore users getShow user's data
semaphore users listPrint all users
semaphore users tokenManage user API tokens
semaphore users totpManage TOTP verification

semaphore users add​

Add new user

semaphore users add
FlagTypeDefaultDescription
--adminbool—Mark new user as admin
--emailstring—New user email
--externalbool—Mark new user as external (LDAP or OIDC user)
--loginstring—New user login
--namestring—New user name
--passwordstring—New user password

semaphore users change-by-email​

Change user found by email

semaphore users change-by-email
FlagTypeDefaultDescription
--adminbool—Mark user as admin
--emailstring—User's new email
--loginstring—User login
--namestring—User's new name
--passwordstring—User's new password

semaphore users change-by-login​

Change user found by login

semaphore users change-by-login
FlagTypeDefaultDescription
--adminbool—Mark user as admin
--emailstring—User's new email
--loginstring—User login
--namestring—User's new name
--passwordstring—User's new password

semaphore users delete​

Remove existing user

semaphore users delete
FlagTypeDefaultDescription
--emailstring—Email of the user you want to delete
--loginstring—Login of the user you want to delete

semaphore users get​

Show user's data

semaphore users get
FlagTypeDefaultDescription
--emailstring—Email of the user you want to see
--loginstring—Login of the user you want to see

semaphore users list​

Print all users

semaphore users list

semaphore users token​

Manage user API tokens

semaphore users token
SubcommandPurpose
semaphore users token createCreate new API token
semaphore users token listList user API tokens

semaphore users token create​

Create new API token

semaphore users token create
FlagTypeDefaultDescription
--loginstring—Login of the token owner
--namestring—Token name
--ttlstring—Token lifetime (e.g. 1h, 30m, 24h). Token never expires if omitted

semaphore users token list​

List user API tokens

semaphore users token list
FlagTypeDefaultDescription
--loginstring—Login of the token owner

semaphore users totp​

Manage TOTP verification

semaphore users totp
SubcommandPurpose
semaphore users totp disableDisable TOTP verification
semaphore users totp enableEnable TOTP verification
semaphore users totp showShow TOTP details

semaphore users totp disable​

Disable TOTP verification

semaphore users totp disable
FlagTypeDefaultDescription
--loginstring—User login

semaphore users totp enable​

Enable TOTP verification

semaphore users totp enable
FlagTypeDefaultDescription
--loginstring—User login

semaphore users totp show​

Show TOTP details

semaphore users totp show
FlagTypeDefaultDescription
--loginstring—User login

semaphore vaults​

Manage access keys and other secrets

semaphore vaults

Aliases: vault.

SubcommandPurpose
semaphore vaults checkReport which key id encrypts each stored secret
semaphore vaults rekeyRe-encrypt all stored secrets under the active encryption key

semaphore vaults check​

Read-only. Reports, per key id, how many locally stored Access Key secrets and the JWT signing key it encrypts, plus the JWT option's status. Use it after vault rekey to confirm a retired key is safe to remove: a key with zero references can be deleted from the keyset. Rows whose key id is missing from the keyset are flagged and cause a non-zero exit.

semaphore vaults check

semaphore vaults rekey​

Re-encrypt all locally stored secrets (access keys and the JWT signing key) under the active key, stamping its key id into each value. Zero-downtime rotation: 1. Add a new key to the keyset (a file in keys_folder, or a keys: entry) and point active.access_key (or access_key_file) at it; reload applies it within keys_poll_interval, or send kill -HUP \<pid>. 2. Run vault rekey to re-encrypt existing data to the new key. 3. Run vault check; once the old key shows 0 rows it is safe to remove. Legacy: vault rekey --old-key \<old-key> decrypts un-prefixed data with an explicit old key.

semaphore vaults rekey
FlagTypeDefaultDescription
--backupstring—Write a backup of current access key ciphertexts to this file before re-encrypting
--old-keystring—Explicit old encryption key (legacy single-key migration; not needed when the old key is configured as a secondary)
--rollbackstring—Restore access key ciphertexts from a backup file instead of re-encrypting

semaphore version​

Print the version of Semaphore

semaphore version