The panda prompt
Show the company, branch and what's waiting right in your shell prompt whenever you're inside a clone.
Inside a clone, your prompt can show where you are and what's waiting, like git prompts do:
~/code/acme ๐ผ acme:main โ1 โ2 โ1Set it up#
gitpanda shell --installIt detects zsh or bash, shows exactly what it will add to ~/.zshrc or ~/.bashrc, and asks before
writing. It also adds ~/.local/bin to your PATH if it's missing. Open a new terminal to see it.
- In zsh it goes on the right side of your prompt (
RPROMPT), so it doesn't disturb your own. - In bash it goes at the start of your prompt (
PS1).
To see the snippet without installing it:
gitpanda shell zsh
gitpanda shell bashTo install without the question (for dotfiles scripts): gitpanda shell --install --yes.
What it shows#
| Mark | Meaning |
|---|---|
๐ผ acme:main |
The company and branch of the folder you're in |
โ1 |
1 file staged for the next commit |
โ2 |
2 files changed or new, not staged |
โ1 |
1 commit waiting to be pushed |
โ3 |
3 new files from your team, as of your last fetch |
โ |
Clean: nothing changed, nothing to push |
Outside a clone it shows nothing.
Fast and offline#
The prompt never talks to the network. It reads the clone's bookkeeping and only looks inside files whose size or modification time changed, so it stays fast even in large repositories.
Other shells and prompt tools#
gitpanda prompt prints the segment as plain text with colors, so you can use it anywhere:
gitpanda prompt # colored, for most prompt tools
gitpanda prompt --shell zsh # with zsh's %{ %} escapes
gitpanda prompt --shell bash # with bash's \[ \] escapesFor example, a Starship custom module:
[custom.gitpanda]
command = "gitpanda prompt"
when = "gitpanda prompt | grep -q ."
format = "$output "No emoji?#
If your terminal shows a box instead of ๐ผ, use the ASCII mark:
export GITPANDA_ASCII=1 # shows (o.o)Removing it#
Delete the lines starting with # gitpanda: (and the line after each) from ~/.zshrc or ~/.bashrc.