Show your Neon branch in your terminal prompt (Starship) โ€” copy-paste / agent-ready setup A developer created a Starship prompt segment that displays the current Neon branch linked to a directory. The segment uses the Neon CLI's `neon status --current-branch` command, which reads a local `.neon` file without making network requests. It is hidden when not in a Neon project, and the setup is provided as a copy-paste configuration for Starship. Tweet: https://x.com/thisistonydang/status/2071723089755603091 https://x.com/thisistonydang/status/2071723089755603091 A drop-in Starship https://starship.rs segment that displays the Neon branch your current directory is linked to, powered by the Neon CLI. It appears only inside directories linked to a Neon project, and shows nothing everywhere else. ~/code/my-app ๐ŸŒฟ main โฏ Using a coding agent?Hand it this whole file by saying:"Set up Starship with the Neon branch segment by following this gist:The steps below are ordered, idempotent safe to re-run , and self-checking. https://gist.github.com/thisistonydang/0b6c03ec9aa9b619ffecd48f58fd40c7 " - Adds a custom.neon module to Starship that runs neon status --current-branch . - That command prints the branch pinned in the nearest .neon file walking up the directory tree and makes no network request โ€” it just reads a local file. - The segment is hidden when you're not in a Neon project the command exits non-zero when no branch is pinned , so you never get a stray icon. Node.js โ‰ฅ 22 โ€” node --version Neon CLI โ‰ฅ 2.28.0 โ€” provides neon status --current-branch . Install/update: npm install -g neonctl the installed commands are neon and neonctl . Starship โ€” https://starship.rs/guide/ -installation https://starship.rs/guide/ -installation A linked Neon project in the directory where you want the branch to show: neon link then neon checkout