Starship Module Configuration Guide
Intermediatev1.0.0
Configure essential Starship modules — directory truncation, git branch and status, language versions, command duration, and custom module formatting in starship.toml.
Content
Overview
Starship prompts are built from modules — each showing a piece of contextual information. This skill covers configuring the most useful modules with optimal settings for developer workflows.
Why This Matters
- -Contextual awareness — see git status, language version, and cloud profile at a glance
- -Customizable — each module has format, style, and detection options
- -Performance — disable unused modules for faster prompts
How It Works
Step 1: Create starship.toml
Step 2: Configure Core Modules
Step 3: Initialize in Shell
Module Categories
Always Enabled
| Module | Purpose |
|---|---|
| directory | Current path |
| git_branch | Branch name |
| git_status | Modified/staged/ahead |
| character | Success/error indicator |
| cmd_duration | Slow command alert |
Enable Per-Need
| Module | When |
|---|---|
| nodejs, python, rust, go | Language projects |
| docker_context | Docker development |
| aws, gcloud | Cloud projects |
| kubernetes | K8s clusters |
| terraform | IaC projects |
Best Practices
- -Set format string to control module order explicitly
- -Use truncation for directory paths (3 segments max)
- -Show cmd_duration only for slow commands (> 2 seconds)
- -Disable unused language modules — they add scan time
- -Use Nerd Font symbols for compact, visual module labels
Common Mistakes
- -Not creating starship.toml (uses defaults for everything)
- -Enabling all modules (slow, noisy prompt)
- -Missing Nerd Font (icons show as boxes/question marks)
- -Not setting min_time for cmd_duration (shows for every command)
FAQ
Discussion
Loading comments...