chip/pathos

pathos - CLI for editing a PATH env variable

146

stars

48

commits

Go

primary language

Aug 31, 2026

updated

bash
bubbles
bubbletea
cli
env
environment-variables
go
golang
path
shell
unix
zsh

README

pathos - CLI for editing a PATH env variable

Ruby Version

chip/pathos.rb

Go Version

This is the Go version.

Background

If you're like me, you might have a number of export PATH statements littering your shell resource file (e.g., .zshrc, .bashrc, etc). Over time, many directory entries get added and revised. Those that remain eventually become unnecessary, are mistakenly duplicated, or represent directories that no longer exist on the system. This is my attempt at cleaning up PATH environment variable. Hopefully, others will find this to be useful.

Demo

pathos DEMO

Built with the following:

Installation

go install github.com/chip/pathos@latest

IMPORTANT

Be sure to save your changes with S (uppercase letter S) before quitting pathos, as changes will not be saved automatically.

Each time you save your changes to the directory list, pathos will build a revised export $PATH statement that is written to $HOME/pathos.sh.

To use the new PATH, ~/pathos.sh MUST BE SOURCED to take effect within your shell.

source $HOME/pathos.sh

Like any typical Bubble Tea app, you have the following keys that are available for navigation:

KeyDescription
kMove up the list of directories
jMove down the list of directories
lMove to the next page
hMove to the previous page
g/homeMove to the top of the list
G/endMove to the end of the list
qQuit pathos (does NOT save changes)
?Toggle between regular and full help

Commands

KeyDescription
NAdd a new directory to the list at the current cursor position
DDelete a directory at the current cursor position
SSave all changes made to the list of directories

Color Highlighting

ColorDescription
  Yellow   Shows current cursor position
  Red   Indicates directories that do not exist
  Aqua   Indicates duplicate directories

Contributors

chip

48 commits

chip/pathos

pathos - CLI for editing a PATH env variable

146

stars

48

commits

Go

primary language

Aug 31, 2026

updated

bash
bubbles
bubbletea
cli
env
environment-variables
go
golang
path
shell
unix
zsh

README

pathos - CLI for editing a PATH env variable

Ruby Version

chip/pathos.rb

Go Version

This is the Go version.

Background

If you're like me, you might have a number of export PATH statements littering your shell resource file (e.g., .zshrc, .bashrc, etc). Over time, many directory entries get added and revised. Those that remain eventually become unnecessary, are mistakenly duplicated, or represent directories that no longer exist on the system. This is my attempt at cleaning up PATH environment variable. Hopefully, others will find this to be useful.

Demo

pathos DEMO

Built with the following:

Installation

go install github.com/chip/pathos@latest

IMPORTANT

Be sure to save your changes with S (uppercase letter S) before quitting pathos, as changes will not be saved automatically.

Each time you save your changes to the directory list, pathos will build a revised export $PATH statement that is written to $HOME/pathos.sh.

To use the new PATH, ~/pathos.sh MUST BE SOURCED to take effect within your shell.

source $HOME/pathos.sh

Like any typical Bubble Tea app, you have the following keys that are available for navigation:

KeyDescription
kMove up the list of directories
jMove down the list of directories
lMove to the next page
hMove to the previous page
g/homeMove to the top of the list
G/endMove to the end of the list
qQuit pathos (does NOT save changes)
?Toggle between regular and full help

Commands

KeyDescription
NAdd a new directory to the list at the current cursor position
DDelete a directory at the current cursor position
SSave all changes made to the list of directories

Color Highlighting

ColorDescription
  Yellow   Shows current cursor position
  Red   Indicates directories that do not exist
  Aqua   Indicates duplicate directories

Contributors

chip

48 commits

Languages

Go

100.0%