Open-Source Wikis

/

Starship

/

Subsystems

starship/starship

Subsystems

The internal building blocks that make a prompt happen, separate from the modules that produce the prompt's content. Where modules sit at the user-facing edge ("the rust module"), subsystems sit underneath ("the format-string parser").

Subsystem map

graph TD
    Main["src/main.rs<br/>CLI entry"] --> Print["Print<br/>(src/print.rs)"]
    Main --> InitScripts["Init scripts<br/>(src/init/)"]
    Main --> Configure["Configure<br/>(src/configure.rs)"]
    Main --> BugReport["Bug report<br/>(src/bug_report.rs)"]
    Print --> Context["Context<br/>(src/context.rs)"]
    Print --> Formatter["Formatter<br/>(src/formatter/)"]
    Context --> Config["Configuration<br/>(src/config.rs + src/configs/)"]
    Print --> Logger["Logger<br/>(src/logger.rs)"]
    Print --> Statusline["Statusline integration<br/>(src/utils/statusline.rs)"]
    Configure --> Config

Pages

Subsystem Page What lives there
Context Context The Context struct, properties, target, repo discovery, dir scanning
Configuration Configuration TOML loading, StarshipConfig, FullConfig, ModuleConfig trait, palette and style parsing, JSON Schema generation
Format string DSL Formatter The pest grammar, StringFormatter, VersionFormatter
Init scripts Init scripts The two-phase init, per-shell quirks
Presets Presets The preset system, build.rs codegen, packaged TOML files
Logger Logger The STARSHIP_LOG runtime logger
Bug report Bug report The starship bug-report flow
Statusline integration Statusline The starship statusline claude-code path
Configure subcommands Configure The starship config, print-config, toggle subcommands

Why split this way?

The repository's source tree is a flat src/ with one giant modules/ directory. Splitting subsystems off helps explain the parts that are not modules — the parsing, configuration, runtime, and integration layers that all modules depend on. If you're adding a module, focus on Modules. If you're touching the engine itself, this section is for you.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Subsystems – Starship wiki | Factory