unifi theme
About 903 words
List, preview and select themes.
Aliases: themes
List, preview and select the theme unifi-cli renders with.
A theme defines the colors for dark and for light terminals, the border style and the glyph set. Several themes are built in; your own live as <name>.yaml in the themes directory and may extend a built-in one. --theme and --color-scheme override the configured theme for one command.
Commands
unifi theme create: Scaffold a theme file of your ownunifi theme delete: Delete a theme of your ownunifi theme edit: Edit a theme of your own in your editorunifi theme get: List the themes, or print the definition of oneunifi theme path: Print the directory your own themes live inunifi theme preview: Show a theme on real componentsunifi theme use: Select the theme unifi-cli renders with
unifi theme create
Scaffold a theme file of your own.
Usage
unifi theme create <name> [flags]Aliases: new
Scaffold <name>.yaml in the themes directory.
The new theme extends an existing one, so it works right away: the file lists every token with the inherited value as a comment, ready to be uncommented and changed. It starts with a schema reference, so editors with a YAML language server complete and validate it.
Examples
unifi theme create homelab
unifi theme create arctic --extends nord
unifi theme create homelab && unifi theme edit homelabFlags
| Flag | Description |
|---|---|
--extends <string> | theme the new one inherits from (default unifi) |
-y, --yes | do not ask for confirmation; accepted by every command that changes something |
unifi theme delete
Delete a theme of your own.
Usage
unifi theme delete <theme> [flags]Aliases: rm, remove
Delete a theme file from the themes directory. Built-in themes cannot be deleted. When the deleted theme is the one in use, unifi-cli goes back to the default theme.
Examples
unifi theme delete homelab
unifi theme delete homelab --yesFlags
| Flag | Description |
|---|---|
-y, --yes | do not ask for confirmation |
unifi theme edit
Edit a theme of your own in your editor.
Usage
unifi theme edit <theme> [flags]Open a theme file of the themes directory in $VISUAL or $EDITOR.
You edit a copy. It is checked when the editor closes: a file that does not parse, or whose dark or light variant has a mistake, is reported and the theme stays as it was. Built-in themes cannot be edited: create a theme that extends one with unifi theme create <name> --extends <theme>.
Examples
unifi theme edit homelab
EDITOR="code --wait" unifi theme edit homelabFlags
| Flag | Description |
|---|---|
-y, --yes | do not ask for confirmation; accepted by every command that changes something |
unifi theme get
List the themes, or print the definition of one.
Usage
unifi theme get [theme] [flags]Aliases: list, ls
List the built-in themes and your own, marking the configured one.
With a name, print that theme's definition as YAML with the themes it extends merged in: a complete theme file, ready to save and adapt.
Examples
unifi theme get
unifi theme get nord
unifi theme get nord > ~/.config/unifi-cli/themes/my-nord.yaml
unifi theme get --output jsonunifi theme path
Print the directory your own themes live in.
Usage
unifi theme path [flags]Print the directory your own themes live in. Every <name>.yaml file in it is a theme; one named like a built-in theme replaces it.
Examples
unifi theme path
ls "$(unifi theme path)"unifi theme preview
Show a theme on real components.
Usage
unifi theme preview [theme] [flags]Aliases: show
Show a theme on the components the commands and the dashboard are built from: a header, a table, status marks, gauges, graphs and panels.
The dark and the light variant are both shown, each on its own background, side by side when the terminal is wide enough. Without a name the configured theme is shown. --all shows every theme as a compact card in the color scheme of your terminal; pick another with --color-scheme.
Examples
unifi theme preview
unifi theme preview nord
unifi theme preview --all
unifi theme preview --all --color-scheme lightFlags
| Flag | Description |
|---|---|
--all | preview every theme compactly |
unifi theme use
Select the theme unifi-cli renders with.
Usage
unifi theme use [theme] [flags]Aliases: set
Select the theme unifi-cli renders with and save it as a preference.
The theme is loaded for dark and for light terminals first, so a theme file with a mistake is reported instead of selected. Without an argument, on a terminal, pick the theme from a list.
Examples
unifi theme use nord
unifi theme useFlags
| Flag | Description |
|---|---|
-y, --yes | do not ask for confirmation; accepted by every command that changes something |
Global flags
These flags are accepted by every command.
| Flag | Description |
|---|---|
--color-scheme <string> | color scheme: auto, dark or light |
--context <string> | context to use instead of the current one |
--no-cache | ask the controller for everything instead of using cached answers |
-o, --output <string> | output format: text, wide, json, yaml (table is another name for text) |
-s, --site <string> | site to act on instead of the context's default site |
--theme <string> | theme to render with instead of the configured one |
