mirror of
https://github.com/starship/starship.git
synced 2026-06-20 02:02:07 +07:00
docs(i18n): new Crowdin updates (#7206)
* New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Polish) * New translations readme.md (Polish) * New translations readme.md (Polish) * New translations readme.md (Polish) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (French) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Spanish) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (Arabic) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Italian) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Dutch) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Norwegian) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Polish) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Portuguese) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Turkish) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Vietnamese) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Bengali) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (French) * New translations readme.md (French) * New translations readme.md (French) * New translations bracketed-segments.md (French) * New translations readme.md (French) * New translations nerd-font.md (French) * New translations no-runtimes.md (French) * New translations plain-text.md (French) * New translations pure-preset.md (French) * New translations pastel-powerline.md (French) * New translations no-nerd-font.md (French) * New translations no-empty-icons.md (French) * New translations tokyo-night.md (French) * New translations gruvbox-rainbow.md (French) * New translations jetpack.md (French) * New translations readme.md (Chinese Simplified) * New translations readme.md (French) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Spanish) * New translations readme.md (Arabic) * New translations readme.md (Arabic) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (Italian) * New translations readme.md (Italian) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Korean) * New translations readme.md (Korean) * New translations readme.md (Dutch) * New translations readme.md (Dutch) * New translations readme.md (Norwegian) * New translations readme.md (Norwegian) * New translations readme.md (Polish) * New translations readme.md (Polish) * New translations readme.md (Portuguese) * New translations readme.md (Portuguese) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Turkish) * New translations readme.md (Turkish) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Indonesian) * New translations readme.md (Bengali) * New translations readme.md (Bengali) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (Sorani (Kurdish)) * New translations readme.md (French) * New translations readme.md (French) * New translations readme.md (Spanish) * New translations readme.md (Spanish) * New translations readme.md (German) * New translations readme.md (Japanese) * New translations readme.md (Japanese) * New translations readme.md (Russian) * New translations readme.md (Russian) * New translations readme.md (Ukrainian) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Simplified) * New translations readme.md (Chinese Traditional) * New translations readme.md (Chinese Traditional) * New translations readme.md (Vietnamese) * New translations readme.md (Vietnamese) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Indonesian) * New translations readme.md (Indonesian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (Portuguese, Brazilian) * New translations readme.md (German) * New translations readme.md (German) * New translations gruvbox-rainbow.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations bracketed-segments.md (German) * New translations nerd-font.md (German) * New translations no-runtimes.md (German) * New translations plain-text.md (German) * New translations pure-preset.md (German) * New translations pastel-powerline.md (German) * New translations no-nerd-font.md (German) * New translations no-empty-icons.md (German) * New translations tokyo-night.md (German) * New translations gruvbox-rainbow.md (German) * New translations jetpack.md (German) * New translations catppuccin-powerline.md (German) * New translations readme.md (Spanish) * New translations readme.md (Spanish) * New translations readme.md (German) * New translations nerd-font.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations bracketed-segments.md (German) * New translations nerd-font.md (German) * New translations no-runtimes.md (German) * New translations plain-text.md (German) * New translations pastel-powerline.md (German) * New translations no-nerd-font.md (German) * New translations no-empty-icons.md (German) * New translations tokyo-night.md (German) * New translations gruvbox-rainbow.md (German) * New translations jetpack.md (German) * New translations catppuccin-powerline.md (German) * New translations readme.md (German) * New translations readme.md (German) * New translations pure-preset.md (German) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian) * New translations readme.md (Ukrainian)
This commit is contained in:
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | مثال | الوصف |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | مثال | الوصف |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | مثال | الوصف |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | الافتراضي | الوصف |
|
||||
| --------------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | الوصف |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ----------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `الافتراضي` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `الوصف` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ----------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `الافتراضي` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `الوصف` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | الوصف |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | الوصف |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | الوصف |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | مثال | الوصف |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | مثال | الوصف |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variable | مثال | الوصف |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### مثال
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | الافتراضي | الوصف |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### مثال
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ If you're looking to further customize Starship:
|
||||
|
||||
## 🤝 المساهمة
|
||||
|
||||
نبحث دائماً عن مساهمين من **جميع المستويات**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
نبحث دائماً عن مساهمين من **جميع المستويات**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
إذا كنت تتحدث بطلاقة بلغة غير إنجليزية، فإننا نقدر أي مساعدة للحفاظ على ترجمة المستندات وتحديثها بلغات أخرى. إذا كنت ترغب في المساعدة، يمكن المساهمة بالترجمة على [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Description |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ eval "$(starship init zsh)"
|
||||
|
||||
## 🤝 নিজে অবদান রাখুন
|
||||
|
||||
আমরা সবসময় **সকল দক্ষতা স্তরের** অবদানকারীদের খুঁজছি! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
আমরা সবসময় **সকল দক্ষতা স্তরের** অবদানকারীদের খুঁজছি! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
আপনি যদি ইংরেজি ছাড়া অন্য কোন ভাষায় সাবলীল হন, তাহলে আপনি আমাদের ডকুমেন্টেশন অনুবাদে এবং আপ-টু-ডেট রাখতে সহায়তা করতে পারেন, আমরা খুবই কৃতজ্ঞ হব । যদি এক্ষেত্রে সাহায্য করতে চান, তাহলে [Starship Crowdin](https://translate.starship.rs/) পেইজ এ গিয়ে আপনার অনুবাদ গুলি যোগ করতে পারবেন ।
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
ئەمەی خوارەوە زیادبکە لە کۆتایی `Microsoft.PowerShell_profile.ps1`. ئەتوانی شوێنی ئەم فایلە ببینیتەوە بە سەیرکردنی گۆڕاوی `$PROFILE` لە PowerShell. ئاسایی ڕێڕەوەکە بریتیە لە `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` یان `/.config/powershell/Microsoft.PowerShell_profile.ps1` لەسەر -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### ڕێکخستن
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| گۆڕاو | نموونە | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| گۆڕاو | نموونە | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| گۆڕاو | نموونە | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Description |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `گۆڕاو` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `گۆڕاو` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| گۆڕاو | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| گۆڕاو | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| گۆڕاو | Description |
|
||||
| ------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| گۆڕاو | نموونە | Description |
|
||||
| ------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| گۆڕاو | نموونە | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| گۆڕاو | نموونە | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### نموونە
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### نموونە
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -404,7 +404,7 @@ If you're looking to further customize Starship:
|
||||
|
||||
## 🤝 بەژداریکردن
|
||||
|
||||
ئێمە هەموو کات ئەگەڕێین بۆ بەژداریکەرێک لە هەر **ئاست و توانایەکدا بێت**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
ئێمە هەموو کات ئەگەڕێین بۆ بەژداریکەرێک لە هەر **ئاست و توانایەکدا بێت**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
ئەگەر پاراویت لە زمانێک جگە لە ئینگلیزی، ئێمە زۆر خۆشحاڵدەبین بە هەر یارمەتییەک کە بەڵگەنامەکانمان بە وەرگێڕدراوی بهێڵێتەوە و نوێکراوی بهێڵێتەوە بە زمانەکانی دیکە. ئەگەر نیازت هەیە یارمەتی بدەیت، ئەتوانی بەژداری لە وەرگێڕاندا بکەیت لەسەر [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
layout: home
|
||||
layout: Home
|
||||
hero:
|
||||
image: /logo.svg
|
||||
text:
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Füge das Folgende ans Ende von `Microsoft.PowerShell_profile.ps1` an. Du kannst den Speicherort dieser Datei überprüfen, indem du die `$PROFILE` Variable in PowerShell abfragst. Normalerweise ist der Pfad `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oder `~/.config/powershell/Microsoft.PowerShell_profile.ps1` auf -Nix.
|
||||
|
||||
@@ -136,7 +136,7 @@ onMounted(() => {
|
||||
|
||||
#### Elvish
|
||||
|
||||
> [!WARNING] Only elvish v0.18 or higher is supported.
|
||||
> [!WARNUNG] Nur elvish v0.18 oder höher wird unterstützt.
|
||||
|
||||
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
|
||||
|
||||
@@ -161,7 +161,7 @@ onMounted(() => {
|
||||
|
||||
#### Nushell
|
||||
|
||||
> [!WARNING] This will change in the future. Nur Nushell v0.96+ wird unterstützt.
|
||||
> [!WARNUNG] Dies wird sich in Zukunft ändern. Nur Nushell v0.96+ wird unterstützt.
|
||||
|
||||
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Auch wenn Starship eine vielseitige Shell ist, reichen manche Konfigurationen in der `starship.toml` nicht aus, um manche Sachen zu erreichen. Diese Seite beschreibt einige fortgeschrittene Konfigurationen für Starship.
|
||||
|
||||
> [!WARNING] The configurations in this section are subject to change in future releases of Starship.
|
||||
> [!WARNING] Die Konfigurationen in diesem Abschnitt können in zukünftigen Releases von Starship Änderungen unterliegen.
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
|
||||
@@ -28,7 +28,7 @@ Clink allows you to replace the previous-printed prompt with custom strings. Das
|
||||
- `same_dir`: replace the previous prompt only if the working directory is same
|
||||
- `off`: do not replace the prompt (i.e. turn off transience)
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
Sie müssen dies nur einmal tun. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
|
||||
@@ -41,7 +41,7 @@ end
|
||||
load(io.popen('starship init cmd'):read("*a"))()
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
- Standardmäßig ist die rechte Seite de Eingabe leer. To customize this, define a new function called `starship_transient_rprompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```lua
|
||||
function starship_transient_rprompt_func(prompt)
|
||||
@@ -66,7 +66,7 @@ starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
- By default, the right side of input is empty. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
|
||||
- Standardmäßig ist die rechte Seite de Eingabe leer. To customize this, define a new function called `starship_transient_rprompt_func`. For example, to display the time at which the last command was started here, you would do
|
||||
|
||||
```fish
|
||||
function starship_transient_rprompt_func
|
||||
@@ -76,7 +76,7 @@ starship init fish | source
|
||||
enable_transience
|
||||
```
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Bash
|
||||
## „TransientPrompt“ und „TransientRightPrompt“ in Bash
|
||||
|
||||
The [Ble.sh](https://github.com/akinomyoga/ble.sh) framework at v0.4 or higher allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, put this in `~/.bashrc` `bleopt prompt_ps1_transient=<value>`:
|
||||
|
||||
@@ -124,7 +124,7 @@ load(io.popen('starship init cmd'):read("*a"))()
|
||||
|
||||
Die Bash Shell hat, im Gegensatz zu vielen anderen Shells, kein konventionelles preexec/precmd Framework. Daher gestaltet es sich schwierig, vollständig anpassbare Hooks für `bash` anzubieten. Starship bietet daher die begrenzte Möglichkeit, eigene Funktionen in das prompt rendering Verfahren einzufügen:
|
||||
|
||||
- Um eine benutzerdefinierte Funktion kurz vor Anzeige der Eingabeaufforderung auszuführen, definiere eine neue Funktion und weise den Namen `starship_precmd_user_func` zu. Um beispielsweise eine Rakete anzuzeigen, bevor die Eingabeaufforderung erscheint, würde man folgendes tun
|
||||
- Um eine benutzerdefinierte Funktion kurz vor Anzeige der Eingabeaufforderung auszuführen, definiere eine neue Funktion und weise den Namen `starship_precmd_user_func` zu. Zum Beispiel, um vor der Eingabeaufforderung eine Rakete zu zeichnen, würden Sie Folgendes tun
|
||||
|
||||
```bash
|
||||
function blastoff(){
|
||||
@@ -185,7 +185,7 @@ precmd_functions+=(set_win_title)
|
||||
|
||||
If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent.
|
||||
|
||||
Zum Beispiel, wenn sie ihr aktuelles Verzeichnis als Terminal Title anzeigen wollen, fügen Sie folgenden Code-Schnipsel zu ihrer `~/.bashrc` oder `~/.zshrc` hinzu:
|
||||
Zum Beispiel, wenn Sie ihr aktuelles Verzeichnis im Titel Ihrer Terminal-Registerkarte anzeigen möchten, fügen Sie folgenden Code-Schnipsel zu Ihrer `~/.bashrc` oder `~/.zshrc` hinzu:
|
||||
|
||||
```bash
|
||||
function set_win_title(){
|
||||
@@ -266,6 +266,316 @@ Hinweis: Fortsetzungs-Prompts sind nur für folgende Shells verfügbar:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Konfiguration
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Optionen
|
||||
|
||||
| Option | Standartwert | Beschreibung |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | Das Format für das Modul. |
|
||||
| `Symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | Stil für dieses Modul. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| Symbol | | Spiegelt den Wert der Option `symbol` |
|
||||
| style\* | | Spiegelt den Wert der Option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Beispiele
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Optionen
|
||||
|
||||
| Option | Standartwert | Beschreibung |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | Das Format für das Modul. |
|
||||
| `Symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [siehe unten](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Standartwert | Beschreibung |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| ---------------------------- | -------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| Symbol | | Spiegelt den Wert der Option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Beispiele
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Optionen
|
||||
|
||||
| Option | Standartwert | Beschreibung |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | Das Format für das Modul. |
|
||||
| `Symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [siehe unten](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Standartwert | Beschreibung |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Beispiel | Beschreibung |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| Symbol | | Spiegelt den Wert der Option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Beispiele
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style-Strings
|
||||
|
||||
Stil-Zeichenketten sind eine Liste von Wörtern, getrennt durch Leerzeichen. Die Wörter haben keine Groß- und Kleinschreibung (z.B. `bold` und `BoLd` werden als dieselbe Zeichenkette betrachtet). Jedes Wort kann eines der folgenden sein:
|
||||
|
||||
+325
-206
File diff suppressed because it is too large
Load Diff
@@ -86,7 +86,7 @@ Finally if you find a bug you can use the `bug-report` command to create a GitHu
|
||||
starship bug-report
|
||||
```
|
||||
|
||||
## Why don't I see a glyph symbol in my prompt?
|
||||
## Warum sehe ich in meiner Eingabeaufforderung kein Glyphe-Symbol?
|
||||
|
||||
The most common cause of this is system misconfiguration. Some Linux distros in particular do not come with font support out-of-the-box. Sie müssen sicherstellen, dass:
|
||||
|
||||
|
||||
@@ -189,9 +189,9 @@ Wähle dein Betriebssystem aus der Liste für detaillierte Installationsanweisun
|
||||
<details>
|
||||
<summary>Android</summary>
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
Starship unter Verwendung einer der folgenden Paketmanager installieren:
|
||||
|
||||
| Repository | Instructions |
|
||||
| Repository | Anweisungen |
|
||||
| --------------------------------------------------------------------------------- | ---------------------- |
|
||||
| [Termux](https://github.com/termux/termux-packages/tree/master/packages/starship) | `pkg install starship` |
|
||||
|
||||
@@ -200,9 +200,9 @@ Install Starship using any of the following package managers:
|
||||
<details>
|
||||
<summary>BSD</summary>
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
Starship unter Verwendung einer der folgenden Paketmanager installieren:
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| Distribution | Repository | Anweisungen |
|
||||
| ------------ | -------------------------------------------------------- | --------------------------------- |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| FreeBSD | [FreshPorts](https://www.freshports.org/shells/starship) | `pkg install starship` |
|
||||
@@ -221,7 +221,7 @@ curl -sS https://starship.rs/install.sh | sh
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
| Distribution | Repository | Instructions |
|
||||
| Distribution | Repository | Anweisungen |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
||||
| **_Any_** | **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| _Any_ | [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
@@ -251,7 +251,7 @@ curl -sS https://starship.rs/install.sh | sh
|
||||
|
||||
Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
| Repository | Instructions |
|
||||
| Repository | Anweisungen |
|
||||
| -------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [conda-forge](https://anaconda.org/conda-forge/starship) | `conda install -c conda-forge starship` |
|
||||
@@ -265,9 +265,9 @@ Alternatively, install Starship using any of the following package managers:
|
||||
|
||||
Install the latest version for your system with the MSI-installers from the [releases section](https://github.com/starship/starship/releases/latest).
|
||||
|
||||
Install Starship using any of the following package managers:
|
||||
Starship unter Verwendung einer der folgenden Paketmanager installieren:
|
||||
|
||||
| Repository | Instructions |
|
||||
| Repository | Anweisungen |
|
||||
| -------------------------------------------------------------------------------------------- | --------------------------------------- |
|
||||
| **[crates.io](https://crates.io/crates/starship)** | `cargo install starship --locked` |
|
||||
| [Chocolatey](https://community.chocolatey.org/packages/starship) | `choco install starship` |
|
||||
@@ -408,7 +408,7 @@ Falls du Starship weiter anpassen möchtest:
|
||||
|
||||
## 🤝 Mitwirken
|
||||
|
||||
Wir sind immer auf der Suche nach Helfern **jeder Erfahrungsstufe**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
Wir sind immer auf der Suche nach Helfern **jeder Erfahrungsstufe**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Wenn du eine andere Sprache flüssig sprichts, würden wir uns sehr freuen wenn du helfen würdest die Dokumentation in anderen Sprachen auf dem aktuellsten Stand zu halten. Hier kannst du bei der Übersetzung helfen [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
Um Starship zu installieren, musst du zwei Dinge tun:
|
||||
|
||||
1. Lade die **starship** Datei auf den Computer herunter
|
||||
1. Weise deine Shell an die Starship Datei als Eingabeaufforderung zu nutzen, indem du eines der Initialisierungs-Skripte benutzt
|
||||
1. Laden Sie die **starship** Binärdatei auf Ihren Computer herunter
|
||||
1. Weisen Sie Ihre Shell an, die Starship-Binärdatei als Eingabeaufforderung zu verwenden, indem Sie die Init-Skripte entsprechend anpassen
|
||||
|
||||
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. Für einige speziellere Plattformen wird jedoch eine speziellere Anleitung benötigt.
|
||||
Für die meisten Benutzer funktionieren die Anweisungen auf [der Hauptseite](../guide/#🚀-installation) hervorragend. Für einige speziellere Plattformen sind jedoch andere Anweisungen erforderlich.
|
||||
|
||||
Es gibt sehr viele Plattformen, sodass diese nicht alle in die Hauptanleitung passen, aus diesem Grund sind hier ein paar Installationsanweisungen für ein paar Plattformen von der Community. Ist deine Platform nicht dabei? Dann füge bitte deine hinzu, sobald du herausgefunden hast wie man starship mit dieser benutzt!
|
||||
Es gibt so viele Plattformen, dass sie nicht alle in die Hauptdatei README.md passten; daher finden Sie hier einige Installationsanweisungen für andere Plattformen aus der Community. Ist Ihre nicht dabei? Bitte fügen Sie es hier hinzu, wenn Sie es herausgefunden haben!
|
||||
|
||||
## [Chocolatey](https://chocolatey.org)
|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
Gehe zur [Chocolatey's Installations-Seite](https://chocolatey.org/install) und folge den Anweisungen um Chocolatey zu installieren.
|
||||
Gehen Sie zu [Chocolatey Installations-Seite](https://chocolatey.org/install) und folgen Sie den Anweisungen, um Chocolatey zu installieren.
|
||||
|
||||
### Installation
|
||||
|
||||
@@ -33,7 +33,7 @@ pkg install starship
|
||||
|
||||
### Installation
|
||||
|
||||
Unter Funtoo Linux kann starship von [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) über Portage installiert werden:
|
||||
Unter Funtoo Linux kann starship aus [core-kit](https://github.com/funtoo/core-kit/tree/1.4-release/app-shells/starship) über Portage installiert werden:
|
||||
|
||||
```sh
|
||||
emerge app-shells/starship
|
||||
@@ -41,7 +41,7 @@ emerge app-shells/starship
|
||||
|
||||
## [Nix](https://wiki.nixos.org/wiki/Nix)
|
||||
|
||||
### Das Binary holen
|
||||
### Abrufen der Binärdatei
|
||||
|
||||
#### Imperativ
|
||||
|
||||
@@ -72,7 +72,7 @@ Aktiviere das Modul `programs.starship` in deiner `home.nix`-Datei und füge dei
|
||||
}
|
||||
```
|
||||
|
||||
führe danach folgendes aus
|
||||
Danach ausführen
|
||||
|
||||
```sh
|
||||
home-manager switch
|
||||
@@ -80,7 +80,7 @@ home-manager switch
|
||||
|
||||
#### Deklarativ, systemweit, mit NixOS
|
||||
|
||||
Füge `pkgs.starship` zu der Sektion `environment.systemPackages` in deiner `configuration.nix` hinzu, und führe folgenden Befehl aus
|
||||
Fügen Sie `pkgs.starship` zu `environment.systemPackages` in Ihrer `configuration.nix` hinzu, danach führen Sie aus
|
||||
|
||||
```sh
|
||||
sudo nixos-rebuild switch
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Migration auf v0.45.0
|
||||
|
||||
Starship v0.45.0 is a release containing breaking changes, in preparation for the big v1.0.0. We have made some major changes around how configuration is done on the prompt, to allow for a greater degree of customization.
|
||||
Starship v0.45.0 ist ein Release mit bahnbrechenden Änderungen in Vorbereitung auf das große v1.0.0. Wir haben einige wichtige Änderungen vorgenommen, wie die Konfiguration auf der Eingabeaufforderung durchgeführt wird, um einen höheren Grad an Individualisierung zu ermöglichen.
|
||||
|
||||
This guide is intended to walk you through the breaking changes.
|
||||
|
||||
@@ -10,7 +10,7 @@ Previously to v0.45.0, `prompt_order` would accept an array of module names in t
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for customization of the prompt outside of the modules themselves.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Beispiel für Pre-v0.45.0 Konfiguration**
|
||||
|
||||
```toml
|
||||
prompt_order = [
|
||||
@@ -31,7 +31,7 @@ prompt_order = [
|
||||
]
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Beispiel für v0.45.0 Konfiguration**
|
||||
|
||||
```toml
|
||||
format = """\
|
||||
@@ -58,14 +58,14 @@ Previously to v0.45.0, some modules would accept `prefix` and/or `suffix` in ord
|
||||
|
||||
Starship v0.45.0 instead accepts a `format` value, allowing for further customization of how modules are rendered. Instead of defining a prefix and suffix for the context-based variables, the variables can now be substituted from within a format string, which represents the module's output.
|
||||
|
||||
**Example pre-v0.45.0 configuration**
|
||||
**Beispiel für Pre-v0.45.0 Konfiguration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
prefix = "took "
|
||||
```
|
||||
|
||||
**Example v0.45.0 configuration**
|
||||
**Beispiel für v0.45.0 Konfiguration**
|
||||
|
||||
```toml
|
||||
[cmd_duration]
|
||||
@@ -74,13 +74,13 @@ prefix = "took "
|
||||
format = "took [$duration]($style) "
|
||||
```
|
||||
|
||||
### Affected Modules
|
||||
### Betroffene Module
|
||||
|
||||
#### Zeichen
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| ----------------------- | ---------------- |
|
||||
| `symbol` | `success_symbol` |
|
||||
| `Symbol` | `success_symbol` |
|
||||
| `use_symbol_for_status` | `error_symbol` |
|
||||
| `style_success` | `success_symbol` |
|
||||
| `style_failure` | `error_symbol` |
|
||||
@@ -113,9 +113,9 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
|
||||
|
||||
#### Befehlsdauer
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -127,9 +127,9 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
|
||||
|
||||
#### Verzeichnis
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `prefix` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -141,10 +141,10 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
|
||||
|
||||
#### Umgebungsvariablen
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -155,12 +155,12 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
|
||||
++ format = "with [$env_value]($style) "
|
||||
```
|
||||
|
||||
#### Git Commit
|
||||
#### Git-Commit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -173,11 +173,11 @@ _Note:_ The `character` element automatically adds a space after, so unlike the
|
||||
|
||||
#### Git-Status
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ----------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| `show_sync_count` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -204,10 +204,10 @@ behind = "⇣${count}"
|
||||
|
||||
#### Hostname
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -218,13 +218,13 @@ behind = "⇣${count}"
|
||||
++ format = "[$hostname]($style) in "
|
||||
```
|
||||
|
||||
#### Singularity
|
||||
#### Singularität
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `Label` | `format` |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -237,9 +237,9 @@ behind = "⇣${count}"
|
||||
|
||||
#### Uhrzeit
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | ------------- |
|
||||
| `format` | `time_format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
@@ -250,12 +250,12 @@ behind = "⇣${count}"
|
||||
++ format = "at 🕙[$time]($style) "
|
||||
```
|
||||
|
||||
#### Custom Commands
|
||||
#### Benutzerdefinierte Befehle
|
||||
|
||||
| Removed Property | Replacement |
|
||||
| ---------------- | ----------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
| Entfernte Eigenschaft | Ersetzung |
|
||||
| --------------------- | --------- |
|
||||
| `prefix` | `format` |
|
||||
| `suffix` | `format` |
|
||||
|
||||
**Änderungen an der Standardkonfiguration**
|
||||
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
# Presets
|
||||
# Presets (Voreinstellungen)
|
||||
|
||||
Here is a collection of community-submitted configuration presets for Starship. If you have a preset to share, please [submit a PR](https://github.com/starship/starship/edit/master/docs/presets/README.md) updating this file! 😊
|
||||
Hier eine Sammlung von Konfigurations-Presets für Starship, die von der Community eingereicht wurden. Wenn Sie ein Preset zum Teilen haben, bitte [reichen Sie einen PR ein](https://github.com/starship/starship/edit/master/docs/presets/README.md), um diese Datei zu aktualisieren! 😊
|
||||
|
||||
To get details on how to use a preset, simply click on the image.
|
||||
Um weitere Details zur Verwendung eines Presets zu erhalten, klicken Sie einfach auf das Bild.
|
||||
|
||||
## [Nerd Font Symbole](./nerd-font.md)
|
||||
## [Nerd Font-Symbole](./nerd-font.md)
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
Dieses Preset ändert die Symbole für jedes Modul, um Nerd Font-Symbole zu verwenden.
|
||||
|
||||
[](./nerd-font)
|
||||
[](./nerd-font)
|
||||
|
||||
## [No Nerd Fonts](./no-nerd-font.md)
|
||||
## [Keine Nerd Fonts](./no-nerd-font.md)
|
||||
|
||||
This preset changes the symbols for several modules so that no Nerd Font symbols are used anywhere in the prompt.
|
||||
Dieses Preset ändert die Symbole für mehrere Module, sodass überall im Prompt No Nerd Font-Symbole verwendet werden.
|
||||
|
||||
> [!TIP] This preset will become the default preset [in a future release of starship](https://github.com/starship/starship/pull/3544).
|
||||
> [!TIPP] Dieses Preset wird in einem zukünftigen Release von Starship zu einem per Default vorgegebenem Preset [werden](https://github.com/starship/starship/pull/3544).
|
||||
|
||||
[Click to view No Nerd Font preset](./no-nerd-font)
|
||||
[Klicken Sie hier, um das Preset „No Nerd Font“ anzusehen](./no-nerd-font)
|
||||
|
||||
## [Bracketed Segments](./bracketed-segments.md)
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
Dieses Preset ändert das Format aller integrierten Module, um deren Segment in Klammern zu zeigen, anstatt der Verwendung der Standardformulierung ("via", "on", etc.) von Starship.
|
||||
|
||||
[](./bracketed-segments)
|
||||
[](./bracketed-segments)
|
||||
|
||||
## [Plain Text Symbols](./plain-text.md)
|
||||
## [Plain Text-Symbols](./plain-text.md)
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
Dieses Preset ändert die Symbole für jedes Modul in Plain Text. Großartig, wenn Sie keinen Zugriff auf Unicode haben.
|
||||
|
||||
[](./plain-text)
|
||||
[](./plain-text)
|
||||
|
||||
## [No Runtime Versions](./no-runtimes.md)
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
Dieses Preset blendet die Version der Sprachlaufzeiten aus. Wenn Sie in Containern oder virtualisierten Umgebungen arbeiten, dann ist dies für Sie!
|
||||
|
||||
[](./no-runtimes)
|
||||
[](./no-runtimes)
|
||||
|
||||
## [No Empty Icons](./no-empty-icons.md)
|
||||
## [Keine leeren Icons](./no-empty-icons.md)
|
||||
|
||||
This preset does not show icons if the toolset is not found.
|
||||
Dieses Preset zeigt keine Icons, wenn das Toolset nicht gefunden wird.
|
||||
|
||||
[](./no-empty-icons.md)
|
||||
[](./no-empty-icons.md)
|
||||
|
||||
## [Pure Prompt](./pure-preset.md)
|
||||
|
||||
Diese Voreinstellung emuliert das Aussehen und das Verhalten von [Pure](https://github.com/sindresorhus/pure).
|
||||
Dieses Preset emuliert das Aussehen und Verhalten von [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||
[](./pure-preset)
|
||||
[](./pure-preset)
|
||||
|
||||
## [Pastel Powerline](./pastel-powerline.md)
|
||||
## [Pastell Powerline](./pastel-powerline.md)
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
Dieses Preset ist inspiriert von [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). Es zeigt außerdem, wie Pfadsubstitution in Starship funktioniert.
|
||||
|
||||
[](./pastel-powerline)
|
||||
[](./pastel-powerline)
|
||||
|
||||
## [Tokyo Night](./tokyo-night.md)
|
||||
|
||||
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
Dieses Preset ist inspiriert von [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
|
||||
[](./tokyo-night)
|
||||
[](./tokyo-night)
|
||||
|
||||
## [Gruvbox Rainbow](./gruvbox-rainbow.md)
|
||||
|
||||
Diese Voreinstellung ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
|
||||
Dieses Preset ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md) und [Tokyo Night](./tokyo-night.md).
|
||||
|
||||
[](./gruvbox-rainbow)
|
||||
[](./gruvbox-rainbow)
|
||||
|
||||
## [Jetpack](./jetpack.md)
|
||||
|
||||
This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
|
||||
Dies ist ein pseudo-minimalistisches Preset, inspiriert von den Prompts [geometry](https://github.com/geometry-zsh/geometry) und [spaceship](https://github.com/spaceship-prompt/spaceship-prompt).
|
||||
|
||||
[](./jetpack)
|
||||
[](./jetpack)
|
||||
|
||||
## [Catppuccin Powerline](./catppuccin-powerline.md)
|
||||
|
||||
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.
|
||||
Dieses Preset ist eine minimal modifizierte Version von [Gruvbox Rainbow](./gruvbox-rainbow.md) unter Verwendung der Theme-Palette [Catppuccin](https://github.com/catppuccin/catppuccin).
|
||||
|
||||
[](./catppuccin-powerline)
|
||||
[](./catppuccin-powerline)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[Zurück zu den Voreinstellungen](./#bracketed-segments)
|
||||
|
||||
# Bracketed Segments Preset
|
||||
# Preset - Bracketed Segments
|
||||
|
||||
This preset changes the format of all the built-in modules to show their segment in brackets instead of using the default Starship wording ("via", "on", etc.).
|
||||
Dieses Preset ändert das Format aller integrierten Module, um deren Segment in Klammern zu zeigen, anstatt der Verwendung der Standardformulierung ("via", "on", etc.) von Starship.
|
||||
|
||||

|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -12,6 +12,6 @@ This preset changes the format of all the built-in modules to show their segment
|
||||
starship preset bracketed-segments -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/bracketed-segments.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/bracketed-segments.toml
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[Return to Presets](./#catppuccin-powerline)
|
||||
[Zurück zu Presets](./#catppuccin-powerline)
|
||||
|
||||
# Catppuccin Powerline Preset
|
||||
# Preset - Catppuccin Powerline
|
||||
|
||||
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.
|
||||
Dieses Preset ist eine minimal modifizierte Version von [Gruvbox Rainbow](./gruvbox-rainbow.md) unter Verwendung der Theme-Palette [Catppuccin](https://github.com/catppuccin/catppuccin).
|
||||
|
||||

|
||||

|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal
|
||||
- Ein [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal
|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -16,13 +16,13 @@ This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainb
|
||||
starship preset catppuccin-powerline -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
By default this preset uses the Mocha flavour of Catppucin, but you can specify any of the flavours by modifying the value of `palette`:
|
||||
Standardmäßig verwendet dieses Preset die Note „Mocha“ von Catppucin, aber Sie können jede beliebige Note festlegen, indem Sie den Wert von `palette` modifizieren:
|
||||
|
||||
- `catppuccin_mocha`
|
||||
- `catppuccin_frappe`
|
||||
- `catppuccin_macchiato`
|
||||
- `catppuccin_latte`
|
||||
|
||||
[Click to download TOML](/presets/toml/catppuccin-powerline.toml)
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/catppuccin-powerline.toml)
|
||||
|
||||
<<< @/public/presets/toml/catppuccin-powerline.toml
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[Zurück zu den Voreinstellungen](./#gruvbox-rainbow)
|
||||
[Zurück zu Presets](./#gruvbox-rainbow)
|
||||
|
||||
# Gruvbox Regenbogen
|
||||
# Preset - Gruvbox Rainbow
|
||||
|
||||
Diese Voreinstellung ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md), and [Tokyo Night](./tokyo-night.md).
|
||||
Dieses Preset ist stark inspiriert von [Pastel Powerline](./pastel-powerline.md) und [Tokyo Night](./tokyo-night.md).
|
||||
|
||||

|
||||

|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- Eine [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in deinem Terminal
|
||||
- Ein [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal
|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -16,6 +16,6 @@ Diese Voreinstellung ist stark inspiriert von [Pastel Powerline](./pastel-powerl
|
||||
starship preset gruvbox-rainbow -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/gruvbox-rainbow.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/gruvbox-rainbow.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/gruvbox-rainbow.toml
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
[Zurück zu den Voreinstellungen](./#jetpack)
|
||||
[Zurück zu Presets](./#jetpack)
|
||||
|
||||
# Jetpack Preset
|
||||
# Preset - Jetpack
|
||||
|
||||
This is a pseudo minimalist preset inspired by the [geometry](https://github.com/geometry-zsh/geometry) and [spaceship](https://github.com/spaceship-prompt/spaceship-prompt) prompts.
|
||||
Dies ist ein pseudo-minimalistisches Preset, inspiriert von den Prompts [geometry](https://github.com/geometry-zsh/geometry) und [spaceship](https://github.com/spaceship-prompt/spaceship-prompt).
|
||||
|
||||
> Jetpack uses the terminal's color theme.
|
||||
> Jetpack verwendet das Farbschema des Terminals.
|
||||
|
||||

|
||||

|
||||
|
||||
### Prerequisite
|
||||
### Voraussetzung
|
||||
|
||||
- Requires a shell with [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt) support.
|
||||
- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) is recommended.
|
||||
- Erfordert eine Shell mit Unterstützung für [`right-prompt`](https://starship.rs/advanced-config/#enable-right-prompt).
|
||||
- [Jetbrains Mono](https://www.jetbrains.com/lp/mono/) wird empfohlen.
|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -19,6 +19,6 @@ This is a pseudo minimalist preset inspired by the [geometry](https://github.com
|
||||
starship preset jetpack -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/jetpack.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/jetpack.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/jetpack.toml
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[Zurück zu den Voreinstellungen](./#nerd-font-symbols)
|
||||
[Zurück zu Presets](./#nerd-font-symbols)
|
||||
|
||||
# Nerd Font Symbols Preset
|
||||
# Preset - Nerd Font Symbols
|
||||
|
||||
This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
Dieses Preset ändert die Symbole für jedes Modul, um Nerd-Font-Symbole zu verwenden.
|
||||
|
||||

|
||||

|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Fira Code Nerd Font)
|
||||
- Ein [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal (das Beispiel verwendet Fira Code Nerd Font)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -16,6 +16,6 @@ This preset changes the symbols for each module to use Nerd Font symbols.
|
||||
starship preset nerd-font-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/nerd-font-symbols.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/nerd-font-symbols.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/nerd-font-symbols.toml
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[Zurück zu den Voreinstellungen](./#no-empty-icons)
|
||||
[Zurück zu Presets](./#no-empty-icons)
|
||||
|
||||
# No Empty Icons Preset
|
||||
# Preset - No Empty Icons
|
||||
|
||||
If toolset files are identified the toolset icon is displayed. If the toolset is not found to determine its version number, it is not displayed. This preset changes the behavior to display the icon only if the toolset information can be determined.
|
||||
Wenn Toolset-Dateien identifiziert werden, wird das Toolset-Icon angezeigt. Wenn das Toolset nicht gefunden wird, um dessen Versionsnummer zu bestimmen, wird dies nicht angezeigt. Dieses Preset ändert das Verhalten zum Anzeigen des Icons nur, wenn die Informationen des Toolsets bestimmt werden können.
|
||||
|
||||

|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -12,6 +12,6 @@ If toolset files are identified the toolset icon is displayed. If the toolset is
|
||||
starship preset no-empty-icons -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-empty-icons.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/no-empty-icons.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/no-empty-icons.toml
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
[Zurück zu den Voreinstellungen](./#no-nerd-fonts)
|
||||
[Zurück zu Presets](./#no-nerd-fonts)
|
||||
|
||||
# No Nerd Fonts Preset
|
||||
# Preset - No Nerd Fonts
|
||||
|
||||
This preset restricts the use of symbols to those from emoji and powerline sets.
|
||||
Dieses Preset beschränkt die Verwendung von Symbolen auf solche aus den Emoji- und Powerline-Sets.
|
||||
|
||||
This means that even without a Nerd Font installed, you should be able to view all module symbols.
|
||||
Dies bedeutet, dass Sie auch ohne einen installierten Nerd-Font in der Lage sein sollten, alle Modulsymbole anzusehen.
|
||||
|
||||
This preset will become the default preset in a future release of starship.
|
||||
Dieses Preset wird in einem zukünftigen Release von Starship zu einem per Default vorgegebenen Preset.
|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -14,6 +14,6 @@ This preset will become the default preset in a future release of starship.
|
||||
starship preset no-nerd-font -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-nerd-font.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/no-nerd-font.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/no-nerd-font.toml
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[Zurück zu den Voreinstellungen](./#no-runtime-versions)
|
||||
[Zurück zu Presets](./#no-runtime-versions)
|
||||
|
||||
# No Runtime Versions Preset
|
||||
# Preset - No Runtime Versions
|
||||
|
||||
This preset hides the version of language runtimes. If you work in containers or virtualized environments, this one is for you!
|
||||
Dieses Preset blendet die Version der Sprachlaufzeiten aus. Wenn Sie in Containern oder virtualisierten Umgebungen arbeiten, dann ist dies für Sie!
|
||||
|
||||

|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -12,6 +12,6 @@ This preset hides the version of language runtimes. If you work in containers or
|
||||
starship preset no-runtime-versions -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-runtime-versions.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/no-runtime-versions.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/no-runtime-versions.toml
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[Zurück zu den Voreinstellungen](./#pastel-powerline)
|
||||
[Zurück zu Presets](./#pastel-powerline)
|
||||
|
||||
# Pastel Powerline Preset
|
||||
# Preset - Pastel Powerline
|
||||
|
||||
This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). It also shows how path substitution works in starship.
|
||||
Dieses Preset ist inspiriert von [M365Princess](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/themes/M365Princess.omp.json). Es zeigt außerdem, wie Pfadsubstitution in Starship funktioniert.
|
||||
|
||||

|
||||

|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- A [Nerd Font](https://www.nerdfonts.com/) installed and enabled in your terminal (the example uses Caskaydia Cove Nerd Font)
|
||||
- Ein [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal (das Beispiel verwendet die Caskaydia Cove Nerd Font)
|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -16,6 +16,6 @@ This preset is inspired by [M365Princess](https://github.com/JanDeDobbeleer/oh-m
|
||||
starship preset pastel-powerline -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pastel-powerline.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/pastel-powerline.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/pastel-powerline.toml
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[Zurück zu den Voreinstellungen](./#plain-text-symbols)
|
||||
[Zurück zu Presets](./#plain-text-symbols)
|
||||
|
||||
## Plain Text Symbols Preset
|
||||
## Preset - Plain Text Symbols
|
||||
|
||||
This preset changes the symbols for each module into plain text. Great if you don't have access to Unicode.
|
||||
Dieses Preset ändert die Symbole für jedes Modul in Plain Text. Großartig, wenn Sie keinen Zugriff auf Unicode haben.
|
||||
|
||||

|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -12,6 +12,6 @@ This preset changes the symbols for each module into plain text. Great if you do
|
||||
starship preset plain-text-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/plain-text-symbols.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/plain-text-symbols.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/plain-text-symbols.toml
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
[Zurück zu den Voreinstellungen](./#pure-prompt)
|
||||
[Zurück zu Presets](./#pure-prompt)
|
||||
|
||||
# Pure Voreinstellung
|
||||
# Preset - Pure
|
||||
|
||||
Diese Voreinstellung emuliert das Aussehen und das Verhalten von [Pure](https://github.com/sindresorhus/pure).
|
||||
Dieses Preset emuliert das Aussehen und Verhalten von [Pure](https://github.com/sindresorhus/pure).
|
||||
|
||||

|
||||

|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -12,6 +12,6 @@ Diese Voreinstellung emuliert das Aussehen und das Verhalten von [Pure](https://
|
||||
starship preset pure-preset -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pure-preset.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/pure-preset.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/pure-preset.toml
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[Zurück zu den Voreinstellungen](./#tokyo-night)
|
||||
[Zurück zu Presets](./#tokyo-night)
|
||||
|
||||
# Tokyo Night Preset
|
||||
# Preset - Tokyo Night
|
||||
|
||||
This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
Dieses Preset ist inspiriert von [tokyo-night-vscode-theme](https://github.com/enkia/tokyo-night-vscode-theme).
|
||||
|
||||

|
||||

|
||||
|
||||
### Voraussetzungen
|
||||
|
||||
- Eine [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in deinem Terminal
|
||||
- Ein [Nerd Font](https://www.nerdfonts.com/) installiert und aktiviert in Ihrem Terminal
|
||||
|
||||
### Konfiguration
|
||||
|
||||
@@ -16,6 +16,6 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t
|
||||
starship preset tokyo-night -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/tokyo-night.toml){download}
|
||||
[Klicken, um TOML herunterzuladen](/presets/toml/tokyo-night.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/tokyo-night.toml
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Añade lo siguiente al final de `Microsoft.PowerShell_profile.ps1`. Puedes comprobar la ubicación de este archivo consultando la variable `$PROFILE` en PowerShell. Normalmente la ruta es `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` o `~/.config/powershell/Microsoft.PowerShell_profile.ps1` en -Nix.
|
||||
|
||||
@@ -138,7 +138,7 @@ onMounted(() => {
|
||||
|
||||
> [!WARNING] Only elvish v0.18 or higher is supported.
|
||||
|
||||
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
|
||||
:
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
||||
@@ -266,6 +266,316 @@ Nota: Los prompts de continuación solo están disponibles en los siguientes int
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuración
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Opciones
|
||||
|
||||
| Opción | Predeterminado | Descripción |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | El formato del módulo. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | El estilo del módulo. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| --------- | ------------------- | -------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style\* | | Refleja el valor de la opción `style` |
|
||||
|
||||
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
|
||||
|
||||
#### Ejemplos
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Opciones
|
||||
|
||||
| Opción | Predeterminado | Descripción |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | El formato del módulo. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opción | Predeterminado | Descripción |
|
||||
| ----------- | -------------- | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
|
||||
|
||||
#### Ejemplos
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Opciones
|
||||
|
||||
| Opción | Predeterminado | Descripción |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | El formato del módulo. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opción | Predeterminado | Descripción |
|
||||
| ----------- | -------------- | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Ejemplo | Descripción |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Refleja el valor de la opción `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Esta variable sólo puede ser usada como parte de una cadena de estilo
|
||||
|
||||
#### Ejemplos
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Cadenas de Estilo
|
||||
|
||||
Las cadenas de estilo son una lista de palabras, separadas por espacios en blanco. Las palabras no son sensibles a mayúsculas (es decir, `bold` y `BoLd` se consideran la misma cadena). Cada palabra puede ser una de las siguientes:
|
||||
|
||||
+1790
-155
File diff suppressed because it is too large
Load Diff
@@ -124,7 +124,7 @@
|
||||
><img
|
||||
height="20"
|
||||
src="https://raw.githubusercontent.com/starship/starship/master/media/flag-ua.png"
|
||||
alt="Українська"
|
||||
alt=""
|
||||
/></a>
|
||||
|
||||
<a
|
||||
@@ -306,13 +306,13 @@ load(io.popen('starship init cmd'):read("*a"))()
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
|
||||
:
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
Note: Only Elvish v0.18+ is supported. For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
|
||||
For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
|
||||
|
||||
</details>
|
||||
|
||||
@@ -409,7 +409,7 @@ Si estás buscando personalizar Starship:
|
||||
|
||||
## 🤝 Contribuir
|
||||
|
||||
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! Si buscas avanzar gradualmente en el proyecto, prueba con un [buen primer número](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
¡Siempre estamos buscando colaboradores de **todos los niveles y habilidades**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Si habla con fluidez en un idioma que no es inglés, agradecemos mucho cualquier ayuda para mantener nuestros documentos traducidos y actualizados en otros idiomas. Si quieres ayudar, puedes contribuir con las traducciones en el [Crowdin de Starship](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Ajouter ce qui suit à la fin de `Microsoft.PowerShell_profile.ps1`. Vous pouvez vérifier l'emplacement de ce fichier en regardant la variable `$PROFILE` dans PowerShell. Habituellement, son chemin est `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` sur -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: les invites de confirmation sont uniquement disponibles pour les shells su
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | Format du module. |
|
||||
| `symbole` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | Le style pour le module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Exemple | Description |
|
||||
| --------- | ------------------- | -------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbole | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'un style
|
||||
|
||||
#### Exemples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | Format du module. |
|
||||
| `symbole` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [voir plus bas](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Exemple | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbole | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'un style
|
||||
|
||||
#### Exemples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | Format du module. |
|
||||
| `symbole` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [voir plus bas](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Exemple | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbole | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\* : Cette variable ne peut être utilisée que comme partie d'un style
|
||||
|
||||
#### Exemples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Chaînes de style
|
||||
|
||||
Les chaines de style sont une liste de mots séparés par des espaces. Les mots ne sont pas sensibles à la casse (`bold` et `boLd` sont considérés comme la même chaine). Les mots peuvent être :
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ Le module `battery` montre à quel point la batterie de l'appareil est chargée
|
||||
| `full_symbol` | `' '` | Le symbole affiché lorsque la batterie est pleine. |
|
||||
| `charging_symbol` | `' '` | Le symbole affiché lorsque la batterie se charge. |
|
||||
| `discharging_symbol` | `' '` | Le symbole affiché lorsque la batterie se décharge. |
|
||||
| `unknown_symbol` | `' '` | Le symbole affiché lorsque l'état de la batterie est inconnu. |
|
||||
| `unknown_symbol` | `' '` | Le symbole affiché lorsque l'état de la batterie est inconnu. |
|
||||
| `empty_symbol` | `' '` | Le symbole affiché lorsque la batterie est vide. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | Format du module. |
|
||||
| `display` | [lien](#battery-display) | Affiche le seuil et le style du module. |
|
||||
@@ -566,7 +573,7 @@ Le module `buf` affiche la version de [Buf](https://buf.build) installée. By de
|
||||
| `symbole` | `'🐃 '` | Le symbole utilisé avant d’afficher la version de Buf. |
|
||||
| `detect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `style` | `'bold blue'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `elixir`. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ Par exemple, `~/Dev/Nix/nixpkgs/pkgs` où `nixpkgs` est la racine du repo, et l'
|
||||
|
||||
| Options avancées | Défaut | Description |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | Une table de substitutions à appliquer aux chemins. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | Le nombre de caractères à utiliser lors de l'application de la logique de troncature du pwd de fish. |
|
||||
| `use_logical_path` | `true` | Si `true` affiche le chemin logique issu du shell via `PWD` ou `--logical-path`. Si `false` renvoie plutôt le chemin du système de fichiers physique avec les liens symboliques résolus. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Notez que cela désactivera la PWD de style fish.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Notez que cela désactivera la PWD de style fish. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ Le module affichera aussi le Moniker de Framework Cible (<https://docs.microsoft
|
||||
| `heuristic` | `true` | Utilisez la détection de versions plus rapide pour garder starship instantané. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `style` | `'bold blue'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `dotnet`. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ Le module `elixir` affiche la version de [Elixir](https://elixir-lang.org/) et [
|
||||
| `symbole` | `'💧 '` | Le symbole utilisé avant d'afficher la version d'Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['mix.exs']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `style` | `'bold purple'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `elixir`. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ Le module `elm` affiche la version de [Elm](https://elm-lang.org/) installée. P
|
||||
| `symbole` | `'🌳 '` | Une chaîne de format représentant le symbole d'Elm. |
|
||||
| `detect_extensions` | `['elm']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Les dossiers qui activent ce module. |
|
||||
| `style` | `'cyan bold'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `elm`. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ Le module `env_var` affiche la valeur actuelle de la variable d’environnement
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ------------- | ------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `symbole` | `""` | Le symbole utilisé avant d'afficher la valeur de la variable. |
|
||||
| `variable` | | La variable d'environnement à afficher. |
|
||||
| `default` | | La valeur par défaut à afficher lorsque la variable sélectionnée n'est pas définie. |
|
||||
| `format` | `"with [$env_value]($style) "` | Format du module. |
|
||||
| `description` | `"<env_var module>"` | La description du module qui est affichée lors de l’exécution de `starship explain`. |
|
||||
| `disabled` | `false` | Désactive le module `env_var`. |
|
||||
| Option | Défaut | Description |
|
||||
| ------------- | ------------------------------------- | ------------------------------------------------------------------------------------ |
|
||||
| `symbole` | `""` | Le symbole utilisé avant d'afficher la valeur de la variable. |
|
||||
| `variable` | | La variable d'environnement à afficher. |
|
||||
| `default` | | La valeur par défaut à afficher lorsque la variable sélectionnée n'est pas définie. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | Format du module. |
|
||||
| `description` | `"<env_var module>"` | La description du module qui est affichée lors de l’exécution de `starship explain`. |
|
||||
| `disabled` | `false` | Désactive le module `env_var`. |
|
||||
| `style` | `"black bold dimmed"` | Le style pour le module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ Le module `env_var` affiche la valeur actuelle de la variable d’environnement
|
||||
| --------- | ---------------------------------------- | ------------------------------------------------ |
|
||||
| env_value | `Windows NT` (si _variable_ était `$OS`) | La valeur d'environnement de l'option `variable` |
|
||||
| symbole | | Reflète la valeur de l'option `symbol` |
|
||||
| style\* | `black bold dimmed` | Reflète la valeur de l'option `style` |
|
||||
| style\* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
*: Cette variable peut uniquement être utilisée dans une chaine de style
|
||||
|
||||
@@ -1488,7 +1516,7 @@ Le module `erlang` affiche la version de [Erlang/OTP](https://erlang.org/doc/) i
|
||||
| `style` | `'bold red'` | Le style pour le module. |
|
||||
| `detect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `disabled` | `false` | Désactive le module `erlang`. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | Le style pour le module. |
|
||||
| `detect_extensions` | `['fnl']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ Le module `git_status` affiche des symboles représentant l’état du dépôt d
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| -------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | Le format par défaut du module `git_status` |
|
||||
| `conflicted` | `'='` | Cette branche a des conflits de fusion. |
|
||||
| `ahead` | `'⇡'` | Le format de `ahead` |
|
||||
| `behind` | `'⇣'` | Le format de `behind` |
|
||||
| `diverged` | `'⇕'` | Le format de `diverged` |
|
||||
| `up_to_date` | `''` | The format de `up_to_date` |
|
||||
| `untracked` | `'?'` | Le format de `untracked` |
|
||||
| `stashed` | `'\$'` | Le format de `stashed` |
|
||||
| `modified` | `'!'` | Le format de `modified` |
|
||||
| `staged` | `'+'` | Le format de `staged` |
|
||||
| `renamed` | `'»'` | Le format de `renamed` |
|
||||
| `deleted` | `'✘'` | Le format de `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | Le style pour le module. |
|
||||
| `ignore_submodules` | `false` | Ignorer les changements des sous-modules. |
|
||||
| `disabled` | `false` | Désactive le module `git_status`. |
|
||||
| `windows_starship` | | Utiliser ce chemin (Linux) vers un exécutable Starship Windows pour afficher le `git_status` pour les chemins Windows dans WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Défaut | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | Le format par défaut du module `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | Le style pour le module. |
|
||||
| `ignore_submodules` | `false` | Ignorer les changements des sous-modules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Désactive le module `git_status`. |
|
||||
| `windows_starship` | | Utiliser ce chemin (Linux) vers un exécutable Starship Windows pour afficher le `git_status` pour les chemins Windows dans WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
Les variables suivantes peuvent être utilisées pour la valeur de `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | --------------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Affiche la chaine de formatage `diverged`, `ahead`, `behind` ou `up_to_date` en se basant sur l’état actuel du dépôt. |
|
||||
| `conflicted` | Affiche `conflicted` lorsque la branche courante a des conflits de fusion. |
|
||||
| `untracked` | Affiche `untracked` lorsqu'il y a des fichiers non suivis dans le répertoire de travail. |
|
||||
| `stashed` | Affiche `stashed` lorsqu'une remise existe pour le dépôt local. |
|
||||
| `modified` | Affiche `modified` lorsqu'il y a des fichiers modifiés dans le répertoire de travail. |
|
||||
| `staged` | Affiche `staged` lorsqu'un nouveau fichier a été ajouté à la zone de validation. |
|
||||
| `renamed` | Affiche `renamed` lorsqu'un fichier renommé a été ajouté à la zone de validation. |
|
||||
| `deleted` | Affiche `deleted` lorsque la suppression d'un fichier a été ajoutée à la zone de validation. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Reflète la valeur de l'option `style` |
|
||||
| Variable | Description |
|
||||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Affiche la chaine de formatage `diverged`, `ahead`, `behind` ou `up_to_date` en se basant sur l’état actuel du dépôt. |
|
||||
| `conflicted` | Affiche `conflicted` lorsque la branche courante a des conflits de fusion. |
|
||||
| `untracked` | Affiche `untracked` lorsqu'il y a des fichiers non suivis dans le répertoire de travail. |
|
||||
| `stashed` | Affiche `stashed` lorsqu'une remise existe pour le dépôt local. |
|
||||
| `modified` | Affiche `modified` lorsqu'il y a des fichiers modifiés dans le répertoire de travail. |
|
||||
| `staged` | Affiche `staged` lorsqu'un nouveau fichier a été ajouté à la zone de validation. |
|
||||
| `renamed` | Affiche `renamed` lorsqu'un fichier renommé a été ajouté à la zone de validation. |
|
||||
| `deleted` | Affiche `deleted` lorsque la suppression d'un fichier a été ajoutée à la zone de validation. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Reflète la valeur de l'option `style` |
|
||||
|
||||
*: Cette variable peut uniquement être utilisée dans une chaine de style
|
||||
|
||||
@@ -1979,7 +2023,7 @@ Les variables suivantes peuvent être utilisées pour la valeur de `diverged`:
|
||||
| `ahead_count` | Nombre de commits en avance sur la branche suivie |
|
||||
| `behind_count` | Nombre de commits en retard sur la branche suivie |
|
||||
|
||||
Les variables suivantes peuvent êtres utilisées dans `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` et `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | --------------------------------------- |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Les dossiers qui activent ce module. |
|
||||
| `symbole` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ Le module `helm` affiche la version de [Helm](https://helm.sh/) installée. Par
|
||||
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `symbole` | `'⎈ '` | Une chaîne de format représentant le symbole de Helm. |
|
||||
| `style` | `'bold white'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `helm`. |
|
||||
@@ -2373,7 +2417,7 @@ Le module `java` affiche la version de [Java](https://www.oracle.com/java/) inst
|
||||
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `symbole` | `'☕ '` | Une chaîne de caractères représentant le symbole de Java |
|
||||
| `style` | `'red dimmed'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `java`. |
|
||||
@@ -2470,7 +2514,7 @@ Le module `julia` affiche la version de [Julia](https://julialang.org/) install
|
||||
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `symbole` | `'ஃ '` | Une chaîne de caractères représentant le symbole de Julia. |
|
||||
| `style` | `'bold purple'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `Julia`. |
|
||||
@@ -2508,7 +2552,7 @@ Le module `kotlin` affiche la version de [Kotlin](https://kotlinlang.org/) insta
|
||||
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `symbole` | `'🅺 '` | Une chaîne de caractères représentant le symbole de Kotlin. |
|
||||
| `style` | `'bold blue'` | Le style pour le module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configure le binaire kotlin que Starship exécute lors de l'obtention de la version. |
|
||||
@@ -2562,7 +2606,7 @@ Afficher le nom du [contexte Kubernetes](https://kubernetes.io/docs/concepts/con
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `[]` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `[]` | Les dossiers qui activent ce module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Désactiver le module `kubernetes`. |
|
||||
@@ -2745,6 +2789,41 @@ Le module `lua` affiche la version de [Lua](http://www.lua.org/) installée. Par
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
Par défaut, le module sera affiché si l’une de ces conditions est remplie:
|
||||
|
||||
- Le dossier courant contient un fichier `pom.xml`.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------ |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | Format du module. |
|
||||
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbole` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['pom.xml']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `['.mvn']` | Les dossiers qui activent ce module. |
|
||||
| `style` | `'bold bright-cyan'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Exemple | Description |
|
||||
| -------- | -------- | -------------------------------------- |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbole | | Reflète la valeur de l'option `symbol` |
|
||||
| style* | | Reflète la valeur de l'option `style` |
|
||||
|
||||
*: Cette variable peut uniquement être utilisée dans une chaine de style
|
||||
|
||||
## Utilisation mémoire
|
||||
|
||||
Le module `memory_usage` affiche la mémoire système actuelle et l'utilisation de swap.
|
||||
@@ -3749,6 +3828,7 @@ Par défaut, le module sera affiché si l’une de ces conditions est remplie:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Les extensions qui déclenchent ce module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quels fichiers devraient activer ce module |
|
||||
| `detect_folders` | `[]` | Quels dossiers devraient activer ce module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Désactive le module `python`. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship essayera d'exécuter chaque binaire jusqu'à obtenir un résultat. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ Par défaut, le module sera affiché si l’une de ces conditions est remplie:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Exemple | Description |
|
||||
| ------------ | --------------- | -------------------------------------------- |
|
||||
| version | `'v3.8.1'` | La version de `python` |
|
||||
| symbole | `'🐍 '` | Reflète la valeur de l'option `symbol` |
|
||||
| style | `'yellow bold'` | Reflète la valeur de l'option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Reflète la valeur de l'option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | Le nom du `virtualenv` courant |
|
||||
| Variable | Exemple | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | La version de `python` |
|
||||
| symbole | `'🐍 '` | Reflète la valeur de l'option `symbol` |
|
||||
| style | `'yellow bold'` | Reflète la valeur de l'option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Reflète la valeur de l'option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Exemple
|
||||
|
||||
@@ -4043,7 +4123,7 @@ Le module `scale` affiche la version de [Scala](https://www.scala-lang.org/) ins
|
||||
| `version_format` | `'v${raw}'` | Le format de la version. Les variables disponibles sont `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Les extensions qui déclenchent ce module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Les fichiers qui activent ce module. |
|
||||
| `detect_folders` | `['.metals']` | Quels dossiers devraient activer ce module. |
|
||||
| `detect_folders` | `['.metals']` | Les dossiers qui activent ce module. |
|
||||
| `symbole` | `'🆂 '` | Une chaîne de caractères représentant le symbole de Scala. |
|
||||
| `style` | `'red dimmed'` | Le style pour le module. |
|
||||
| `disabled` | `false` | Désactive le module `scala`. |
|
||||
@@ -4665,6 +4745,45 @@ Le module `vlang` affiche la version de [V](https://vlang.io/) installée. Par d
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Défaut | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Exemple
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ Si vous cherchez à personnaliser davantage Starship :
|
||||
|
||||
## 🤝 Contribuer
|
||||
|
||||
Nous sommes toujours à la recherche de contributeurs de **tous niveaux de compétence**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
Nous sommes toujours à la recherche de contributeurs de **tous niveaux de compétence**! Si vous cherchez à faciliter votre entrée dans le projet, essayez un [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Si vous parlez couramment une langue autre que l'anglais, nous apprécions grandement toute aide pour traduire et mettre à jour notre documentation dans d'autres langues. Si vous souhaitez nous aider, les traductions se font sur le [Crowdin Starship](https://translate.starship.rs/).
|
||||
|
||||
@@ -428,7 +428,7 @@ Voyez ces travaux précédents qui ont contribué à inspirer la création de St
|
||||
|
||||
Soutenez ce projet en [devenant un collaborateur](https://github.com/sponsors/starship). Votre nom ou logo apparaîtra ici avec un lien vers votre site Web.
|
||||
|
||||
## 🔒 Code Signing Policy
|
||||
## 🔒 Politique de signature de code
|
||||
|
||||
Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org).
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Pour installer starship, vous devez faire deux choses:
|
||||
1. Installez le binaire **starship** sur votre ordinateur
|
||||
1. Dire à votre shell d'utiliser le binaire de starship comme invite en modifiant ses scripts d'initialisation
|
||||
|
||||
For most users, the instructions on [the main page](../guide/#🚀-installation) will work great. Cependant, pour certaines plateformes plus spécialisées, des instructions différentes sont nécessaires.
|
||||
Pour la plupart des utilisateurs, les instructions sur [la page principale](../guide/#🚀-installation) fonctionneront bien. Cependant, pour certaines plateformes plus spécialisées, des instructions différentes sont nécessaires.
|
||||
|
||||
Il y a tellement de plates-formes, qu'il aurait été déraisonnable de les faire apparaître dans le README principal, voici donc quelques instructions d'installation supplémentaires pour celles-ci, écrites par la communauté. La vôtre n'est pas là ? S'il vous plaît, ajoutez-la ici pour les suivants !
|
||||
|
||||
|
||||
@@ -12,6 +12,6 @@ Ce préréglage modifie le format de tous les modules intégrés pour afficher l
|
||||
starship preset bracketed-segments -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/bracketed-segments.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/bracketed-segments.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/bracketed-segments.toml
|
||||
|
||||
@@ -16,6 +16,6 @@ This preset is heavily inspired by [Pastel Powerline](./pastel-powerline.md), an
|
||||
starship preset gruvbox-rainbow -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/gruvbox-rainbow.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/gruvbox-rainbow.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/gruvbox-rainbow.toml
|
||||
|
||||
@@ -19,6 +19,6 @@ This is a pseudo minimalist preset inspired by the [geometry](https://github.com
|
||||
starship preset jetpack -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/jetpack.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/jetpack.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/jetpack.toml
|
||||
|
||||
@@ -16,6 +16,6 @@ Ce préréglage change les symboles de chaque module pour utiliser les symboles
|
||||
starship preset nerd-font-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/nerd-font-symbols.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/nerd-font-symbols.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/nerd-font-symbols.toml
|
||||
|
||||
@@ -12,6 +12,6 @@ If toolset files are identified the toolset icon is displayed. If the toolset is
|
||||
starship preset no-empty-icons -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-empty-icons.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/no-empty-icons.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/no-empty-icons.toml
|
||||
|
||||
@@ -14,6 +14,6 @@ This preset will become the default preset in a future release of starship.
|
||||
starship preset no-nerd-font -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-nerd-font.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/no-nerd-font.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/no-nerd-font.toml
|
||||
|
||||
@@ -12,6 +12,6 @@ Ce préréglage masque la version des environnements. Si vous travaillez dans de
|
||||
starship preset no-runtime-versions -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/no-runtime-versions.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/no-runtime-versions.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/no-runtime-versions.toml
|
||||
|
||||
@@ -16,6 +16,6 @@ Ce préréglage s'inspire de [M365Princess](https://github.com/JanDeDobbeleer/oh
|
||||
starship preset pastel-powerline -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pastel-powerline.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/pastel-powerline.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/pastel-powerline.toml
|
||||
|
||||
@@ -12,6 +12,6 @@ Ce préréglage change les symboles de chaque module en texte brut. Idéal si vo
|
||||
starship preset plain-text-symbols -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/plain-text-symbols.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/plain-text-symbols.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/plain-text-symbols.toml
|
||||
|
||||
@@ -12,6 +12,6 @@ Ce préréglage émule l'apparence et le comportement de [Pure](https://github.c
|
||||
starship preset pure-preset -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/pure-preset.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/pure-preset.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/pure-preset.toml
|
||||
|
||||
@@ -16,6 +16,6 @@ This preset is inspired by [tokyo-night-vscode-theme](https://github.com/enkia/t
|
||||
starship preset tokyo-night -o ~/.config/starship.toml
|
||||
```
|
||||
|
||||
[Click to download TOML](/presets/toml/tokyo-night.toml){download}
|
||||
[Cliquez pour télécharger TOML](/presets/toml/tokyo-night.toml){download}
|
||||
|
||||
<<< @/public/presets/toml/tokyo-night.toml
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Tambahkan skrip berikut pada baris akhir `Microsoft.PowerShell_profile.ps1`. Kamu dapat mengecek lokasi file tersebut dengan mencari tahu keberadaan variabel `$PROFILE` di dalam PowerShell. Biasanya, lokasi file tersebut berada di `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` atau `~/.config/powershell/Microsoft.PowerShell_profile.ps1` pada -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Catatan: Continuation prompts hanya tersedia pada beberapa shells berikut:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Konfigurasi
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Opsi
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `fromat` | `'[$symbol$model]($style) '` | Format dari modul. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | Gaya penataan untuk modul. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variabel
|
||||
|
||||
| Variabel | Contoh | Deskripsi |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Menyalin nilai dari opsi `symbol` |
|
||||
| style\* | | Menyalin nilai dari opsi `style` |
|
||||
|
||||
\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
|
||||
|
||||
#### Contoh
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Opsi
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `fromat` | `'[$gauge $percentage]($style) '` | Format dari modul. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variabel
|
||||
|
||||
| Variabel | Contoh | Deskripsi |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Menyalin nilai dari opsi `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
|
||||
|
||||
#### Contoh
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Opsi
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `fromat` | `'[$symbol(\\$$cost)]($style) '` | Format dari modul. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variabel
|
||||
|
||||
| Variabel | Contoh | Deskripsi |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Menyalin nilai dari opsi `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
|
||||
|
||||
#### Contoh
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Penataan String
|
||||
|
||||
Penataan string adalah kumpulan kata-kata, yang dipisahkan oleh ruang kosong. Kumpulannya tidak bersifat case sensitive (mis. `tebal` dan `TeBaL` dianggap sebagai string yang sama). Tiap-tiap kata berikut adalah opsinya:
|
||||
|
||||
+176
-57
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ Modul `battery` menampilkan seberapa penuh baterai perangkat terisi dan status p
|
||||
| `full_symbol` | `' '` | Simbol dimunculkan ketika baterai penuh. |
|
||||
| `charging_symbol` | `' '` | Simbol dimunculkan ketika baterai mengisi. |
|
||||
| `discharging_symbol` | `' '` | Simbol dimunculkan ketika baterai terpakai. |
|
||||
| `unknown_symbol` | `' '` | Simbol dimunculkan ketika keadaan baterai tidak dikenali. |
|
||||
| `unknown_symbol` | `' '` | Simbol dimunculkan ketika keadaan baterai tidak dikenali. |
|
||||
| `empty_symbol` | `' '` | Simbol dimunculkan ketika keadaan baterai kosong. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | Format dari modul. |
|
||||
| `display` | [link](#battery-display) | Menampilkan ambang dan gaya dari modul. |
|
||||
@@ -1140,11 +1147,31 @@ Sebagai contoh, untuk `~/Dev/Nix/nixpkgs/pkgs` dimana `nixpkgs` merupakan root r
|
||||
|
||||
| Advanced Option | Bawaan | Deskripsi |
|
||||
| --------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Deskripsi |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1430,14 +1457,15 @@ Modul `env_var` menampilkan nilai terkini dari variabel environment yang dipilih
|
||||
|
||||
### Opsi
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ----------- | ------------------------------ | ------------------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | Simbol yang digunakan sebelum menampilkan nilai dari variabel. |
|
||||
| `variabel` | | Variabel environment yang akan ditampilkan. |
|
||||
| `bawaan` | | Nilai bawaan yang akan ditampilkan ketika variabel yang terpilih tidak didefinisikan. |
|
||||
| `fromat` | `"with [$env_value]($style) "` | Format dari modul. |
|
||||
| `deskripsi` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Menonaktifkan modul `env_var`. |
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ----------- | ------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | Simbol yang digunakan sebelum menampilkan nilai dari variabel. |
|
||||
| `variabel` | | Variabel environment yang akan ditampilkan. |
|
||||
| `bawaan` | | Nilai bawaan yang akan ditampilkan ketika variabel yang terpilih tidak didefinisikan. |
|
||||
| `fromat` | `"with [$symbol$env_value]($style) "` | Format dari modul. |
|
||||
| `deskripsi` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Menonaktifkan modul `env_var`. |
|
||||
| `style` | `"black bold dimmed"` | Gaya penataan untuk modul. |
|
||||
|
||||
### Variabel
|
||||
|
||||
@@ -1445,7 +1473,7 @@ Modul `env_var` menampilkan nilai terkini dari variabel environment yang dipilih
|
||||
| --------- | ------------------------------------------------- | -------------------------------------- |
|
||||
| env_value | `Windows NT` (jika _variable_ akan menjadi `$OS`) | Nilai environment dari opsi `variable` |
|
||||
| symbol | | Menyalin nilai dari opsi `symbol` |
|
||||
| style\* | `black bold dimmed` | Menyalin nilai dari opsi `style` |
|
||||
| style\* | | Menyalin nilai dari opsi `style` |
|
||||
|
||||
*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
|
||||
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Opsi
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `fromat` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | Gaya penataan untuk modul. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `fromat` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | Gaya penataan untuk modul. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variabel
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variabel | Deskripsi |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Menyalin nilai dari opsi `style` |
|
||||
| Variabel | Deskripsi |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Menyalin nilai dari opsi `style` |
|
||||
|
||||
*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variabel | Deskripsi |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
Secara bawaan, modul akan aktif jika beberapa syarat berikut telah terpenuhi:
|
||||
|
||||
- Direktori ini memiliki berkas `pom.xml`.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Opsi
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
|
||||
| `fromat` | `'via [$symbol($version )]($style)'` | Format dari modul. |
|
||||
| `version_format` | `'v${raw}'` | Format dari versi. Variabel yang tersedia adalah `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Ekstensi mana yang sebaiknya memicu modul ini. |
|
||||
| `detect_files` | `['pom.xml']` | filenames mana yang sebaiknya memicu modul ini. |
|
||||
| `detect_folders` | `['.mvn']` | Folder mana yang sebaiknya memicul modul ini. |
|
||||
| `style` | `'bold bright-cyan'` | Gaya penataan untuk modul. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variabel
|
||||
|
||||
| Variabel | Contoh | Deskripsi |
|
||||
| -------- | -------- | --------------------------------- |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Menyalin nilai dari opsi `symbol` |
|
||||
| style* | | Menyalin nilai dari opsi `style` |
|
||||
|
||||
*: Variabel tersebut hanya dapat digunakan sebagai bagian dari penataan string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Ekstensi mana yang sebaiknya memicu modul ini |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | filenames mana yang sebaiknya memicu modul ini |
|
||||
| `detect_folders` | `[]` | Folder mana yang sebaiknya memicul modul ini |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variabel
|
||||
|
||||
| Variabel | Contoh | Deskripsi |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Menyalin nilai dari opsi `symbol` |
|
||||
| style | `'yellow bold'` | Menyalin nilai dari opsi `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variabel | Contoh | Deskripsi |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Menyalin nilai dari opsi `symbol` |
|
||||
| style | `'yellow bold'` | Menyalin nilai dari opsi `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Contoh
|
||||
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Opsi
|
||||
|
||||
| Opsi | Bawaan | Deskripsi |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Contoh
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ Jika kamu ingin mengkustomisasi Starship lebih jauh:
|
||||
|
||||
## 🤝 Berkontribusi
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Aggiungi quanto segue alla fine di `Microsoft.PowerShell_profile.ps1`. Puoi controllare la posizione di questo file interrogando la variabile `$PROFILE` in PowerShell. Tipicamente il percorso è `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` oppure `~/.config/powershell/Microsoft.PowerShell_profile.ps1` su -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configurazione
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Opzioni
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | Lo stile per il modulo. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Esempio | Descrizione |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Opzioni
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Esempio | Descrizione |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Opzioni
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Esempio | Descrizione |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Stile delle Stringhe
|
||||
|
||||
Le stringhe di stile sono un elenco di parole, separate da spazi bianchi. Le parole non sono sensibili alle maiuscole (cioè `grassetto` e `BoLd` sono considerate la stessa stringa). Ogni parola può essere una delle seguenti:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `style` | `'bold blue'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Descrizione |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Descrizione |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `style` | `'bold blue'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['mix.exs']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `style` | `'bold purple'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `style` | `'cyan bold'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Opzioni
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `descrizione` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Opzione | Default | Descrizione |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `descrizione` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | Lo stile per il modulo. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | Lo stile per il modulo. |
|
||||
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | Lo stile per il modulo. |
|
||||
| `detect_extensions` | `['fnl']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Opzioni
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | Lo stile per il modulo. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Opzione | Default | Descrizione |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | Lo stile per il modulo. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Descrizione |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Descrizione |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | Descrizione |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | Lo stile per il modulo. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `[]` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Opzioni
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['pom.xml']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `['.mvn']` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `style` | `'bold bright-cyan'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Esempio | Descrizione |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Quali estensioni dovrebbero attivare questo modulo |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Quali nomi di file dovrebbero attivare questo modulo |
|
||||
| `detect_folders` | `[]` | Quali cartelle dovrebbero attivare questo modulo |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Esempio | Descrizione |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variable | Esempio | Descrizione |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Esempio
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | Il formato della versione. Le variabili disponibili sono `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Quali estensioni dovrebbero attivare questo modulo. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Quali nomi di file dovrebbero attivare questo modulo. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Quali cartelle dovrebbero attivare questo modulo. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | Lo stile per il modulo. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Opzioni
|
||||
|
||||
| Opzione | Default | Descrizione |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Esempio
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ Se stai cercando di personalizzare ulteriormente Starship:
|
||||
|
||||
## 🤝 Contribuire
|
||||
|
||||
Siamo sempre alla ricerca di collaboratori di **tutti i livelli**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
Siamo sempre alla ricerca di collaboratori di **tutti i livelli**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Se parli correntemente una lingua diversa dall'inglese, apprezziamo molto qualsiasi aiuto per mantenere i nostri documenti tradotti e aggiornati in altre lingue. Se desideri collaborare, le traduzioni possono essere fornite su [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
`Microsoft.PowerShell_profile.ps1` の最後に以下を追記してください。 PowerShell 上で `$PROFILE` 変数を問い合わせると、ファイルの場所を確認できます。 通常、パスは `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` または -Nix 上では `~/.config/powershell/Microsoft.PowerShell_profile.ps1` です。
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Starship では、 `contination_prompt` オプションを使用して継続プ
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### 設定
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | module のフォーマットです。 |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | モジュールのスタイルです。 |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | オプション `symbol` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
|
||||
#### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | module のフォーマットです。 |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [この表の下を参照してください](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | オプション `symbol` の値をミラーする |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
|
||||
#### 設定例
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | module のフォーマットです。 |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [この表の下を参照してください](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | オプション `symbol` の値をミラーする |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: この変数はスタイル文字列の一部としてのみ使用できます
|
||||
|
||||
#### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## スタイルの設定
|
||||
|
||||
スタイル文字列は空白で区切られた単語のリストです。 大文字小文字を区別しません(例えば、 `bold` と`BoLd` は同じだとみなされます)。 それぞれ以下のいずれか一つが該当します。
|
||||
|
||||
+180
-61
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ very-long-subscription-name = 'vlsn'
|
||||
| `full_symbol` | `' '` | バッテリーが満タンのときに表示される記号です。 |
|
||||
| `charging_symbol` | `' '` | バッテリーの充電中に表示される記号です。 |
|
||||
| `discharging_symbol` | `' '` | バッテリーが放電しているときに表示される記号です。 |
|
||||
| `unknown_symbol` | `' '` | バッテリー状態が不明なときに表示される記号です。 |
|
||||
| `unknown_symbol` | `' '` | バッテリー状態が不明なときに表示される記号です。 |
|
||||
| `empty_symbol` | `' '` | バッテリーが空のときに表示される記号です。 |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | module のフォーマットです。 |
|
||||
| `display` | [link](#battery-display) | モジュールの閾値とスタイルを表示します。 |
|
||||
@@ -1140,11 +1147,31 @@ format = 'via [🦕 $version](green bold) '
|
||||
|
||||
| 詳細設定 | デフォルト | 説明 |
|
||||
| --------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | パスに適用される置換の辞書。 |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | fish shellのpwdパスロジックを適用するときに使用する文字数です。 |
|
||||
| `use_logical_path` | `true` | `true` の場合、シェルによって `PWD` または `--logical-path` を通して指定される起点からの論理パスを表示します。 `false` の場合、代わりにシンボリックリンクを解決したファイルシステム上の物理パスを表示します。 |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. ※これは fish 形式の PWD を無効化します。
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. ※これは fish 形式の PWD を無効化します。 It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | 種類 | 説明 |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1430,14 +1457,15 @@ format = 'via [ $version](cyan bold) '
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------- | ------------------------------ | -------------------------------------- |
|
||||
| `symbol` | `""` | 環境変数を表示する前に使用される記号です。 |
|
||||
| `variable` | | 表示される環境変数です。 |
|
||||
| `default` | | 上のvariableが定義されていない場合に表示されるデフォルトの値です。 |
|
||||
| `format` | `"with [$env_value]($style) "` | module のフォーマットです。 |
|
||||
| `description` | `"<env_var module>"` | `starship explain` 実行の際に表示されるモジュールの説明。 |
|
||||
| `disabled` | `false` | `env_var`モジュールを無効にします。 |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------- | ------------------------------------- | -------------------------------------- |
|
||||
| `symbol` | `""` | 環境変数を表示する前に使用される記号です。 |
|
||||
| `variable` | | 表示される環境変数です。 |
|
||||
| `default` | | 上のvariableが定義されていない場合に表示されるデフォルトの値です。 |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | module のフォーマットです。 |
|
||||
| `description` | `"<env_var module>"` | `starship explain` 実行の際に表示されるモジュールの説明。 |
|
||||
| `disabled` | `false` | `env_var`モジュールを無効にします。 |
|
||||
| `style` | `"black bold dimmed"` | モジュールのスタイルです。 |
|
||||
|
||||
### 変数
|
||||
|
||||
@@ -1445,7 +1473,7 @@ format = 'via [ $version](cyan bold) '
|
||||
| --------- | ------------------------------------------- | ----------------------- |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | オプション`variable`の値 |
|
||||
| symbol | | オプション `symbol` の値をミラーする |
|
||||
| style\* | `black bold dimmed` | オプション `style` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
|
||||
|
||||
@@ -1931,44 +1959,60 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| -------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット |
|
||||
| `conflicted` | `'='` | このブランチにはマージの競合があります。 |
|
||||
| `ahead` | `'⇡'` | `ahead`のフォーマット |
|
||||
| `behind` | `'⇣'` | `behind`のフォーマット |
|
||||
| `diverged` | `'⇕'` | `diverged`のフォーマット |
|
||||
| `up_to_date` | `''` | `up_to_date`のフォーマット |
|
||||
| `untracked` | `'?'` | `untracked`のフォーマット |
|
||||
| `stashed` | `'\$'` | `stashed`のフォーマット |
|
||||
| `modified` | `'!'` | `modified`のフォーマット |
|
||||
| `staged` | `'+'` | `staged`のフォーマット |
|
||||
| `renamed` | `'»'` | `renamed`のフォーマット |
|
||||
| `deleted` | `'✘'` | `deleted`のフォーマット |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | モジュールのスタイルです。 |
|
||||
| `ignore_submodules` | `false` | サブモジュールの変更を無視します。 |
|
||||
| `disabled` | `false` | `git_status`モジュールを無効にします。 |
|
||||
| `windows_starship` | | WSLでWindowsディレクトリの`git_status`で使用するWindows Starshipの実行ファイルのLinux上でのパス。 |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ---------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | `git_status` のデフォルトフォーマット |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | モジュールのスタイルです。 |
|
||||
| `ignore_submodules` | `false` | サブモジュールの変更を無視します。 |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | `git_status`モジュールを無効にします。 |
|
||||
| `windows_starship` | | WSLでWindowsディレクトリの`git_status`で使用するWindows Starshipの実行ファイルのLinux上でのパス。 |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### 変数
|
||||
|
||||
` format` 内では以下の変数が利用できます。
|
||||
|
||||
| 変数 | 説明 |
|
||||
| -------------- | ------------------------------------------------------------------------------------ |
|
||||
| `all_status` | `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` のショートカット |
|
||||
| `ahead_behind` | 現在のリポジトリに応じてフォーマット文字列 `diverged`, `ahead`, `behind`, `up_to_date` の何れかを表示します。 |
|
||||
| `conflicted` | このブランチにマージコンフリクトがある場合、 `conflicted` を表示します。 |
|
||||
| `untracked` | 作業ディレクトリに追跡されていないファイルがある場合、 `untracked` を表示します。 |
|
||||
| `stashed` | Stash がローカルリポジトリに存在する場合、 `stashed` を表示します。 |
|
||||
| `modified` | 作業ディレクトリのファイルに変更がある場合に、 `modified` を表示します。 |
|
||||
| `staged` | インデックスに新しく追加されたファイルがあるときに、 `staged` を表示します。 |
|
||||
| `renamed` | インデックスに名前が変更されたファイルがあるときに、 `renamed` を表示します。 |
|
||||
| `deleted` | インデックスに削除されたファイルがあるときに、 `deleted` を表示します。 |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | オプション `style` の値をミラーする |
|
||||
| 変数 | 説明 |
|
||||
| ---------------------- | --------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | 現在のリポジトリに応じてフォーマット文字列 `diverged`, `ahead`, `behind`, `up_to_date` の何れかを表示します。 |
|
||||
| `conflicted` | このブランチにマージコンフリクトがある場合、 `conflicted` を表示します。 |
|
||||
| `untracked` | 作業ディレクトリに追跡されていないファイルがある場合、 `untracked` を表示します。 |
|
||||
| `stashed` | Stash がローカルリポジトリに存在する場合、 `stashed` を表示します。 |
|
||||
| `modified` | 作業ディレクトリのファイルに変更がある場合に、 `modified` を表示します。 |
|
||||
| `staged` | インデックスに新しく追加されたファイルがあるときに、 `staged` を表示します。 |
|
||||
| `renamed` | インデックスに名前が変更されたファイルがあるときに、 `renamed` を表示します。 |
|
||||
| `deleted` | インデックスに削除されたファイルがあるときに、 `deleted` を表示します。 |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | オプション `style` の値をミラーする |
|
||||
|
||||
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
|
||||
|
||||
@@ -1979,7 +2023,7 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
| `ahead_count` | 追跡対象のブランチよりこちらが進んでいるコミット数 |
|
||||
| `behind_count` | 追跡対象のブランチよりこちらが遅れているコミット数 |
|
||||
|
||||
`conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` および `deleted` の中で以下の変数が使えます:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| 変数 | 説明 |
|
||||
| ------- | ------------- |
|
||||
@@ -2745,6 +2789,41 @@ disabled = false
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
デフォルトでは次の条件のいずれかが満たされると、モジュールが表示されます。
|
||||
|
||||
- 現在のディレクトリに`pom.xml`ファイルが含まれている.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------ |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | module のフォーマットです。 |
|
||||
| `version_format` | `'v${raw}'` | バージョンのフォーマット。 使用可能な変数は`raw`、`major`、`minor`と`patch`です。 |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | どの拡張子がこのモジュールをアクティブにするか |
|
||||
| `detect_files` | `['pom.xml']` | どのファイル名がこのモジュールをアクティブにするか |
|
||||
| `detect_folders` | `['.mvn']` | どのフォルダーがこのモジュールをアクティブにするか |
|
||||
| `style` | `'bold bright-cyan'` | モジュールのスタイルです。 |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| ------- | -------- | ----------------------- |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | オプション `symbol` の値をミラーする |
|
||||
| style* | | オプション `style` の値をミラーする |
|
||||
|
||||
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
|
||||
|
||||
## メモリ使用量
|
||||
|
||||
`memory_usage` モジュールは、現在のシステムメモリとスワップ使用量を示します。
|
||||
@@ -3749,6 +3828,7 @@ The `python` module shows the currently installed version of [Python](https://ww
|
||||
| `detect_extensions` | `['py', 'ipynb']` | どの拡張子がこのモジュールをアクティブにするか |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | どのファイル名がこのモジュールをアクティブにするか |
|
||||
| `detect_folders` | `[]` | どのフォルダーがこのモジュールをアクティブにするか |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | `python`モジュールを無効にします。 |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ The `python` module shows the currently installed version of [Python](https://ww
|
||||
|
||||
### 変数
|
||||
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | オプション `symbol` の値をミラーする |
|
||||
| style | `'yellow bold'` | オプション `style` の値をミラーする |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | オプション `symbol` の値をミラーする |
|
||||
| style | `'yellow bold'` | オプション `style` の値をミラーする |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### 設定例
|
||||
|
||||
@@ -4138,8 +4218,8 @@ The `shlvl` module shows the current [`SHLVL`](https://tldp.org/LDP/abs/html/int
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| --------- | --- | ---------------------------- |
|
||||
| shlvl | `3` | The current value of `SHLVL` |
|
||||
| symbol | | オプション `symbol` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
| symbol | | オプション `symbol` の値をミラーします |
|
||||
| style\* | | オプション `style` の値をミラーします |
|
||||
|
||||
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
|
||||
|
||||
@@ -4185,8 +4265,8 @@ The `singularity` module shows the current [Singularity](https://sylabs.io/singu
|
||||
| 変数 | 設定例 | 説明 |
|
||||
| --------- | ------------ | ----------------------------- |
|
||||
| env | `centos.img` | The current Singularity image |
|
||||
| symbol | | オプション `symbol` の値をミラーします |
|
||||
| style\* | | オプション `style` の値をミラーします |
|
||||
| symbol | | オプション `symbol` の値をミラーする |
|
||||
| style\* | | オプション `style` の値をミラーする |
|
||||
|
||||
*: この変数は、スタイル文字列の一部としてのみ使用することができます。
|
||||
|
||||
@@ -4665,6 +4745,45 @@ format = 'via [⍱ $version](bold white) '
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### オプション
|
||||
|
||||
| オプション | デフォルト | 説明 |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### 設定例
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
`vcsh` モジュールは、現在アクティブな [VCSH](https://github.com/RichiH/vcsh) リポジトリを表示します。 モジュールは、現在使用中のリポジトリがある場合にのみ表示されます。
|
||||
|
||||
@@ -408,7 +408,7 @@ Starshipのさらなるカスタマイズを目指すなら以下を参考にし
|
||||
|
||||
## 🤝 貢献
|
||||
|
||||
私たちは常に**すべてのスキルレベル**の貢献者を探しています! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
私たちは常に**すべてのスキルレベル**の貢献者を探しています! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
あなたが英語以外の言語に堪能な場合、ドキュメントの翻訳と更新に協力していただけると嬉しいです。 協力してくれる場合、翻訳は [Starship Crowdin](https://translate.starship.rs/) から貢献できます。
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
|
||||
## [Catppuccin Powerline](./catppuccin-powerline.md)
|
||||
|
||||
This preset is a minimally modified version of [Gruvbox Rainbow](./gruvbox-rainbow.md) using the [Catppuccin](https://github.com/catppuccin/catppuccin) theme palette.
|
||||
[Catppuccin](https://github.com/catppuccin/catppuccin) のテーマを利用して [Gruvbox Rainbow](./gruvbox-rainbow.md) に最小限の変更を加えたプリセットです。
|
||||
|
||||
[](./catppuccin-powerline)
|
||||
[](./catppuccin-powerline)
|
||||
|
||||
@@ -20,7 +20,7 @@ starship preset catppuccin-powerline -o ~/.config/starship.toml
|
||||
|
||||
- `catppuccin_mocha`
|
||||
- `catppuccin_frappe`
|
||||
- `catppuccin_macciato`
|
||||
- `catppuccin_macchiato`
|
||||
- `catppuccin_latte`
|
||||
|
||||
[クリックしてTOMLファイルをダウンロード](/presets/toml/catppuccin-powerline.toml)
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### 설정
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `기호` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| | 예시 | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| 기호 | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### 예시
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `기호` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| | 예시 | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| 기호 | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### 예시
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `기호` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| | 예시 | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| 기호 | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### 예시
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## 스타일 문자열
|
||||
|
||||
스타일 문자열은 공백으로 구분된 단어 목록입니다. 단어는 대소문자를 구분하지 않습니다 (즉, `bold`와 `BoLd`는 동일한 문자열로 간주됩니다). 각 단어는 다음 중 하나가 될 수 있습니다:
|
||||
|
||||
+328
-209
File diff suppressed because it is too large
Load Diff
@@ -408,7 +408,7 @@ Starship을 추가로 커스터마이징 하고싶다면:
|
||||
|
||||
## 🤝 기여하기
|
||||
|
||||
우리는 언제나 **기술 수준에 관계없이** 기여자를 찾고 있습니다! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
우리는 언제나 **기술 수준에 관계없이** 기여자를 찾고 있습니다! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
영어 이외의 언어에 유창하시다면, 저희 문서를 다른 언어로 최신화하는 데 도움을 주시면 대단히 감사하겠습니다. 번역에 도움을 주고자 한다면, [Starship Crowdin](https://translate.starship.rs/) 에서 기여할 수 있습니다.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ De `buf` module laat de huidige geïnstalleerde versie van [Buf](https://buf.bui
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Description |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ De `elixir` module laat de huidige geïnstalleerde versie van [Elixir](https://e
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ De `elm` module laat de huidige geïnstalleerde versie van [Elm](https://elm-lan
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ De `erlang` module laat de huidige geïnstalleerde versie van [Erlang/OTP](https
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ De `fennel` module laat de huidige geïnstalleerde versie van [Fennel](https://f
|
||||
| `style` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
+18
-18
@@ -1,40 +1,40 @@
|
||||
# Frequently Asked Questions
|
||||
# Veelgestelde Vragen
|
||||
|
||||
## What is the configuration used in the demo GIF?
|
||||
## Wat is de configuratie gebruikt in de demo GIF?
|
||||
|
||||
- **Terminal Emulator**: [iTerm2](https://iterm2.com/)
|
||||
- **Theme**: Minimal
|
||||
- **Color Scheme**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Font**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Thema**: Minimal
|
||||
- **Kleurschema**: [Snazzy](https://github.com/sindresorhus/iterm2-snazzy)
|
||||
- **Lettertype**: [FiraCode Nerd Font](https://www.nerdfonts.com/font-downloads)
|
||||
- **Shell**: [Fish Shell](https://fishshell.com/)
|
||||
- **Configuration**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Configuratie**: [matchai's Dotfiles](https://github.com/matchai/dotfiles/blob/b6c6a701d0af8d145a8370288c00bb9f0648b5c2/.config/fish/config.fish)
|
||||
- **Prompt**: [Starship](https://starship.rs/)
|
||||
|
||||
## How do I get command completion as shown in the demo GIF?
|
||||
## Hoe kan ik de opdracht voltooien zoals weergegeven in de demo GIF?
|
||||
|
||||
Completion support, or autocomplete, is provided by your shell of choice. In the case of the demo, the demo was done with [Fish Shell](https://fishshell.com/), which provides completions by default. If you use Z Shell (zsh), I'd suggest taking a look at [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
Ondersteuning voor voltooiing, of automatische voltooiing, wordt aangeboden door jouw opdrachtshell van jouw keuze. In het geval van de demo werd de demo gedaan met [Fish Shell](https://fishshell.com/), die standaard automatische voltooiing biedt. Als je Z Shell (zsh) gebruikt, zou ik voorstellen een kijkje te nemen bij [zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions).
|
||||
|
||||
## Do top level `format` and `<module>.disabled` do the same thing?
|
||||
## Doen het hoogste niveau `format` en `<module>.disabled` hetzelfde?
|
||||
|
||||
Yes, they can both be used to disable modules in the prompt. If all you plan to do is disable modules, `<module>.disabled` is the preferred way to do so for these reasons:
|
||||
Ja, ze kunnen beide worden gebruikt om modules uit te schakelen in de prompt. Als u alleen modules wilt uitschakelen, is `<module>.disabled` de beste manier om dit te doen om deze redenen:
|
||||
|
||||
- Disabling modules is more explicit than omitting them from the top level `format`
|
||||
- Newly created modules will be added to the prompt as Starship is updated
|
||||
- Het uitschakelen van modules is uitdrukkelijker dan het weglaten van deze op het bovenste niveau `format`
|
||||
- Nieuw aangemaakte modules zullen worden toegevoegd aan de prompt als Starship wordt bijgewerkt
|
||||
|
||||
## The docs say Starship is cross-shell. Why isn't my preferred shell supported?
|
||||
## De documentatie zegt dat Starship cross-shell is. Waarom wordt mijn voorkeursopdrachtshell niet ondersteund?
|
||||
|
||||
The way Starship is built, it should be possible to add support for virtually any shell. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
De manier waarop Starship wordt gebouwd, moet het mogelijk zijn om bijna elke opdrachtshell te ondersteunen. The starship binary is stateless and shell agnostic, so as long as your shell supports prompt customization and shell expansion, Starship can be used.
|
||||
|
||||
Here's a small example getting Starship working with bash:
|
||||
Hier is een klein voorbeeld van het werken met een bash:
|
||||
|
||||
```sh
|
||||
# Get the status code from the last command executed
|
||||
# Haal de statuscode op van het laatst uitgevoerde commando
|
||||
STATUS=$?
|
||||
|
||||
# Get the number of jobs running.
|
||||
# Haal het aantal draaiende taken op.
|
||||
NUM_JOBS=$(jobs -p | wc -l)
|
||||
|
||||
# Set the prompt to the output of `starship prompt`
|
||||
# Stel het prompt in naar de uitvoer van `starship prompt`
|
||||
PS1="$(starship prompt --status=$STATUS --jobs=$NUM_JOBS)"
|
||||
```
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ If you're looking to further customize Starship:
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ Activeer de `programs.starship` module in het `home.nix` bestand en voeg je inst
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
# Configuration written to ~/.config/starship.toml
|
||||
# Configuratie geschreven naar ~/.config/starship.toml
|
||||
settings = {
|
||||
# add_newline = false;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Description |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ If you're looking to further customize Starship:
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Dodaj na koniec pliku `Microsoft.PowerShell_profile.ps1`. Możesz sprawdzić lokalizację tego pliku odczytując zmienną środowiskową `$PROFILE` w PowerShell. Zazwyczaj jest to `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` lub `~/.config/powershell/Microsoft.PowerShell_profile.ps1` na -Nixie.
|
||||
|
||||
@@ -138,14 +138,14 @@ onMounted(() => {
|
||||
|
||||
> [!WARNING] Only elvish v0.18 or higher is supported.
|
||||
|
||||
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
|
||||
Dodaj następujący fragment na końcu pliku <0>~/.config/elvish/rc.elv</0> (<0>%AppData%\elvish\rc.elv</0> w systemie Windows):
|
||||
|
||||
```sh
|
||||
# ~/.elvish/rc.elv
|
||||
|
||||
eval (starship init elvish)
|
||||
```
|
||||
For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
|
||||
W wersjach elvish starszych niż v0.21.0 plik konfiguracyjny może znajdować się w lokalizacji `~/.elvish/rc.elv`.
|
||||
|
||||
|
||||
#### Tcsh
|
||||
@@ -163,7 +163,7 @@ onMounted(() => {
|
||||
|
||||
> [!WARNING] This will change in the future. Działa tylko na Nushell v0.96+.
|
||||
|
||||
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
|
||||
Dodaj następujący fragment na końcu konfiguracji Nushell (znajdziesz go, uruchamiając polecenie <0>$nu.config-path</0> w Nushell):
|
||||
|
||||
```sh
|
||||
mkdir ($nu.data-dir | path join "vendor/autoload")
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
Mimo że Starship jest wszechstronny, czasem nie wystarczy modyfikacja pliku `starship.toml` żeby osiągnąć zamierzony efekt. Na tej stronie opisano bardziej zaawansowane sposoby konfigurowania używane w Starship.
|
||||
|
||||
> [!WARNING] The configurations in this section are subject to change in future releases of Starship.
|
||||
> [!WARNING] Konfiguracje opisane w tej sekcji mogą ulec zmianie w przyszłych wersjach programu Starship.
|
||||
|
||||
## TransientPrompt in PowerShell
|
||||
## TransientPrompt w PowerShell
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `Enable-TransientPrompt` in the shell session. To make it permanent, put this statement in your `$PROFILE`. Transience can be disabled on-the-fly with `Disable-TransientPrompt`.
|
||||
Możliwe jest zastąpienie poprzednio komunikatu niestandardowym ciągiem znaków. Jest to przydatne w przypadkach, gdy nie zawsze potrzebne są wszystkie informacje zawarte w monicie. Aby to włączyć, uruchom polecenie `Enable-TransientPrompt` w sesji powłoki. Aby ustawić to na stałe, umieść to oświadczenie w swoim `$PROFILE`. Tymczasowość można wyłączyć w locie za pomocą `Disable-TransientPrompt`.
|
||||
|
||||
By default, the left side of input gets replaced with `>`. To customize this, define a new function called `Invoke-Starship-TransientFunction`. For example, to display Starship's `character` module here, you would do
|
||||
Domyślnie lewa strona danych wejściowych zostaje zastąpiona przez `>`. Aby dostosować to ustawienie, zdefiniuj nową funkcję o nazwie `Invoke-Starship-TransientFunction`. Na przykład, aby wyświetlić tutaj moduł `character` programu Starship, należy wykonać następujące czynności
|
||||
|
||||
```powershell
|
||||
function Invoke-Starship-TransientFunction {
|
||||
@@ -22,7 +22,7 @@ Enable-TransientPrompt
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Cmd
|
||||
|
||||
Clink allows you to replace the previous-printed prompt with custom strings. This is useful in cases where all the prompt information is not always needed. To enable this, run `clink set prompt.transient <value>` where \<value\> can be one of:
|
||||
Clink pozwala zastąpić poprzednio wydrukowany monit niestandardowymi ciągami. Jest to przydatne w przypadkach, gdy nie zawsze potrzebne są wszystkie informacje zawarte w monicie. Aby to włączyć, uruchom `clink set prompt.transient <value>` gdzie \<value\> może być:
|
||||
|
||||
- `always`: always replace the previous prompt
|
||||
- `same_dir`: replace the previous prompt only if the working directory is same
|
||||
@@ -30,7 +30,7 @@ Clink allows you to replace the previous-printed prompt with custom strings. Thi
|
||||
|
||||
You need to do this only once. Make the following changes to your `starship.lua` to customize what gets displayed on the left and on the right:
|
||||
|
||||
- By default, the left side of input gets replaced with `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. For example, to display Starship's `character` module here, you would do
|
||||
- Domyślnie lewa strona danych wejściowych zostaje zastąpiona przez `>`. To customize this, define a new function called `starship_transient_prompt_func`. This function receives the current prompt as a string that you can utilize. Na przykład, aby wyświetlić tutaj moduł `character` programu Starship, należy wykonać następujące czynności
|
||||
|
||||
```lua
|
||||
function starship_transient_prompt_func(prompt)
|
||||
@@ -52,11 +52,11 @@ load(io.popen('starship init cmd'):read("*a"))()
|
||||
|
||||
## TransientPrompt and TransientRightPrompt in Fish
|
||||
|
||||
It is possible to replace the previous-printed prompt with a custom string. This is useful in cases where all the prompt information is not always needed. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
|
||||
Możliwe jest zastąpienie poprzednio komunikatu niestandardowym ciągiem znaków. Jest to przydatne w przypadkach, gdy nie zawsze potrzebne są wszystkie informacje zawarte w monicie. To enable this, run `enable_transience` in the shell session. To make it permanent, put this statement in your `~/.config/fish/config.fish`. Transience can be disabled on-the-fly with `disable_transience`.
|
||||
|
||||
Note that in case of Fish, the transient prompt is only printed if the commandline is non-empty, and syntactically correct.
|
||||
|
||||
- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. For example, to display Starship's `character` module here, you would do
|
||||
- By default, the left side of input gets replaced with a bold-green `❯`. To customize this, define a new function called `starship_transient_prompt_func`. Na przykład, aby wyświetlić tutaj moduł `character` programu Starship, należy wykonać następujące czynności
|
||||
|
||||
```fish
|
||||
function starship_transient_prompt_func
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Konfiguracja
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Zmienne | Example | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Zmienne | Example | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Zmienne | Example | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+206
-87
@@ -1,6 +1,6 @@
|
||||
# Konfiguracja
|
||||
|
||||
To get started configuring starship, create the following file: `~/.config/starship.toml`.
|
||||
Aby rozpocząć konfigurację starship, utwórz następujący plik: `~/.config/starship.toml`.
|
||||
|
||||
```sh
|
||||
mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
@@ -9,22 +9,22 @@ mkdir -p ~/.config && touch ~/.config/starship.toml
|
||||
Cała konfiguracja starship jest wykonywana w tym pliku [TOML](https://github.com/toml-lang/toml):
|
||||
|
||||
```toml
|
||||
# Get editor completions based on the config schema
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
# Uzyskaj uzupełnienia edytora na podstawie schematu konfiguracyjnego
|
||||
"$schema" = 'https://starship.rs/config-schema. son'
|
||||
|
||||
# Inserts a blank line between shell prompts
|
||||
# Wstawia pustą linię między monitami
|
||||
add_newline = true
|
||||
|
||||
# Replace the '❯' symbol in the prompt with '➜'
|
||||
[character] # The name of the module we are configuring is 'character'
|
||||
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
|
||||
# Zastąp symbol '<unk> ' w monicie symbolem '<unk> '
|
||||
[character] # Nazwa modułu, który konfigurujemy to 'character'
|
||||
success_symbol = '[<unk> ](bold green)' # Segment 'success_symbol' jest ustawiony na '<unk> ' w kolorze 'bold green' (pogrubiony zielony)
|
||||
|
||||
# Disable the package module, hiding it from the prompt completely
|
||||
# Wyłącz moduł paczki, ukrywając go całkowicie
|
||||
[package]
|
||||
disabled = true
|
||||
```
|
||||
|
||||
### Config File Location
|
||||
### Lokalizacja pliku konfiguracyjnego
|
||||
|
||||
Możesz zmienić domyślną lokalizację pliku konfiguracyjnego za pomocą zmiennej środowiskowej `STARSHIP_CONFIG`:
|
||||
|
||||
@@ -38,7 +38,7 @@ Odpowiednikiem dla PowerShell (Windows) jest dodanie następującej linii w twoi
|
||||
$ENV:STARSHIP_CONFIG = "$HOME\example\non\default\path\starship.toml"
|
||||
```
|
||||
|
||||
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
|
||||
Lub dla Cmd (Windows) byłoby dodanie tej linii w twoim `starship.lua`:
|
||||
|
||||
```lua
|
||||
os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\starship.toml')
|
||||
@@ -46,7 +46,7 @@ os.setenv('STARSHIP_CONFIG', 'C:\\Users\\user\\example\\non\\default\\path\\star
|
||||
|
||||
### Logi
|
||||
|
||||
By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to an instance of your terminal. Można to zmienić za pomocą zmiennej środowiskowej `STARSHIP_CACHE`:
|
||||
Domyślnie, logi ostrzerzenia i błędy starship trafiają do pliku `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, gdzie klucz sesji odpowida instancji twojego terminala. Można to zmienić za pomocą zmiennej środowiskowej `STARSHIP_CACHE`:
|
||||
|
||||
```sh
|
||||
export STARSHIP_CACHE=~/.starship/cache
|
||||
@@ -58,7 +58,7 @@ Odpowiednikiem dla PowerShell (Windows) jest dodanie następującej linii w twoi
|
||||
$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp"
|
||||
```
|
||||
|
||||
Or for Cmd (Windows) would be adding this line to your `starship.lua`:
|
||||
Lub dla Cmd (Windows) byłoby dodanie tej linii w twoim `starship.lua`:
|
||||
|
||||
```lua
|
||||
os.setenv('STARSHIP_CACHE', 'C:\\Users\\user\\AppData\\Local\\Temp')
|
||||
@@ -74,11 +74,11 @@ W ramach konwencji większość modułów posiada przedrostek w domyślnym kolor
|
||||
|
||||
### Strings
|
||||
|
||||
In TOML syntax, [text values](https://toml.io/en/v1.0.0#string) are declared with `'`, `"`, `'''`, or `"""`.
|
||||
W składni TOML [wartości tekstowe](https://toml.io/en/v1.0.0#string) są deklarowane z `'`, `"`, `'''`lub `"""`.
|
||||
|
||||
The following Starship syntax symbols have special usage in a format string and must be escaped to display as that character: `$ [ ] ( )`.
|
||||
|
||||
| Symbol | Type | Notes |
|
||||
| Symbol | Typ | Notatka |
|
||||
| ------ | ------------------------- | ------------------------------------------------------ |
|
||||
| `'` | literal string | less escaping |
|
||||
| `"` | string | more escaping |
|
||||
@@ -98,7 +98,7 @@ format = "☺\\☻ "
|
||||
format = '\[\$\] '
|
||||
```
|
||||
|
||||
When using line breaks, multi-line declarations can be used. For example, if you want to print a `$` symbol on a new line, the following values for `format` are equivalent:
|
||||
When using line breaks, multi-line declarations can be used. Dla przykładu, jeżeli chcesz wyświetlić symbol `$` na osobnej linii, następujące wartości `format` są równoważne:
|
||||
|
||||
```toml
|
||||
# with literal string
|
||||
@@ -134,7 +134,7 @@ Moduły wypisują swoje zmienne przy użyciu ciągów formatujących. Większoś
|
||||
|
||||
#### Zmienne
|
||||
|
||||
Zmienna zawiera symbol `$`, po którym następuje nazwa zmiennej. The name of a variable can only contain letters, numbers and `_`.
|
||||
Zmienna zawiera symbol `$`, po którym następuje nazwa zmiennej. Nazwa zmiennej może zawierać jedynie litery, cyfry, i `_`.
|
||||
|
||||
Na przykład:
|
||||
|
||||
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Description |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Typ | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `zmienne` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `zmienne` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Zmienne | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Zmienne | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Zmienne | Description |
|
||||
| ------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Zmienne | Example | Description |
|
||||
| ------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3406,7 +3485,7 @@ Zorin = "🔹 "
|
||||
| --------- | ------------ | ------------------------------------------------------------------ |
|
||||
| symbol | `🎗️` | The current operating system symbol from advanced option `symbols` |
|
||||
| name | `Arch Linux` | The current operating system name |
|
||||
| type | `Arch` | The current operating system type |
|
||||
| typ | `Arch` | The current operating system type |
|
||||
| codename | | The current operating system codename, if applicable |
|
||||
| edition | | The current operating system edition, if applicable |
|
||||
| version | | The current operating system version, if applicable |
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Zmienne | Example | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Zmienne | Example | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
+10
-10
@@ -306,13 +306,13 @@ load(io.popen('starship init cmd'):read("*a"))()
|
||||
<details>
|
||||
<summary>Elvish</summary>
|
||||
|
||||
Add the following to the end of `~/.config/elvish/rc.elv` (`%AppData%\elvish\rc.elv` on Windows):
|
||||
Dodaj następujący fragment na końcu pliku <0>~/.config/elvish/rc.elv</0> (<0>%AppData%\elvish\rc.elv</0> w systemie Windows):
|
||||
|
||||
```sh
|
||||
eval (starship init elvish)
|
||||
```
|
||||
|
||||
Note: Only Elvish v0.18+ is supported. For elvish versions prior to v0.21.0 the config file might instead be `~/.elvish/rc.elv`
|
||||
Uwaga: Obsługiwana jest tylko wersja Elvish v0.18+. W wersjach elvish starszych niż v0.21.0 plik konfiguracyjny może znajdować się w lokalizacji `~/.elvish/rc.elv`.
|
||||
|
||||
</details>
|
||||
|
||||
@@ -341,7 +341,7 @@ eval $(starship init ion)
|
||||
<details>
|
||||
<summary>Nushell</summary>
|
||||
|
||||
Add the following to the end of your Nushell configuration (find it by running `$nu.config-path` in Nushell):
|
||||
Dodaj następujący fragment na końcu konfiguracji Nushell (znajdziesz go, uruchamiając polecenie <0>$nu.config-path</0> w Nushell):
|
||||
|
||||
```sh
|
||||
mkdir ($nu.data-dir | path join "vendor/autoload")
|
||||
@@ -408,7 +408,7 @@ Lecz jeśli chcesz nieco dostosować Starship:
|
||||
|
||||
## 🤝Wspomóż nas
|
||||
|
||||
Zawsze szukamy pomocy od osób **na każdym poziomie zaawansowania**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
Zawsze szukamy pomocy od osób **na każdym poziomie zaawansowania**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Jeśli płynnie władasz językiem innym niż angielski, bardzo doceniamy każdą pomoc w tłumaczeniu dokumentacji. Jeśli chcesz pomóc, tłumaczenia można dodawać na [Crowdin Starship](https://translate.starship.rs/).
|
||||
|
||||
@@ -428,16 +428,16 @@ Zapoznaj się z wcześniejszymi projektami, które zainspirowały nas do stworze
|
||||
|
||||
Wspomóż ten projekt [stając się sponsorem](https://github.com/sponsors/starship). Twoja nazwa bądź logo pojawi się tutaj wraz z linkiem do Twojej witryny.
|
||||
|
||||
## 🔒 Code Signing Policy
|
||||
## 🔒 Polityka Podpisywania Kodu
|
||||
|
||||
Free code signing provided by [SignPath.io](https://signpath.io), certificate by [SignPath Foundation](https://signpath.org).
|
||||
Bezpłatne podpisywanie kodu zapewnione przez <0>SignPath.io</0>, certyfikat wydany przez <1>SignPath Foundation</1>.
|
||||
|
||||
Code Signing Roles:
|
||||
Role podpisywania kodu:
|
||||
|
||||
- Reviewers: [Astronauts](https://github.com/orgs/starship/teams/astronauts)
|
||||
- Approvers and Authors: [Mission Control](https://github.com/orgs/starship/teams/mission-control)
|
||||
- Recenzenci: [Astronauts](https://github.com/orgs/starship/teams/astronauts)
|
||||
- Osoby zatwierdzające i autorzy: [Mission Control](https://github.com/orgs/starship/teams/mission-control)
|
||||
|
||||
This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.
|
||||
Program ten nie będzie przesyłał żadnych informacji do innych systemów sieciowych, chyba że użytkownik lub osoba instalująca lub obsługująca program wyraźnie tego zażąda.
|
||||
|
||||
<p align="center">
|
||||
<br>
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Adicione o comando a seguir ao final do arquivo `Microsoft.PowerShell_profile.ps1`. Você pode checar a localização deste arquivo consultando a variável `$PROFILE` no PowerShell. Normalmente o caminho é `~\Documentos\PowerShell\Microsoft.PowerShell_profile.ps1` ou `~/.config/powershell/Microsoft.PowerShell_profile.ps1` no -Nix.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Embora o Starship seja um shell versátil, às vezes é necessário fazer mais do que editar o `starship.toml` para que ele realize certas funções. Esta página detalha algumas das técnicas de configuração avançadas utilizadas no starship.
|
||||
|
||||
> [!WARNING] The configurations in this section are subject to change in future releases of Starship.
|
||||
> [!AVISO] As configurações desta seção estão sujeitas a mudanças em futuras versões do Starship.
|
||||
|
||||
## TransientPrompt no PowerShell
|
||||
|
||||
@@ -266,6 +266,316 @@ Nota: os prompts de continuação estão disponíveis apenas nos seguintes shell
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Linha de estado para Claude Code
|
||||
|
||||
Starship suporta a exibição de uma linha de estado personalizada quando executando dentro do Claude Code, a linha de comando da Anthropic's para programação interativa com Claude. Essa linha de estado fornece informação em tempo real sobre sua sessão Claude, incluindo o modelo sendo usado, o uso da janela de contexto e custos da sessão.
|
||||
|
||||
Para mais informações sobre o recurso de linha de estado do Claude Code, consulte a [documentação da linha de estado do Claude Code](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Configuração
|
||||
|
||||
Para usar o Starship como sua linha de estado do Claude Code:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuração
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | O formato do módulo. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | O estilo do módulo. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variáveis
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Espelha o valor da opção `symbol` |
|
||||
| style\* | | Espelha o valor da opção `style` |
|
||||
|
||||
\*: Essa variável só pode ser usada como parte de uma string de estilo
|
||||
|
||||
#### Exemplos
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | O formato do módulo. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [veja abaixo](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variáveis
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Espelha o valor da opção `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Essa variável só pode ser usada como parte de uma string de estilo
|
||||
|
||||
#### Exemplos
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | O formato do módulo. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [veja abaixo](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variáveis
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Espelha o valor da opção `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Essa variável só pode ser usada como parte de uma string de estilo
|
||||
|
||||
#### Exemplos
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Estilo dos textos
|
||||
|
||||
As strings de estilo são uma lista de palavras, separadas por espaços em branco. As palavras não diferenciam maiúsculas de minúsculas (ou seja, `bold` e `BoLd` são considerados a mesma string). Cada palavra pode ser as seguintes:
|
||||
|
||||
+176
-57
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ O módulo `battery` exibe o quanto a bateria do dispositivo está carregada e o
|
||||
| `full_symbol` | `' '` | O simbolo exibido quando a bateria estiver cheia. |
|
||||
| `charging_symbol` | `' '` | O simbolo exibido quando a bateria está carregando. |
|
||||
| `discharging_symbol` | `' '` | O simbolo exibido quando a bateria está descarregando. |
|
||||
| `unknown_symbol` | `' '` | O simbolo exibido quando o estado da bateria é desconhecido. |
|
||||
| `unknown_symbol` | `' '` | O simbolo exibido quando o estado da bateria é desconhecido. |
|
||||
| `empty_symbol` | `' '` | O simbolo exibido quando o estado da bateria é vazio. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | O formato do módulo. |
|
||||
| `display` | [link](#battery-display) | Limite de exibição e estilo para o módulo. |
|
||||
@@ -1140,11 +1147,31 @@ Por exemplo, dado `~/Dev/Nix/nixpkgs/pkgs` onde `nixpkgs` é o repositório raiz
|
||||
|
||||
| Opções Avançadas | Padrão | Descrição |
|
||||
| --------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substituições` | | Uma tabela de substituições para fazer no path. |
|
||||
| `substituições` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | O número de caracteres para usar quando aplicado no path logico do fish shell pwd. |
|
||||
| `use_logical_path` | `true` | Se `true` exibe um caminho lógico originado do shell via `PWD` ou`--logical-path`. Se `false` em vez disso, exibe o caminho do filesystem com os symlinks resolvidos. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note isto irá desabilita o estilo PWD do fish.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note isto irá desabilita o estilo PWD do fish. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Tipo | Descrição |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1430,14 +1457,15 @@ O módulo `env_var` exibe o valor atual de uma variável de ambiente selecionada
|
||||
|
||||
### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | O símbolo usado antes de exibir o valor da variável. |
|
||||
| `variable` | | A variável de ambiente a ser exibida. |
|
||||
| `default` | | O valor padrão a ser exibido quando a variável selecionada não for definida. |
|
||||
| `format` | `"with [$env_value]($style) "` | O formato do módulo. |
|
||||
| `description` | `"<env_var module>"` | A descrição do módulo, isto será exibido quando executar `starship explain`. |
|
||||
| `disabled` | `false` | Desabilita o módulo `env_var`. |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | O símbolo usado antes de exibir o valor da variável. |
|
||||
| `variable` | | A variável de ambiente a ser exibida. |
|
||||
| `default` | | O valor padrão a ser exibido quando a variável selecionada não for definida. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | O formato do módulo. |
|
||||
| `description` | `"<env_var module>"` | A descrição do módulo, isto será exibido quando executar `starship explain`. |
|
||||
| `disabled` | `false` | Desabilita o módulo `env_var`. |
|
||||
| `style` | `"black bold dimmed"` | O estilo do módulo. |
|
||||
|
||||
### Variáveis
|
||||
|
||||
@@ -1445,7 +1473,7 @@ O módulo `env_var` exibe o valor atual de uma variável de ambiente selecionada
|
||||
| --------- | ----------------------------------------- | --------------------------------------- |
|
||||
| env_value | `Windows NT` (se a variável __ for `$OS`) | O valor de ambiente da opção `variable` |
|
||||
| symbol | | Espelha o valor da opção `symbol` |
|
||||
| style\* | `black bold dimmed` | Espelha o valor da opção `style` |
|
||||
| style\* | | Espelha o valor da opção `style` |
|
||||
|
||||
*: Esta variável só pode ser usada como parte de uma string de estilo
|
||||
|
||||
@@ -1931,44 +1959,60 @@ O módulo `git_status` exibe o simbolo que representa o estado do repositório n
|
||||
|
||||
### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| -------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | O formato padrão para `git_status` |
|
||||
| `conflicted` | `'='` | Este braço tem conflitos. |
|
||||
| `ahead` | `'⇡'` | O formato do `ahead` |
|
||||
| `behind` | `'⇣'` | O formato do `behind` |
|
||||
| `diverged` | `'⇕'` | O formato do `diverged` |
|
||||
| `up_to_date` | `''` | O formato do `up_to_date` |
|
||||
| `untracked` | `'?'` | O formato do `untracked` |
|
||||
| `stashed` | `'\$'` | O formato do `stashed` |
|
||||
| `modified` | `'!'` | O formato do `modified` |
|
||||
| `staged` | `'+'` | O formato do `staged` |
|
||||
| `renamed` | `'»'` | O formato do `renamed` |
|
||||
| `deleted` | `'✘'` | O formato do `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | O estilo do módulo. |
|
||||
| `ignore_submodules` | `false` | Ignora as alterações de submódulos. |
|
||||
| `disabled` | `false` | Desabilita o módulo `git_status`. |
|
||||
| `windows_starship` | | Use este caminho (Linux) para um executável do Windows Starship renderizar o `git_status` quando estiver em caminhos do Windows no WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | O formato padrão para `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | O estilo do módulo. |
|
||||
| `ignore_submodules` | `false` | Ignora as alterações de submódulos. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Desabilita o módulo `git_status`. |
|
||||
| `windows_starship` | | Use este caminho (Linux) para um executável do Windows Starship renderizar o `git_status` quando estiver em caminhos do Windows no WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variáveis
|
||||
|
||||
As variáveis a seguir podem ser usadas no `format`:
|
||||
|
||||
| Variável | Descrição |
|
||||
| -------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Exibe `diverged`, `ahead`, `behind` or `up_to_date` conforme o formato da string do status do repositório. |
|
||||
| `conflicted` | Exibe `conflicted` quando este braço tenha conflitos no merge. |
|
||||
| `untracked` | Exibe `untracked` quando há arquivos não rastreados no diretório atual. |
|
||||
| `stashed` | Exibe `stashed` quando um stash existe para o repositório local. |
|
||||
| `modified` | Exibe `modified` quando um arquivo tenha modificações for adicionado na área de staging. |
|
||||
| `staged` | Exibe `staged` quando um arquivo novo for adicionado na área de staging. |
|
||||
| `renamed` | Exibe `renamed` quando um arquivo renomeado for adicionado na área de staging. |
|
||||
| `deleted` | Exibe `deleted` quando um arquivo deletado for adicionado na área de staging. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Espelha o valor da opção `style` |
|
||||
| Variável | Descrição |
|
||||
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Exibe `diverged`, `ahead`, `behind` or `up_to_date` conforme o formato da string do status do repositório. |
|
||||
| `conflicted` | Exibe `conflicted` quando este braço tenha conflitos no merge. |
|
||||
| `untracked` | Exibe `untracked` quando há arquivos não rastreados no diretório atual. |
|
||||
| `stashed` | Exibe `stashed` quando um stash existe para o repositório local. |
|
||||
| `modified` | Exibe `modified` quando um arquivo tenha modificações for adicionado na área de staging. |
|
||||
| `staged` | Exibe `staged` quando um arquivo novo for adicionado na área de staging. |
|
||||
| `renamed` | Exibe `renamed` quando um arquivo renomeado for adicionado na área de staging. |
|
||||
| `deleted` | Exibe `deleted` quando um arquivo deletado for adicionado na área de staging. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Espelha o valor da opção `style` |
|
||||
|
||||
*: Esta variável só pode ser usada como parte de uma string de estilo
|
||||
|
||||
@@ -1979,7 +2023,7 @@ As variáveis a seguir podem ser usadas em `diverged`:
|
||||
| `ahead_count` | Número de commits a frente do braço de rastreamento |
|
||||
| `behind_count` | Número de commits atrás do braço de rastreamento |
|
||||
|
||||
As variaveis a seguir podem ser usadas em `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` e `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variável | Descrição |
|
||||
| -------- | -------------------------- |
|
||||
@@ -2745,6 +2789,41 @@ O módulo `lua` exibe a versão atual instalada do [Lua](http://www.lua.org/). P
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
Por padrão o módulo vai exibir se uma das condições a seguir for atendida:
|
||||
|
||||
- O diretório atual conter um arquivo `pom.xml`.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ------------------- | ------------------------------------ | ----------------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | O formato do módulo. |
|
||||
| `version_format` | `'v${raw}'` | A versão formatada. As variáveis disponíveis são `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Quais extensões devem ativar este módulo. |
|
||||
| `detect_files` | `['pom.xml']` | Quais nomes de arquivos devem ativar este módulo. |
|
||||
| `detect_folders` | `['.mvn']` | Quais pastas devem ativar este módulo. |
|
||||
| `style` | `'bold bright-cyan'` | O estilo do módulo. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variáveis
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| -------- | -------- | --------------------------------- |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Espelha o valor da opção `symbol` |
|
||||
| style* | | Espelha o valor da opção `style` |
|
||||
|
||||
*: Esta variável só pode ser usada como parte de uma string de estilo
|
||||
|
||||
## Uso de Memória
|
||||
|
||||
O módulo `memory_usage` mostra a memória atual do sistema e o uso de troca.
|
||||
@@ -3749,6 +3828,7 @@ Por padrão, o módulo será exibido se qualquer das seguintes condições for a
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Quais extensões devem acionar este módulo |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | [] |
|
||||
| `detect_folders` | `[]` | Quais pastas devem ativar este módulo |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Desabilita o módulo `python`. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. O Starship vai tentar executar cada binário até obter um resultado. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ Por padrão, o módulo será exibido se qualquer das seguintes condições for a
|
||||
|
||||
### Variáveis
|
||||
|
||||
| Variável | Exemplo | Descrição |
|
||||
| ------------ | --------------- | --------------------------------------- |
|
||||
| version | `'v3.8.1'` | A versão do `python` |
|
||||
| symbol | `'🐍 '` | Espelha o valor da opção `symbol` |
|
||||
| style | `'yellow bold'` | Espelha o valor da opção `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Espelha o valor da opção `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | O nome atual do `virtualenv` |
|
||||
| Variável | Exemplo | Descrição |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | A versão do `python` |
|
||||
| symbol | `'🐍 '` | Espelha o valor da opção `symbol` |
|
||||
| style | `'yellow bold'` | Espelha o valor da opção `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Espelha o valor da opção `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Exemplo
|
||||
|
||||
@@ -4665,6 +4745,45 @@ O módulo `vlang` exibe a versão atual instalada do [V](https://vlang.io/). Por
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Opções
|
||||
|
||||
| Opções | Padrão | Descrição |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Exemplo
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
O módulo `vcsh` exibe o repositório [VCSH](https://github.com/RichiH/vcsh) atual ativo. O módulo vai ser exibido apenas se um repositório estiver em uso.
|
||||
|
||||
@@ -408,7 +408,7 @@ Se você estiver procurando personalizar ainda mais a Starship:
|
||||
|
||||
## 🤝 Contribuindo
|
||||
|
||||
Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
Nós estamos sempre procurando contribuidores de **todos os níveis de conhecimento**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Se você é fluente em um idioma diferente do inglês, agradecemos qualquer ajuda para manter nossos documentos traduzidos e atualizados em outros idiomas. Se você quiser ajudar, as traduções podem ser contribuídas no [Crowdin do Starship](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Configuration
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Description |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `style` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| style | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ If you're looking to further customize Starship:
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
We are always looking for contributors of **all skill levels**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
|
||||
@@ -268,6 +268,316 @@ Starship может настроить промпт на продолжение,
|
||||
continuation_prompt = '▶️▶️ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Конфигурация
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | Формат модуля. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `style` | `'bold blue'` | Стиль модуля. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| ---------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
#### Примеры
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | Формат модуля. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [см. ниже](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
#### Примеры
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | Формат модуля. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [см. ниже](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `style` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
#### Примеры
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Строки стиля
|
||||
|
||||
Строки стиля - это список слов, разделенных пробелами. Слова не чувствительны к регистру (то есть `bold` и `BoLd` считаются одной строкой). Каждое слово может быть одним из следующих:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ very-long-subscription-name = 'vlsn'
|
||||
| `full_symbol` | `' '` | Символ, отображаемый при полной батарее. |
|
||||
| `charging_symbol` | `' '` | Символ, показываемый при зарядке аккумулятора. |
|
||||
| `discharging_symbol` | `' '` | Символ, показываемый при разрядке аккумулятора. |
|
||||
| `unknown_symbol` | `' '` | Символ, отображаемый при неизвестном состоянии батареи. |
|
||||
| `unknown_symbol` | `' '` | Символ, отображаемый при неизвестном состоянии батареи. |
|
||||
| `empty_symbol` | `' '` | Символ, отображаемый при пустом состоянии батареи. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | Формат модуля. |
|
||||
| `display` | [ссылка](#battery-display) | Порог отображения и стиль для модуля. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `elixir`. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ When using the `fish_style_pwd_dir_length` option, instead of hiding the path th
|
||||
|
||||
| Advanced Option | По умолчанию | Описание |
|
||||
| --------------------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | Количество символов, используемых при использовании логики создания пути из fish. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Описание |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Использовать быстрое определение версии, для сохранения скорости. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold blue'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `dotnet`. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | Символ, используемый перед отображением версии Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `style` | `'bold purple'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `elixir`. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `style` | `'cyan bold'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `elm`. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | Символ, используемый перед отображением значения переменной. |
|
||||
| `variable` | | Отображаемая переменная окружения. |
|
||||
| `default` | | Значение отображаемое, когда выбранная переменная не определена. |
|
||||
| `format` | `"with [$env_value]($style) "` | Формат модуля. |
|
||||
| `описание` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Отключает модуль `env_var`. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | Символ, используемый перед отображением значения переменной. |
|
||||
| `variable` | | Отображаемая переменная окружения. |
|
||||
| `default` | | Значение отображаемое, когда выбранная переменная не определена. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | Формат модуля. |
|
||||
| `описание` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Отключает модуль `env_var`. |
|
||||
| `style` | `"black bold dimmed"` | Стиль модуля. |
|
||||
|
||||
### Переменные
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| ---------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style\* | `black bold dimmed` | Отражает значение параметра `style` |
|
||||
| style\* | | Отражает значение параметра `style` |
|
||||
|
||||
*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `style` | `'bold red'` | Стиль модуля. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Переменные
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `style` | `'bold green'` | Стиль модуля. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Переменные
|
||||
@@ -1931,44 +1959,60 @@ format = '[+$added]($added_style)/[-$deleted]($deleted_style) '
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | Эта ветка имеет конфликты слияния. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `style` | `'bold red'` | Стиль модуля. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Отключает модуль `git_status`. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `style` | `'bold red'` | Стиль модуля. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Отключает модуль `git_status`. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Переменные
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Переменная | Описание |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Отражает значение параметра `style` |
|
||||
| Переменная | Описание |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Отражает значение параметра `style` |
|
||||
|
||||
*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Переменная | Описание |
|
||||
| ---------- | -------------------------- |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `style` | `'bold fg:202'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `style` | `'bold white'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `style` | `'red dimmed'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Отключает модуль `java`. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `style` | `'bold purple'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `style` | `'bold blue'` | Стиль модуля. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Отключает модуль `kubernetes`. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- Текущий каталог содержит файл `pom.xml`.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | Формат модуля. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `style` | `'bold bright-cyan'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| ---------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Отражает значение параметра `symbol` |
|
||||
| style* | | Отражает значение параметра `style` |
|
||||
|
||||
*: Эта переменная может использоваться только в качестве части строки style
|
||||
|
||||
## Использование памяти
|
||||
|
||||
Модуль `memory_usage` отображает текущую системную память и использование подкачки.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Переменные
|
||||
|
||||
| Переменная | Пример | Описание |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Отражает значение параметра `symbol` |
|
||||
| style | `'yellow bold'` | Отражает значение параметра `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Переменная | Пример | Описание |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Отражает значение параметра `symbol` |
|
||||
| style | `'yellow bold'` | Отражает значение параметра `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Пример
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `style` | `'red dimmed'` | Стиль модуля. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Опции
|
||||
|
||||
| Параметр | По умолчанию | Описание |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Пример
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
+10
-10
@@ -161,14 +161,14 @@
|
||||
align="right"
|
||||
/>
|
||||
|
||||
**Минималистичное, быстрое и бесконечно настраиваемое приглашение командной строки для любой оболочки!**
|
||||
**Минималистичный, сверхбыстрый и полностью настраиваемый промпт для любой оболочки!**
|
||||
|
||||
- **Быстрая:** она быстрая – _очень-очень_ быстрая! 🚀
|
||||
- **Настраиваемая:** настройте каждый элемент вашей командной строки.
|
||||
- **Универсальная:** работает с любой оболочкой, на любой операционной системе.
|
||||
- **Умная:** сразу показывает соответствующую информацию.
|
||||
- **Быстрый:** он быстрый – _очень-очень_ быстрый! 🚀
|
||||
- **Настраиваемый:** настройте каждый элемент вашей командной строки.
|
||||
- **Универсальный:** работает с любой оболочкой, на любой операционной системе.
|
||||
- **Умный:** сразу показывает соответствующую информацию.
|
||||
- **Много функций:** поддержка всех ваших любимых инструментов.
|
||||
- **Легкая:** быстрая установка - начните использовать ее в считанные минуты.
|
||||
- **Легкий:** быстрая установка - начните использовать его в считанные минуты.
|
||||
|
||||
<p align="center">
|
||||
<a href="https://starship.rs/config/"><strong>Изучите документацию Starship ▶</strong></a>
|
||||
@@ -279,7 +279,7 @@ curl -sS https://starship.rs/install.sh | sh
|
||||
|
||||
### Шаг 2. Настройте оболочку для использования Starship
|
||||
|
||||
Настройте оболочку для инициализации starship. Выберете вашу оболочку из списка:
|
||||
Настройте оболочку для инициализации starship. Выберите вашу оболочку из списка:
|
||||
|
||||
<details>
|
||||
<summary>Bash</summary>
|
||||
@@ -408,15 +408,15 @@ eval "$(starship init zsh)"
|
||||
|
||||
## 🤝 Помощь
|
||||
|
||||
Мы всегда ищем помощь людей **всех уровней навыков**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
Мы всегда ищем помощь людей **всех уровней навыков**! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Если Вы свободно владеете иностранным языком отличным от английского, мы высоко оценим любую помощь в переводе нашей документации на другие языки и поддержании ее в актуальном состоянии. Если вы хотите помочь, переводы могут быть сделаны на платформе [Starship Crowdin](https://translate.starship.rs/).
|
||||
|
||||
Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Кроме того, заходите на наш [Discord сервер](https://discord.gg/8Jzqu3T) и поздоровайтесь. 👋
|
||||
Если вы хотите помочь в создании Starship, пожалуйста, ознакомьтесь с нашим [Руководством по содействию](https://github.com/starship/starship/blob/master/CONTRIBUTING.md). Также заходите на наш [Discord-сервер](https://discord.gg/8Jzqu3T) - будем рады пообщаться. 👋
|
||||
|
||||
## 💭 Вдохновение
|
||||
|
||||
Пожалуйста, ознакомьтесь с этими предыдущими работами, которые помогли вдохновить создание Starship. 🙏
|
||||
Пожалуйста, ознакомьтесь с предыдущими проектами, которые вдохновили на создание Starship. 🙏
|
||||
|
||||
- **[denysdovhan/spaceship-prompt](https://github.com/denysdovhan/spaceship-prompt)** – ZSH промпт для космонавтов.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix.
|
||||
|
||||
|
||||
@@ -266,6 +266,316 @@ Note: Continuation prompts are only available in the following shells:
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Statusline for Claude Code
|
||||
|
||||
Starship supports displaying a custom statusline when running inside Claude Code, Anthropic's CLI tool for interactive coding with Claude. This statusline provides real-time information about your Claude session, including the model being used, context window usage, and session costs.
|
||||
|
||||
For more information about the Claude Code statusline feature, see the [Claude Code statusline documentation](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Setup
|
||||
|
||||
To use Starship as your Claude Code statusline:
|
||||
|
||||
1. Run `/statusline` in Claude Code and ask it to configure Starship, or manually add the following to your `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Customize the statusline appearance in your `~/.config/starship.toml` (see [Configuration](#configuration) below)
|
||||
|
||||
### Overview
|
||||
|
||||
When invoked with `starship statusline claude-code`, Starship receives Claude Code session data via stdin and renders a statusline using a dedicated profile named `claude-code`.
|
||||
|
||||
The profile includes three specialized modules:
|
||||
|
||||
- `claude_model`: Displays the current Claude model being used
|
||||
- `claude_context`: Shows context window usage with a visual gauge
|
||||
- `claude_cost`: Displays session cost and statistics
|
||||
|
||||
The default profile format is:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Yapılandırma
|
||||
|
||||
You can customize the Claude Code statusline by modifying the `claude-code` profile and individual module configurations in your `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
The `claude_model` module displays the current Claude model being used in the session.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| --------------- | ---------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | The format for the module. |
|
||||
| `symbol` | `'🤖 '` | The symbol shown before the model name. |
|
||||
| `stil` | `'bold blue'` | The style for the module. |
|
||||
| `model_aliases` | `{}` | Map of model IDs or display names to shorter aliases. Checks ID first, then display name. |
|
||||
| `disabled` | `false` | Disables the `claude_model` module. |
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| --------- | ------------------- | ------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | The display name of the current model |
|
||||
| model_id | `claude-3-5-sonnet` | The model ID |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Basic customization
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Using model aliases for vendor-specific model names
|
||||
# You can alias by model ID or display name
|
||||
[claude_model.model_aliases]
|
||||
# Alias by vendor model ID (e.g. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Alias by display name
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
The `claude_context` module displays context window usage as a percentage and visual gauge. The style automatically changes based on configurable thresholds.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | --------------------------------- | -------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | The format for the module. |
|
||||
| `symbol` | `''` | The symbol shown before the gauge. |
|
||||
| `gauge_width` | `5` | The width of the gauge in characters. |
|
||||
| `gauge_full_symbol` | `'█'` | The symbol used for filled segments of the gauge. |
|
||||
| `gauge_partial_symbol` | `'▒'` | The symbol used for partial segments of the gauge. |
|
||||
| `gauge_empty_symbol` | `'░'` | The symbol used for empty segments of the gauge. |
|
||||
| `display` | [see below](#display) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_context` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define thresholds and styles for different usage levels. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | The minimum context windows usage percentage to match this configuration |
|
||||
| `stil` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this the configuration is matched. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ---------------------------- | ------- | ----------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Visual representation of context usage |
|
||||
| percentage | `65%` | Context usage as a percentage |
|
||||
| input_tokens | `45.2k` | Total input tokens in conversation |
|
||||
| output_tokens | `12.3k` | Total output tokens in conversation |
|
||||
| curr_input_tokens | `5.1k` | Input tokens from most recent API call |
|
||||
| curr_output_tokens | `1.2k` | Output tokens from most recent API call |
|
||||
| curr_cache_creation_tokens | `1.5k` | Cache creation tokens from most recent API call |
|
||||
| curr_cache_read_tokens | `23.4k` | Cache read tokens from most recent API call |
|
||||
| total_tokens | `200k` | Total context window size |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
**Minimal gauge-only display**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Detailed token information**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Custom gauge symbols**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Custom thresholds**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
The `claude_cost` module displays the total cost of the current Claude Code session in USD. Like `claude_context`, it supports threshold-based styling.
|
||||
|
||||
#### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------- | ---------------------------------- | ----------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | The format for the module. |
|
||||
| `symbol` | `'💰 '` | The symbol shown before the cost. |
|
||||
| `display` | [see below](#display-1) | Threshold and style configurations. |
|
||||
| `disabled` | `false` | Disables the `claude_cost` module. |
|
||||
|
||||
##### Display
|
||||
|
||||
The `display` option is an array of objects that define cost thresholds and styles. The module uses the style from the highest matching threshold or hides the module if `hidden` is `true`.
|
||||
|
||||
| Option | Default | Description |
|
||||
| ----------- | ------------ | ------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | The minimum cost in USD to match this configuration |
|
||||
| `stil` | `bold green` | The value of `style` if this display configuration is matched |
|
||||
| `hidden` | `false` | Hide this module if this configuration is matched. |
|
||||
|
||||
**Default configuration:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------- | -------- | ----------------------------------------------------- |
|
||||
| cost | `1.23` | Total session cost in USD (formatted to 2 decimals) |
|
||||
| duration | `1m 30s` | Total session duration |
|
||||
| api_duration | `45s` | Total API call duration |
|
||||
| lines_added | `1.2k` | Total lines of code added |
|
||||
| lines_removed | `500` | Total lines of code removed |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | | Mirrors the style from the matching display threshold |
|
||||
|
||||
\*: This variable can only be used as a part of a style string
|
||||
|
||||
#### Examples
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Cost with code change statistics
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Hide module until cost exceeds $0.10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Show duration information
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Style Strings
|
||||
|
||||
Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following:
|
||||
|
||||
+189
-70
@@ -253,6 +253,7 @@ $localip\
|
||||
$shlvl\
|
||||
$singularity\
|
||||
$kubernetes\
|
||||
$nats\
|
||||
$directory\
|
||||
$vcsh\
|
||||
$fossil_branch\
|
||||
@@ -267,9 +268,11 @@ $hg_state\
|
||||
$pijul_channel\
|
||||
$docker_context\
|
||||
$package\
|
||||
$bun\
|
||||
$c\
|
||||
$cmake\
|
||||
$cobol\
|
||||
$cpp\
|
||||
$daml\
|
||||
$dart\
|
||||
$deno\
|
||||
@@ -281,18 +284,20 @@ $fennel\
|
||||
$fortran\
|
||||
$gleam\
|
||||
$golang\
|
||||
$guix_shell\
|
||||
$gradle\
|
||||
$haskell\
|
||||
$haxe\
|
||||
$helm\
|
||||
$java\
|
||||
$julia\
|
||||
$kotlin\
|
||||
$gradle\
|
||||
$lua\
|
||||
$maven\
|
||||
$mojo\
|
||||
$nim\
|
||||
$nodejs\
|
||||
$ocaml\
|
||||
$odin\
|
||||
$opa\
|
||||
$perl\
|
||||
$php\
|
||||
@@ -312,10 +317,13 @@ $terraform\
|
||||
$typst\
|
||||
$vlang\
|
||||
$vagrant\
|
||||
$xmake\
|
||||
$zig\
|
||||
$buf\
|
||||
$guix_shell\
|
||||
$nix_shell\
|
||||
$conda\
|
||||
$pixi\
|
||||
$meson\
|
||||
$spack\
|
||||
$memory_usage\
|
||||
@@ -323,7 +331,6 @@ $aws\
|
||||
$gcloud\
|
||||
$openstack\
|
||||
$azure\
|
||||
$nats\
|
||||
$direnv\
|
||||
$env_var\
|
||||
$mise\
|
||||
@@ -336,9 +343,9 @@ $jobs\
|
||||
$battery\
|
||||
$time\
|
||||
$status\
|
||||
$os\
|
||||
$container\
|
||||
$netns\
|
||||
$os\
|
||||
$shell\
|
||||
$character"""
|
||||
```
|
||||
@@ -498,7 +505,7 @@ The `battery` module shows how charged the device's battery is and its current c
|
||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
@@ -566,7 +573,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
|
||||
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `stil` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1140,11 +1147,31 @@ For example, given `~/Dev/Nix/nixpkgs/pkgs` where `nixpkgs` is the repo root, an
|
||||
|
||||
| Advanced Option | Default | Description |
|
||||
| --------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `substitutions` | | A table of substitutions to be made to the path. |
|
||||
| `substitutions` | | An Array or table of substitutions to be made to the path. |
|
||||
| `fish_style_pwd_dir_length` | `0` | The number of characters to use when applying fish shell pwd path logic. |
|
||||
| `use_logical_path` | `true` | If `true` render the logical path sourced from the shell via `PWD` or `--logical-path`. If `false` instead render the physical filesystem path with symlinks resolved. |
|
||||
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD.
|
||||
`substitutions` allows you to define arbitrary replacements for literal strings that occur in the path, for example long network prefixes or development directories of Java. Note that this will disable the fish style PWD. It takes an array of the following key/value pairs:
|
||||
|
||||
| Value | Type | Description |
|
||||
| ------- | ------- | ---------------------------------------- |
|
||||
| `from` | String | The value to substitute |
|
||||
| `to` | String | The replacement for that value, if found |
|
||||
| `regex` | Boolean | (Optional) Whether `from` is a regex |
|
||||
|
||||
By using `regex = true`, you can use [Rust's regular expressions](https://docs.rs/regex/latest/regex/#syntax) in `from`. For instance you can replace every slash except the first with the following:
|
||||
|
||||
```toml
|
||||
substitutions = [
|
||||
{ from = "^/", to = "<root>/", regex = true },
|
||||
{ from = "/", to = " | " },
|
||||
{ from = "^<root>", to = "/", regex = true },
|
||||
]
|
||||
```
|
||||
|
||||
This will replace `/var/log` to `/ | var | log`.
|
||||
|
||||
The old syntax still works, although it doesn't support regular expressions:
|
||||
|
||||
```toml
|
||||
[directory.substitutions]
|
||||
@@ -1302,7 +1329,7 @@ The module will also show the Target Framework Moniker (<https://docs.microsoft.
|
||||
| `heuristic` | `true` | Use faster version detection to keep starship snappy. |
|
||||
| `detect_extensions` | `['csproj', 'fsproj', 'xproj']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['global.json', 'project.json', 'Directory.Build.props', 'Directory.Build.targets', 'Packages.props']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `stil` | `'bold blue'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `dotnet` module. |
|
||||
|
||||
@@ -1343,7 +1370,7 @@ The `elixir` module shows the currently installed version of [Elixir](https://el
|
||||
| `symbol` | `'💧 '` | The symbol used before displaying the version of Elixir/Erlang. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['mix.exs']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `stil` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elixir` module. |
|
||||
|
||||
@@ -1386,7 +1413,7 @@ The `elm` module shows the currently installed version of [Elm](https://elm-lang
|
||||
| `symbol` | `'🌳 '` | A format string representing the symbol of Elm. |
|
||||
| `detect_extensions` | `['elm']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['elm.json', 'elm-package.json', '.elm-version']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['elm-stuff']` | Which folders should trigger this module. |
|
||||
| `stil` | `'cyan bold'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `elm` module. |
|
||||
|
||||
@@ -1430,14 +1457,15 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------ | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| Option | Default | Description |
|
||||
| ------------- | ------------------------------------- | ---------------------------------------------------------------------------- |
|
||||
| `symbol` | `""` | The symbol used before displaying the variable value. |
|
||||
| `variable` | | The environment variable to be displayed. |
|
||||
| `default` | | The default value to be displayed when the selected variable is not defined. |
|
||||
| `format` | `"with [$symbol$env_value]($style) "` | The format for the module. |
|
||||
| `description` | `"<env_var module>"` | The description of the module that is shown when running `starship explain`. |
|
||||
| `disabled` | `false` | Disables the `env_var` module. |
|
||||
| `stil` | `"black bold dimmed"` | The style for the module. |
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -1445,7 +1473,7 @@ The `env_var` module displays the current value of a selected environment variab
|
||||
| --------- | ------------------------------------------- | ------------------------------------------ |
|
||||
| env_value | `Windows NT` (if _variable_ would be `$OS`) | The environment value of option `variable` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style\* | `black bold dimmed` | Mirrors the value of option `style` |
|
||||
| style\* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1488,7 +1516,7 @@ The `erlang` module shows the currently installed version of [Erlang/OTP](https:
|
||||
| `stil` | `'bold red'` | The style for the module. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['rebar.config', 'elang.mk']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `erlang` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1526,7 +1554,7 @@ The `fennel` module shows the currently installed version of [Fennel](https://fe
|
||||
| `stil` | `'bold green'` | The style for the module. |
|
||||
| `detect_extensions` | `['fnl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `disabled` | `false` | Disables the `fennel` module. |
|
||||
|
||||
### Variables
|
||||
@@ -1931,44 +1959,60 @@ The `git_status` module shows symbols representing the state of the repo in your
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | This branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format of `ahead` |
|
||||
| `behind` | `'⇣'` | The format of `behind` |
|
||||
| `diverged` | `'⇕'` | The format of `diverged` |
|
||||
| `up_to_date` | `''` | The format of `up_to_date` |
|
||||
| `untracked` | `'?'` | The format of `untracked` |
|
||||
| `stashed` | `'\$'` | The format of `stashed` |
|
||||
| `modified` | `'!'` | The format of `modified` |
|
||||
| `staged` | `'+'` | The format of `staged` |
|
||||
| `renamed` | `'»'` | The format of `renamed` |
|
||||
| `deleted` | `'✘'` | The format of `deleted` |
|
||||
| `typechanged` | `""` | The format of `typechanged` |
|
||||
| `stil` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
| Option | Default | Description |
|
||||
| ---------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'([\[$all_status$ahead_behind\]]($style) )'` | The default format for `git_status` |
|
||||
| `conflicted` | `'='` | The format shown when this branch has merge conflicts. |
|
||||
| `ahead` | `'⇡'` | The format shown when this branch is ahead of the branch being tracked. |
|
||||
| `behind` | `'⇣'` | The format shown when this branch is behind the branch being tracked. |
|
||||
| `diverged` | `'⇕'` | The format shown when this branch has diverged from the branch being tracked. |
|
||||
| `up_to_date` | `''` | The format shown when this branch is up to date with the branch being tracked. |
|
||||
| `untracked` | `'?'` | The format shown when there are untracked files in the working directory. |
|
||||
| `stashed` | `'\$'` | The format shown when a stash exists for the local repository. |
|
||||
| `modified` | `'!'` | The format shown when there are file modifications in the working directory. |
|
||||
| `staged` | `'+'` | The format shown when a new file has been added to the staging area. |
|
||||
| `renamed` | `'»'` | The format shown when a renamed file has been added to the staging area. |
|
||||
| `deleted` | `'✘'` | The format shown when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `stil` | `'bold red'` | The style for the module. |
|
||||
| `ignore_submodules` | `false` | Ignore changes to submodules. |
|
||||
| `worktree_added` | `""` | The format shown when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | `""` | The format shown when a file has been deleted in the working directory. |
|
||||
| `worktree_modified` | `""` | The format shown when a file has been modified in the working directory. |
|
||||
| `worktree_typechanged` | `""` | The format shown when a file's type has been changed in the working directory. |
|
||||
| `index_added` | `""` | The format shown when a new file has been added to the staging area. |
|
||||
| `index_deleted` | `""` | The format shown when a file has been deleted from the staging area. |
|
||||
| `index_modified` | `""` | The format shown when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | `""` | The format shown when a file's type has been changed in the staging area. |
|
||||
| `disabled` | `false` | Disables the `git_status` module. |
|
||||
| `windows_starship` | | Use this (Linux) path to a Windows Starship executable to render `git_status` when on Windows paths in WSL. |
|
||||
| `use_git_executable` | `false` | Do not use `gitoxide` for computing the status, but use the `git` executable instead. |
|
||||
|
||||
### Variables
|
||||
|
||||
The following variables can be used in `format`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for`$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked` |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
| Variable | Description |
|
||||
| ---------------------- | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `all_status` | Shortcut for `$conflicted$stashed$deleted$renamed$modified$typechanged$staged$untracked`. |
|
||||
| `ahead_behind` | Displays `diverged`, `ahead`, `behind` or `up_to_date` format string based on the current status of the repo. |
|
||||
| `conflicted` | Displays `conflicted` when this branch has merge conflicts. |
|
||||
| `untracked` | Displays `untracked` when there are untracked files in the working directory. |
|
||||
| `stashed` | Displays `stashed` when a stash exists for the local repository. |
|
||||
| `modified` | Displays `modified` when there are file modifications in the working directory. |
|
||||
| `staged` | Displays `staged` when a new file has been added to the staging area. |
|
||||
| `renamed` | Displays `renamed` when a renamed file has been added to the staging area. |
|
||||
| `deleted` | Displays `deleted` when a file's deletion has been added to the staging area. |
|
||||
| `typechanged` | Displays `typechanged` when a file's type has been changed in the staging area. |
|
||||
| `worktree_added` | Displays `worktree_added` when a new file has been added in the working directory. |
|
||||
| `worktree_deleted` | Displays `worktree_deleted` when a file's been deleted in the working directory. |
|
||||
| `worktree_modified` | Displays `worktree_modified` when a file's been modified in the working directory. |
|
||||
| `worktree_typechanged` | Displays `worktree_typechanged` when a file's type has been changed in the working directory. |
|
||||
| `index_added` | Displays `index_added` when a new file has been added to the staging area. |
|
||||
| `index_deleted` | Displays `index_deleted` when a file has been deleted from the staging area. |
|
||||
| `index_modified` | Displays `index_modified` when a file has been modified in the staging area. |
|
||||
| `index_typechanged` | Displays `index_typechanged` when a file's type has been changed in the staging area. |
|
||||
| style\* | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
@@ -1979,7 +2023,7 @@ The following variables can be used in `diverged`:
|
||||
| `ahead_count` | Number of commits ahead of the tracking branch |
|
||||
| `behind_count` | Number of commits behind the tracking branch |
|
||||
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed` and `deleted`:
|
||||
The following variables can be used in `conflicted`, `ahead`, `behind`, `untracked`, `stashed`, `modified`, `staged`, `renamed`, `deleted`, `typechanged`, `worktree_added`, `worktree_deleted`, `worktree_modified`, `worktree_typechanged`, `index_added`, `index_deleted`, `index_modified`, and `index_typechanged`:
|
||||
|
||||
| Variable | Description |
|
||||
| -------- | ------------------------ |
|
||||
@@ -2235,7 +2279,7 @@ The `haxe` module shows the currently installed version of [Haxe](https://haxe.o
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['hx', 'hxml']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['project.xml', 'Project.xml', 'application.xml', 'haxelib.json', 'hxformat.json', '.haxerc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.haxelib', 'haxe_libraries']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⌘ '` | A format string representing the symbol of Haxe. |
|
||||
| `stil` | `'bold fg:202'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `haxe` module. |
|
||||
@@ -2274,7 +2318,7 @@ The `helm` module shows the currently installed version of [Helm](https://helm.s
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['helmfile.yaml', 'Chart.yaml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'⎈ '` | A format string representing the symbol of Helm. |
|
||||
| `stil` | `'bold white'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `helm` module. |
|
||||
@@ -2373,7 +2417,7 @@ The `java` module shows the currently installed version of [Java](https://www.or
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['java', 'class', 'gradle', 'jar', 'cljs', 'cljc']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml', 'build.gradle.kts', 'build.sbt', '.java-version', 'deps.edn', 'project.clj', 'build.boot', '.sdkmanrc']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'☕ '` | A format string representing the symbol of Java |
|
||||
| `stil` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `java` module. |
|
||||
@@ -2470,7 +2514,7 @@ The `julia` module shows the currently installed version of [Julia](https://juli
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['jl']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['Project.toml', 'Manifest.toml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'ஃ '` | A format string representing the symbol of Julia. |
|
||||
| `stil` | `'bold purple'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `julia` module. |
|
||||
@@ -2508,7 +2552,7 @@ The `kotlin` module shows the currently installed version of [Kotlin](https://ko
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['kt', 'kts']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🅺 '` | A format string representing the symbol of Kotlin. |
|
||||
| `stil` | `'bold blue'` | The style for the module. |
|
||||
| `kotlin_binary` | `'kotlin'` | Configures the kotlin binary that Starship executes when getting the version. |
|
||||
@@ -2562,7 +2606,7 @@ Displays the current [Kubernetes context](https://kubernetes.io/docs/concepts/co
|
||||
| `user_aliases`* | `{}` | Table of user aliases to display. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `[]` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module. |
|
||||
| `detect_env_vars` | `[]` | Which environmental variables should trigger this module |
|
||||
| `contexts` | `[]` | Customized styles and symbols for specific contexts. |
|
||||
| `disabled` | `true` | Disables the `kubernetes` module. |
|
||||
@@ -2745,6 +2789,41 @@ The `lua` module shows the currently installed version of [Lua](http://www.lua.o
|
||||
format = 'via [🌕 $version](bold blue) '
|
||||
```
|
||||
|
||||
## Maven
|
||||
|
||||
The `maven` module indicates the presence of a Maven project in the current directory. If the [Maven Wrapper](https://maven.apache.org/wrapper/) is enabled, the Maven version will be parsed from `.mvn/wrapper/maven-wrapper.properties` and shown.
|
||||
|
||||
By default the module will be shown if any of the following conditions are met:
|
||||
|
||||
- The current directory contains a `pom.xml` file.
|
||||
- The current directory contains a `.mvn/wrapper/maven-wrapper.properties` file.
|
||||
|
||||
If you use an alternate POM syntax (for example `pom.hocon`), add its filename to `detect_files`.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ------------------- | ------------------------------------ | ------------------------------------------------------------------------- |
|
||||
| `format` | `'via [$symbol($version )]($style)'` | The format for the module. |
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `symbol` | `'🅼 '` | A format string representing the symbol of Maven. |
|
||||
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['pom.xml']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.mvn']` | Which folders should trigger this module. |
|
||||
| `stil` | `'bold bright-cyan'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `maven` module. |
|
||||
| `recursive` | `false` | Enables recursive finding for the `.mvn` directory. |
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| -------- | -------- | ------------------------------------ |
|
||||
| version | `v3.2.0` | The version of `maven` |
|
||||
| symbol | | Mirrors the value of option `symbol` |
|
||||
| style* | | Mirrors the value of option `style` |
|
||||
|
||||
*: This variable can only be used as a part of a style string
|
||||
|
||||
## Memory Usage
|
||||
|
||||
The `memory_usage` module shows current system memory and swap usage.
|
||||
@@ -3749,6 +3828,7 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
| `detect_extensions` | `['py', 'ipynb']` | Which extensions should trigger this module |
|
||||
| `detect_files` | `['.python-version', 'Pipfile', '__init__.py', 'pyproject.toml', 'requirements.txt', 'setup.py', 'tox.ini']` | Which filenames should trigger this module |
|
||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||
| `generic_venv_names` | `[]` | Which venv names should be replaced with the parent directory name. |
|
||||
| `disabled` | `false` | Disables the `python` module. |
|
||||
|
||||
> [!TIP] The `python_binary` variable accepts either a string or a list of strings. Starship will try executing each binary until it gets a result. Note you can only change the binary that Starship executes to get the version of Python not the arguments that are used.
|
||||
@@ -3757,13 +3837,13 @@ By default, the module will be shown if any of the following conditions are met:
|
||||
|
||||
### Variables
|
||||
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | ------------------------------------------ |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| stil | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name |
|
||||
| Variable | Example | Description |
|
||||
| ------------ | --------------- | --------------------------------------------------------------------------- |
|
||||
| version | `'v3.8.1'` | The version of `python` |
|
||||
| symbol | `'🐍 '` | Mirrors the value of option `symbol` |
|
||||
| stil | `'yellow bold'` | Mirrors the value of option `style` |
|
||||
| pyenv_prefix | `'pyenv '` | Mirrors the value of option `pyenv_prefix` |
|
||||
| virtualenv | `'venv'` | The current `virtualenv` name or the parent if matches `generic_venv_names` |
|
||||
|
||||
### Example
|
||||
|
||||
@@ -4043,7 +4123,7 @@ The `scala` module shows the currently installed version of [Scala](https://www.
|
||||
| `version_format` | `'v${raw}'` | The version format. Available vars are `raw`, `major`, `minor`, & `patch` |
|
||||
| `detect_extensions` | `['sbt', 'scala']` | Which extensions should trigger this module. |
|
||||
| `detect_files` | `['.scalaenv', '.sbtenv', 'build.sbt']` | Which filenames should trigger this module. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this modules. |
|
||||
| `detect_folders` | `['.metals']` | Which folders should trigger this module. |
|
||||
| `symbol` | `'🆂 '` | A format string representing the symbol of Scala. |
|
||||
| `stil` | `'red dimmed'` | The style for the module. |
|
||||
| `disabled` | `false` | Disables the `scala` module. |
|
||||
@@ -4665,6 +4745,45 @@ The `vlang` module shows you your currently installed version of [V](https://vla
|
||||
format = 'via [V $version](blue bold) '
|
||||
```
|
||||
|
||||
## VCS
|
||||
|
||||
> Note the module is enabled by default but **not** included in the default list because that would be a breaking change. Additionally, the exact format of the module may change in the future, for example to handle right-aligned prompt.
|
||||
|
||||
The `vcs` module displays the current active Version Control System (VCS). The module will be shown only if a configured VCS is currently in use.
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Default | Description |
|
||||
| ---------------- | ----------------------------------------------------------- | ----------------------------------------------------- |
|
||||
| `order` | `["git", "hg", "pijul", "fossil"]` | The order in which to search VCSes. |
|
||||
| `fossil_modules` | `"$fossil_branch$fossil_metrics"` | Modules to show when a Fossil repository is found. |
|
||||
| `git_modules` | `"$git_branch$git_commit$git_state$git_metrics$git_status"` | Modules to show when a Git repository is found. |
|
||||
| `hg_modules` | `"$hg_branch$hg_state"` | Modules to show when a Mercurial repository is found. |
|
||||
| `pijul_modules` | `"$pijul_channel"` | Modules to show when a Pijul repository is found. |
|
||||
| `disabled` | `false` | Disables the `vcs` module. |
|
||||
|
||||
### Example
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[vcs]
|
||||
# Will look for Git then Pijul if not found but not for other VCSes at all
|
||||
order = [
|
||||
"git",
|
||||
"pijul",
|
||||
]
|
||||
# Any module (except `$vcs` itself to avoid infinite loops) can be included here
|
||||
git_modules = "$git_branch${custom.foo}"
|
||||
|
||||
# See documentation for custom modules
|
||||
[custom.foo]
|
||||
command = 'echo foo'
|
||||
detect_files = ['foo']
|
||||
when = ''' test "$HOME" = "$PWD" '''
|
||||
format = ' transcending [$output]($style)'
|
||||
```
|
||||
|
||||
## VCSH
|
||||
|
||||
The `vcsh` module displays the current active [VCSH](https://github.com/RichiH/vcsh) repository. The module will be shown only if a repository is currently in use.
|
||||
|
||||
@@ -408,7 +408,7 @@ Daha fazla özelleştirme seçeneği için:
|
||||
|
||||
## 🤝 Katkıda Bulunmak
|
||||
|
||||
Katılımcılara **yetenek düzeyleri fark etmeksizin**, her zaman açığız! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/labels/"🌱%20good%20first%20issue").
|
||||
Katılımcılara **yetenek düzeyleri fark etmeksizin**, her zaman açığız! If you're looking to ease your way into the project, try out a [good first issue](https://github.com/starship/starship/issues?q=state%3Aopen%20label%3A%22%F0%9F%8C%B1%20good%20first%20issue%22).
|
||||
|
||||
Eğer ingilizce harici bir dili akıcı seviyede kullanabiliyorsanız, dosyaların diğer diller ile güncel bir şekilde çevirilebilmesi için yardımlarınızı bekliyoruz. Çeviriye [Starship Crowdin](https://translate.starship.rs/)'den destekte bulunabilirsiniz.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ onMounted(() => {
|
||||
```
|
||||
|
||||
|
||||
#### Powershell
|
||||
#### PowerShell
|
||||
|
||||
Додайте наступний рядок в кінець `Microsoft.PowerShell_profile.ps1`. Ви можете перевірити розташування цього файлу, звернувшись до змінної `$PROFILE` у PowerShell. Зазвичай це `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` або `~/.config/powershell/Microsoft.PowerShell_profile.ps1` у -Nix.
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ function Invoke-Starship-PreCommand {
|
||||
Invoke-Expression (&starship init powershell)
|
||||
```
|
||||
|
||||
## Командний рядок праворуч
|
||||
## Командний рядок праворуч {#enable-right-prompt}
|
||||
|
||||
Деякі оболонки підтримують вивід командного рядка праворуч. Starship може встановити вміст правої частини командного рядка за допомогою параметра `right_format`. Будь-який модуль, який можна використовувати у `format`, також підтримується у `right_format`. Змінна `$all` міститиме лише модулі, які явно не використовується, а ні в `format`, а ні в `right_format`.
|
||||
|
||||
@@ -266,7 +266,317 @@ right_format = """$all"""
|
||||
continuation_prompt = '▶▶ '
|
||||
```
|
||||
|
||||
## Рядки стилів
|
||||
## Рядок стану для Claude Code
|
||||
|
||||
Starship підтримує показ власного рядка стану під час роботи в Claude Code — інструменті командного рядка від Anthropic, призначеному для інтерактивного програмування за допомогою Claude. Ця рядок стану надає інформацію в режимі реального часу про вашу сесію Claude, зокрема про використовувану модель, використання вікна контексту та вартість сесії.
|
||||
|
||||
Докладнішу інформацію про функцію рядка стану Claude Code див. у [документації щодо рядка стану Claude Code](https://code.claude.com/docs/en/statusline).
|
||||
|
||||
### Встановлення
|
||||
|
||||
Щоб використовувати Starship як рядок стану Claude Code:
|
||||
|
||||
1. Запустіть `/statusline` в Claude Code і попросіть його налаштувати Starship, або вручну додати наступне на Ваш `.claude/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"statusLine": {
|
||||
"type": "command",
|
||||
"command": "starship statusline claude-code"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Налаштуйте вигляд рядка стану у файлі `~/.config/starship.toml` (див. розділ [Налаштування](#configuration) нижче)
|
||||
|
||||
### Огляд
|
||||
|
||||
При запуску з параметром `starship statusline claude-code` Starship отримує дані сеансу Claude Code через стандартний ввід (stdin) і показує рядок стану, використовуючи спеціальний профіль з назвою `claude-code`.
|
||||
|
||||
Профіль містить три спеціалізовані модулі:
|
||||
|
||||
- `claude_model`: Показує поточну модель, яка використовується в Claude
|
||||
- `claude_context`: Показує використання контекстного вікна за допомогою візуального індикатора
|
||||
- `claude_cost`: Показує вартість сеансу та статистичні дані
|
||||
|
||||
Типовий формат профілю:
|
||||
|
||||
```toml
|
||||
[profiles]
|
||||
claude-code = "$claude_model$git_branch$claude_context$claude_cost"
|
||||
```
|
||||
|
||||
### Налаштування
|
||||
|
||||
Ви можете налаштувати рядок стану коду Claude Code змінивши профіль `claude-code` і окремі конфігурації модулів в `~/.config/starship.toml`:
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Customize the claude-code profile
|
||||
[profiles]
|
||||
claude-code = "$claude_model$claude_context$claude_cost"
|
||||
|
||||
# Configure individual modules
|
||||
[claude_model]
|
||||
format = "[$symbol$model]($style) "
|
||||
symbol = "🤖 "
|
||||
style = "bold blue"
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge $percentage]($style) "
|
||||
gauge_width = 10
|
||||
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost]($style) "
|
||||
symbol = "💰 "
|
||||
```
|
||||
|
||||
### Claude Model
|
||||
|
||||
Модуль `claude_model` показує поточну модель Claude, яка використовується в сесії.
|
||||
|
||||
#### Параметри
|
||||
|
||||
| Параметр | Стандартно | Опис |
|
||||
| --------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `format` | `'[$symbol$model]($style) '` | Формат модуля. |
|
||||
| `symbol` | `'🤖 '` | Симовл, який показується перед назвою моделі. |
|
||||
| `style` | `'bold blue'` | Стиль модуля. |
|
||||
| `model_aliases` | `{}` | Звʼязує ідентифікатори моделей або їхні назви з коротшими псевдонімами. Спочатку перевіряється ідентифікатор, потім назва. |
|
||||
| `disabled` | `false` | Вимикає модуль `claude_model`. |
|
||||
|
||||
#### Змінні
|
||||
|
||||
| Змінна | Приклад | Опис |
|
||||
| --------- | ------------------- | ---------------------------------------- |
|
||||
| model | `Claude 3.5 Sonnet` | Імʼя поточної моделі |
|
||||
| model_id | `claude-3-5-sonnet` | ID моделі |
|
||||
| symbol | | Віддзеркалює значення параметра `symbol` |
|
||||
| style\* | | Віддзеркалює значення параметра `style` |
|
||||
|
||||
\*: Ця змінна може бути використана лише як частина стилю рядка
|
||||
|
||||
#### Приклади
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Базові налаштування
|
||||
[claude_model]
|
||||
format = "on [$symbol$model]($style) "
|
||||
symbol = "🧠 "
|
||||
style = "bold cyan"
|
||||
|
||||
# Використання псевдонімів для моделей із власними назвами постачальників
|
||||
# Аліаси можна створити за ідентифікатором моделі або за її назвою
|
||||
[claude_model.model_aliases]
|
||||
# Аліас за ID моделі від постачальника (напр. AWS Bedrock)
|
||||
"global.anthropic.claude-sonnet-4-5-20250929-v1:0" = "Sonnet 4.5"
|
||||
# Аліас за назвою
|
||||
"Claude Sonnet 4.5 (Vendor Proxy)" = "Sonnet"
|
||||
```
|
||||
|
||||
### Claude Context
|
||||
|
||||
Модуль `claude_context` показує використання контекстного вікна у вигляді відсотка і візуального індикатора. Стиль автоматично змінюється на основі налаштованих порогів.
|
||||
|
||||
#### Параметри
|
||||
|
||||
| Параметр | Стандартно | Опис |
|
||||
| ---------------------- | --------------------------------- | --------------------------------------------------------------------------- |
|
||||
| `format` | `'[$gauge $percentage]($style) '` | Формат модуля. |
|
||||
| `symbol` | `''` | Символ, який показується перед індикатором. |
|
||||
| `gauge_width` | `5` | Ширина індикатора в символах. |
|
||||
| `gauge_full_symbol` | `'█'` | Символ, який використовується для заповнених сегментів індикатора. |
|
||||
| `gauge_partial_symbol` | `'▒'` | Символ, який використовується для частково заповнених сегментів індикатора. |
|
||||
| `gauge_empty_symbol` | `'░'` | Символ, який використовується для не заповнених сегментів індикатора. |
|
||||
| `display` | [дивіться нижче](#display) | Налаштування порогів та стилів. |
|
||||
| `disabled` | `false` | Вимикає модуль `claude_context`. |
|
||||
|
||||
##### Display
|
||||
|
||||
Параметр `display` — це масив об’єктів, які визначають порогові значення та стилі для різних рівнів використання. Модуль використовує стиль із найвищим порогом відповідності або приховує модуль, якщо `hidden` має значення `true`.
|
||||
|
||||
| Параметр | Стандартно | Опис |
|
||||
| ----------- | ------------ | ----------------------------------------------------------------------------------- |
|
||||
| `threshold` | `0.0` | Мінімальний відсоток використання контекстних вікон, що відповідає цій конфігурації |
|
||||
| `style` | `bold green` | Значення `style`, якщо ця конфігурація візуалізації має збіг |
|
||||
| `hidden` | `false` | Приховати цей модуль, якщо він збігається з конфігурацією. |
|
||||
|
||||
```toml
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
hidden = true
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 30
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 60
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 80
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Змінні
|
||||
|
||||
| Змінна | Приклад | Опис |
|
||||
| ---------------------------- | ------- | ------------------------------------------------------------------------- |
|
||||
| gauge | `██▒░░` | Візуальне представлення використання контексту |
|
||||
| percentage | `65%` | Використання контексту у відсотках |
|
||||
| input_tokens | `45.2k` | Загальна кількість input-токенів, використаних у розмові |
|
||||
| output_tokens | `12.3k` | Загальна кількість output-токенів, використаних у розмові |
|
||||
| curr_input_tokens | `5.1k` | Кількість input-токенів в останньому API-виклику |
|
||||
| curr_output_tokens | `1.2k` | Кількість output-токенів в останньому API-виклику |
|
||||
| curr_cache_creation_tokens | `1.5k` | Кеш з токенів створення з останнього виклику API |
|
||||
| curr_cache_read_tokens | `23.4k` | Кеш з токенів читання з останнього виклику API |
|
||||
| total_tokens | `200k` | Загальний розмір контекстного вікна |
|
||||
| symbol | | Віддзеркалює значення параметра `symbol` |
|
||||
| style\* | | Повторює стиль, що збігається з відповідним пороговим значення для показу |
|
||||
|
||||
\*: Ця змінна може бути використана лише як частина стилю рядка
|
||||
|
||||
#### Приклади
|
||||
|
||||
**Тільки індикатор**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$gauge]($style) "
|
||||
gauge_width = 10
|
||||
```
|
||||
|
||||
**Докладні відомості про використання токенів**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
format = "[$percentage ($input_tokens in / $output_tokens out)]($style) "
|
||||
```
|
||||
|
||||
**Власні символи для індикатора**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[claude_context]
|
||||
gauge_full_symbol = "▰"
|
||||
gauge_partial_symbol = ""
|
||||
gauge_empty_symbol = "▱"
|
||||
gauge_width = 10
|
||||
format = "[$gauge]($style) "
|
||||
```
|
||||
|
||||
**Власні порогові значення**
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 0
|
||||
style = "bold green"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 50
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 75
|
||||
style = "bold orange"
|
||||
|
||||
[[claude_context.display]]
|
||||
threshold = 90
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
### Claude Cost
|
||||
|
||||
Модуль `claude_cost` показує загальну вартість поточної сесії Claude Code в доларах США. Як і `claude_context`, він підтримує стилізацію на основі порогових значень.
|
||||
|
||||
#### Параметри
|
||||
|
||||
| Параметр | Стандартно | Опис |
|
||||
| ---------- | ---------------------------------- | -------------------------------------------- |
|
||||
| `format` | `'[$symbol(\\$$cost)]($style) '` | Формат модуля. |
|
||||
| `symbol` | `'💰 '` | Символ, який показується перед сумою витрат. |
|
||||
| `display` | [дивіться нижче](#display-1) | Налаштування порогів та стилів. |
|
||||
| `disabled` | `false` | Вимикає модуль `claude_cost`. |
|
||||
|
||||
##### Display
|
||||
|
||||
Параметр `display` — це масив об’єктів, які визначають порогові значення та стилі для порогових значень витрат. Модуль використовує стиль із найвищим порогом відповідності або приховує модуль, якщо `hidden` має значення `true`.
|
||||
|
||||
| Параметр | Стандартно | Опис |
|
||||
| ----------- | ------------ | ------------------------------------------------------------ |
|
||||
| `threshold` | `0.0` | Мінімальна вартість у доларах США для такої конфігурації |
|
||||
| `style` | `bold green` | Значення `style`, якщо ця конфігурація візуалізації має збіг |
|
||||
| `hidden` | `false` | Приховати цей модуль, якщо він збігається з конфігурацією. |
|
||||
|
||||
**Стандартні налаштування:**
|
||||
|
||||
```toml
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 1.0
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 5.0
|
||||
style = "bold red"
|
||||
```
|
||||
|
||||
#### Змінні
|
||||
|
||||
| Змінна | Приклад | Опис |
|
||||
| ------------- | -------- | ------------------------------------------------------------------------- |
|
||||
| cost | `1.23` | Загальна вартість сесії у доларах (з центами) |
|
||||
| duration | `1m 30s` | Загальна тривалість сеансу |
|
||||
| api_duration | `45s` | Загальна тривалість API-виклику |
|
||||
| lines_added | `1.2k` | Загальна кількість доданих рядків коду |
|
||||
| lines_removed | `500` | Загальна кількість вилучених рядків коду |
|
||||
| symbol | | Віддзеркалює значення параметра `symbol` |
|
||||
| style\* | | Повторює стиль, що збігається з відповідним пороговим значення для показу |
|
||||
|
||||
\*: Ця змінна може бути використана лише як частина стилю рядка
|
||||
|
||||
#### Приклади
|
||||
|
||||
```toml
|
||||
# ~/.config/starship.toml
|
||||
|
||||
# Витрати зі статистикою змін у коді
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost (+$lines_added -$lines_removed)]($style) "
|
||||
|
||||
# Приховати модуль, доки вартість не перевищить $0,10
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.0
|
||||
hidden = true
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 0.10
|
||||
style = "bold yellow"
|
||||
|
||||
[[claude_cost.display]]
|
||||
threshold = 2.0
|
||||
style = "bold red"
|
||||
|
||||
# Показувати інформацію про тривалість роботи
|
||||
[claude_cost]
|
||||
format = "[$symbol$cost ($duration)]($style) "
|
||||
```
|
||||
|
||||
## Рядки стилів {#style-strings}
|
||||
|
||||
Рядки стилю — список слів, розділених пробілами. Слова не чутливі до регістру (наприклад `bold` і `BoLd` вважаються однаковими). Кожне слово може бути одним з наступних:
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user