pure.go 🐐 [](https://github.com/edouard-lopez/pure.go/actions/workflows/ci.yml)
December 10, 2025 · View on GitHub
Exploring Golang by re-implementing pure prompt.
:information_source: This is a really basic and naive implementation.
Preview

Installation
-
Download the release binary for your OS/Arch
-
Allow execution
chmod u+x /path/to/pure -
Try to execute manually
$ /path/to/pure -version --last-command-status $status # should print something like: ~/projects/contributions/pure.go 🐐go1.20.3 0 ❯
Configuring Shell Prompt
Fish
Edit $__fish_config_dir/functions/fish_prompt.fish with:
function fish_prompt
/path/to/pure -version --last-command-status $status
end
Zsh
PROMPT=$(/path/to/pure -version --last-command-status $status)
Bash
export PS1='$(/path/to/pure -version --last-command-status $status)'
Development
Usage
❯ go run ./cmd/cli.go -version --last-command-status $status
or with the built binary
❯ make build
❯ ./pure --last-command-status $status
# or
❯ make demo
Install
❯ make install
Test
❯ make test
Build
Create a pure binary in the project's root directory.
❯ make build
❯ ./pure --last-command-status $status
Todo
- create a
purepackage- add
purepackage togo.mod - add
purepackage togo.sum
- add
- print prompt
❯withpurepackage - test pure package output (with
testify) - create a CLI (with
clîr) - add current working directory to prompt
- add
go versionto prompt whengo.sumexists - configure Goreleaser
- add color to output
- Add Git segments
- add Git branch segment
Ports
- Original sindresorhus/pure Zsh implementation ;
- :fish: pure-fish/pure Fish implementation (features rich) ;
- :snake: edouard-lopez/pure.py Python implementation (partial features) ;
- :goat: edouard-lopez/pure.go Golang implementation (partial features) ;
- :gear: xcambar/purs Rust implementation ;
- :window: nickcox/pure-pwsh PowerShell implementation.
- :shell: krashikiworks/pure-prompt-bash Bash implementation.