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.
| Flag | Type | Default | Description |
|---|---|---|---|
--config | string | — | Configuration file path |
--debug-filter | string | — | Debug namespace filter (only with DEBUG level), e.g. 'runner,task_' or ',-db' |
--log-level | string | — | Log level: DEBUG, INFO, WARN, ERROR, FATAL, PANIC |
--no-config | bool | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--ca-cert | string | — | PEM file with the CA that signed the server certificate ($SEMAPHORE_CLIENT_CA_CERT) |
--context | string | — | Named context from the configuration file ($SEMAPHORE_CLIENT_CONTEXT) |
--debug | bool | — | Trace HTTP requests to stderr with secrets masked ($SEMAPHORE_CLIENT_DEBUG) |
--fields | stringSlice | — | Fields to show, comma-separated JSON field names (e.g. id,name,status) |
--insecure | bool | — | Skip TLS certificate verification ($SEMAPHORE_CLIENT_INSECURE) |
--no-color | bool | — | Disable colors (also $NO_COLOR) |
--no-headers | bool | — | Omit the table header line |
--no-input | bool | — | Never prompt; fail instead ($SEMAPHORE_CLIENT_NO_INPUT, $CI) |
--output, -o | string | — | Output format: table, json or yaml ($SEMAPHORE_CLIENT_OUTPUT, default table) |
--project, -p | string | — | Project id or name for project-scoped commands ($SEMAPHORE_CLIENT_PROJECT) |
--quiet, -q | bool | — | Print only ids, one per line |
--timeout | duration | 0s | HTTP request timeout, e.g. 30s ($SEMAPHORE_CLIENT_TIMEOUT, default 30s) |
--url | string | — | Server URL, e.g. https://semaphore.example.com ($SEMAPHORE_CLIENT_URL) |
--yes, -y | bool | — | Answer yes to confirmations |
| Subcommand | Purpose |
|---|---|
semaphore client auth | Log in to a server and manage the saved token |
semaphore client context | Manage saved servers (contexts) |
semaphore client environment | Manage variable groups (environments) |
semaphore client info | Show the server version and settings |
semaphore client inventory | Manage inventories |
semaphore client key | Manage access keys (SSH keys, passwords) |
semaphore client project | Manage projects |
semaphore client repository | Manage repositories |
semaphore client runner | Manage runners (global, or a project's with --project) |
semaphore client schedule | Manage schedules (cron runs of templates) |
semaphore client task | Inspect, follow, stop and rerun tasks |
semaphore client template | Manage task templates |
semaphore client user | Manage users of the server (administrators only) |
semaphore client view | Manage 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
| Subcommand | Purpose |
|---|---|
semaphore client auth login | Save a server and an API token as a context |
semaphore client auth logout | Forget the token of the current context |
semaphore client auth status | Show which server and token are in use and whether they work |
semaphore client auth token | Print 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
| Flag | Type | Default | Description |
|---|---|---|---|
--login | string | — | Login or e-mail for the password flow (asked when omitted) |
--name | string | — | Name of the API token to create (default semaphore-cli@<hostname>) |
--ttl | duration | 0s | Lifetime of the created token, e.g. 720h (default: never expires) |
--with-token | bool | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--revoke | bool | — | 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
| Subcommand | Purpose |
|---|---|
semaphore client context delete | Delete a context |
semaphore client context get | Show one context (the current one by default) |
semaphore client context list | List saved contexts |
semaphore client context set | Create or change a context without logging in |
semaphore client context use | Make 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
| Flag | Type | Default | Description |
|---|---|---|---|
--no-insecure | bool | — | Turn TLS verification back on |
--no-project | bool | — | Remove the default project |
--token-file | string | — | 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
| Subcommand | Purpose |
|---|---|
semaphore client environment create | Create a environment |
semaphore client environment delete | Delete a environment |
semaphore client environment get | Show one environment |
semaphore client environment list | List environments of the project |
semaphore client environment update | Change 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 '{}'
| Flag | Type | Default | Description |
|---|---|---|---|
--delete-secret | stringArray | — | Name of a secret to delete (update only); repeatable |
--env | string | — | Environment variables as a JSON object, inline or a file path |
--from-file | string | — | JSON or YAML file with the object (API field names) |
--json | string | — | Extra variables as a JSON object, inline or a file path |
--name | string | — | Environment name |
--secret | stringArray | — | Secret extra variable NAME=VALUE (visible in ps; prefer --secrets-file); repeatable |
--secret-env | stringArray | — | Secret environment variable NAME=VALUE (visible in ps); repeatable |
--secrets-file | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--delete-secret | stringArray | — | Name of a secret to delete (update only); repeatable |
--env | string | — | Environment variables as a JSON object, inline or a file path |
--from-file | string | — | JSON or YAML file with the fields to change (API field names) |
--json | string | — | Extra variables as a JSON object, inline or a file path |
--name | string | — | Environment name |
--secret | stringArray | — | Secret extra variable NAME=VALUE (visible in ps; prefer --secrets-file); repeatable |
--secret-env | stringArray | — | Secret environment variable NAME=VALUE (visible in ps); repeatable |
--secrets-file | string | — | 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
| Subcommand | Purpose |
|---|---|
semaphore client inventory create | Create a inventory |
semaphore client inventory delete | Delete a inventory |
semaphore client inventory get | Show one inventory |
semaphore client inventory list | List inventories of the project |
semaphore client inventory update | Change 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
| Flag | Type | Default | Description |
|---|---|---|---|
--become-key | string | — | Access key id or name for become (sudo) |
--from-file | string | — | JSON or YAML file with the object (API field names) |
--inventory | string | — | Inventory content (static types) or path inside the repository (file type) |
--inventory-file | string | — | Local file whose content becomes the inventory |
--name | string | — | Inventory name |
--repository | string | — | Repository id or name (file type) |
--ssh-key | string | — | Access key id or name for SSH |
--type | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--become-key | string | — | Access key id or name for become (sudo) |
--from-file | string | — | JSON or YAML file with the fields to change (API field names) |
--inventory | string | — | Inventory content (static types) or path inside the repository (file type) |
--inventory-file | string | — | Local file whose content becomes the inventory |
--name | string | — | Inventory name |
--repository | string | — | Repository id or name (file type) |
--ssh-key | string | — | Access key id or name for SSH |
--type | string | — | 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
| Subcommand | Purpose |
|---|---|
semaphore client key create | Create a key |
semaphore client key delete | Delete a key |
semaphore client key get | Show one key |
semaphore client key list | List keies of the project |
semaphore client key update | Change 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
| Flag | Type | Default | Description |
|---|---|---|---|
--from-file | string | — | JSON or YAML file with the object (API field names) |
--login | string | — | Login (ssh, login_password) |
--name | string | — | Key name |
--passphrase-file | string | — | File with the key passphrase (ssh) |
--password-file | string | — | File with the password (login_password) |
--password-stdin | bool | — | Read the password from stdin (login_password) |
--secret-file | string | — | File with the secret (string) |
--secret-stdin | bool | — | Read the secret from stdin (string) |
--ssh-key-file | string | — | File with the private key (ssh) |
--type | string | — | 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)"
| Flag | Type | Default | Description |
|---|---|---|---|
--from-file | string | — | JSON or YAML file with the fields to change (API field names) |
--login | string | — | Login (ssh, login_password) |
--name | string | — | Key name |
--passphrase-file | string | — | File with the key passphrase (ssh) |
--password-file | string | — | File with the password (login_password) |
--password-stdin | bool | — | Read the password from stdin (login_password) |
--secret-file | string | — | File with the secret (string) |
--secret-stdin | bool | — | Read the secret from stdin (string) |
--ssh-key-file | string | — | File with the private key (ssh) |
--type | string | — | 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
| Subcommand | Purpose |
|---|---|
semaphore client project backup | Download a project backup (JSON) |
semaphore client project create | Create a project |
semaphore client project delete | Delete a project with everything in it |
semaphore client project get | Show one project (the configured one by default) |
semaphore client project list | List projects |
semaphore client project member | Manage the users of a project and their roles |
semaphore client project restore | Create a project from a backup file |
semaphore client project update | Change 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
| Flag | Type | Default | Description |
|---|---|---|---|
--file | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--alert | bool | — | Send alerts about tasks (use --alert=false to stop) |
--alert-chat | string | — | Alert chat id |
--demo | bool | — | Fill the project with the demo resources |
--from-file | string | — | JSON or YAML file with the project fields |
--max-parallel-tasks | int | 0 | Maximum tasks running at once (0 = unlimited) |
--name | string | — | Project name |
--type | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--confirm | string | — | 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
| Subcommand | Purpose |
|---|---|
semaphore client project member add | Add a user to the project with a role |
semaphore client project member get | Show one member |
semaphore client project member list | List members of the project |
semaphore client project member remove | Remove a user from the project |
semaphore client project member update | Change 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
| Flag | Type | Default | Description |
|---|---|---|---|
--role | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--role | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--file | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--alert | bool | — | Send alerts about tasks (use --alert=false to stop) |
--alert-chat | string | — | Alert chat id |
--from-file | string | — | JSON or YAML file with the fields to change (API field names) |
--max-parallel-tasks | int | 0 | Maximum tasks running at once (0 = unlimited) |
--name | string | — | Project name |
--type | string | — | 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
| Subcommand | Purpose |
|---|---|
semaphore client repository create | Create a repository |
semaphore client repository delete | Delete a repository |
semaphore client repository get | Show one repository |
semaphore client repository list | List repositories of the project |
semaphore client repository update | Change 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
| Flag | Type | Default | Description |
|---|---|---|---|
--branch | string | — | Branch |
--from-file | string | — | JSON or YAML file with the object (API field names) |
--name | string | — | Repository name |
--ssh-key | string | — | Access key id or name used to fetch (type none for public repositories) |
--url | string | — | 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
| Flag | Type | Default | Description |
|---|---|---|---|
--branch | string | — | Branch |
--from-file | string | — | JSON or YAML file with the fields to change (API field names) |
--name | string | — | Repository name |
--ssh-key | string | — | Access key id or name used to fetch (type none for public repositories) |
--url | string | — | Git URL or local path |