Starship Prompt Builder

Starship format strings

Format strings are Starship's layout language: they decide what appears, in what order, when it disappears, and which style reaches it.

Variables insert values

A dollar-prefixed variable inserts a value. At the root, $directory invokes a module. Inside a module, $version or $branch inserts that module's data.

Braces disambiguate names. Use ${custom.project} for a named module and ${version}beta when beta must not become part of the variable name.

$directory$git_branch$git_status
$symbol($version )
${custom.project}

Groups add style or conditions

Square brackets collect content and the following parentheses provide a style: [text](bold blue). A plain parenthesised group renders only when a variable inside has a value.

Groups can nest. The visual editor shows them as rows; exported TOML remains ordinary Starship format syntax.

[$symbol$version](bold cyan)
(via $remote_name/$remote_branch )
[($user@$hostname )](bold yellow)

Inheritance follows the nearest painted group

A module style only reaches content that still asks for $style. An explicit inner group overrides it. Removing $style can make a valid module style have no visible effect.

The Inherit/Override control expresses that relationship without asking you to rewrite the string.

Escape syntax characters when they are literal

Backslash-escape brackets, parentheses, dollar signs, and backslashes when they should print instead of parse. TOML escaping adds a second layer.

\[$directory\] \$literal

Related guides