How turtlethom/pathpin works
fcd is a terminal shortcut manager: users save directories under their home directory, then print, remove, clear, jump to one by label, or select one in an interactive menu. Startup loads shared configuration before Cobra dispatches commands. The interactive route builds a styled list, runs the Bubble Tea model, and prints the selected path; management commands update the same persisted configuration. Colors and shell completion are additional documented capabilities. Evidence is limited to the README and indexed excerpts; unexcerpted command implementations are represented only where their capability is documented.
Main entry points: root.go Command router · config.go Config handling · main.go Startup · colors.go Colors command
Components 18
CLI entry
- Startup
main.go - Command router
cmd/root.go
Shortcut workflows
- Add shortcut
cmd/add.go - Remove shortcut
cmd/remove.go - Clear shortcuts
cmd/clear.go - Print shortcuts
cmd/print.go - Branch by label
cmd/branch.go
Interactive menu
- Menu orchestration
cmd/root.go - Menu interaction
internal/model.go - Menu styling
internal/styles.go
Settings and completion
- Colors command
cmd/colors.go - Set colors
cmd/colors_set.go - List colors
cmd/colors_list.go - Shell completion
cmd/completion.go
Configuration state
- Config handling
internal/config.go - User config file
Other components
- User
- Terminal output
Connections 26
- User → Startup: runs fcd
README.md - Startup → Config handling: loads config
main.go - Startup → Command router: starts commands
main.go - Command router → Add shortcut: dispatches
cmd/root.go - Command router → Remove shortcut: dispatches
cmd/root.go - Command router → Clear shortcuts: dispatches
cmd/root.go - Command router → Print shortcuts: dispatches
cmd/root.go - Command router → Branch by label: dispatches
cmd/root.go - Command router → Colors command: dispatches
cmd/root.go - Command router → Shell completion: dispatches
cmd/root.go - Command router → Menu orchestration: runs by default
cmd/root.go - Config handling → User config file: loads and saves
internal/config.go - Add shortcut → Config handling: adds and saves
cmd/add.go - Remove shortcut → Config handling: saves changes
cmd/remove.go - Clear shortcuts → Config handling: saves changes
cmd/clear.go - Print shortcuts → Terminal output: prints list
cmd/print.go - Branch by label → Terminal output: prints path
cmd/branch.go - Menu orchestration → Config handling: reads shortcuts
cmd/root.go - Menu orchestration → Menu styling: creates styles
cmd/root.go - Menu orchestration → Menu interaction: runs model
cmd/root.go - Menu styling → Menu interaction: styles list view
internal/styles.go - Menu orchestration → Terminal output: prints selected path
cmd/root.go - Colors command → Set colors: offers set
README.md - Colors command → List colors: offers list
README.md - Set colors → Config handling: saves colors
cmd/colors_set.go - User → Shell completion: requests scripts
README.md