# osteensco/fasttravelcli architecture

> Architecture diagram of the GitHub repository osteensco/fasttravelcli, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/osteensco/fasttravelcli
- Repository: https://github.com/osteensco/fasttravelcli

## Overview

fastTravelCLI is a shell-oriented directory-navigation CLI. A user invokes it through a shell integration or directly; the Go entry point parses input, loads persisted bookmarks and settings when needed, and dispatches a command. Commands cover bookmark management, path resolution, session history, fuzzy directory selection, settings, and updates. The excerpts confirm entry-point loading, persistence helpers, query evaluators, and the settings UI; several command implementations are only partially shown, so their internal links are omitted or marked unverified.

Main entry points: [`ft/commands.go`](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go) (Command dispatch), [`main.go`](https://github.com/osteensco/fasttravelcli/blob/master/main.go) (CLI entry point), [`tui/settings/models.go`](https://github.com/osteensco/fasttravelcli/blob/master/tui/settings/models.go) (Settings interface), [`shells/bash/ftmain.sh`](https://github.com/osteensco/fasttravelcli/blob/master/shells/bash/ftmain.sh) (Shell integration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI entry"]
  node_shell_fn["Shell integration<br/>[ftmain.sh]"]
  node_main["CLI entry point<br/>[main.go]"]
  node_dispatch["Command dispatch<br/>[commands.go]"]
end

subgraph group_navigation["Navigation"]
  node_navigation_cmds["Directory navigation<br/>[commands.go]"]
  node_path_queries["Path resolution<br/>[query.go]"]
  node_history["Directory history<br/>[commands.go]"]
end

subgraph group_bookmarks["Bookmarks and state"]
  node_bookmark_ops["Bookmark management<br/>[commands.go]"]
  node_bookmark_data[("Bookmark persistence<br/>[io.go]")]
  node_settings_data[("Settings persistence<br/>[settings.go]")]
end

subgraph group_interactive["Interactive features"]
  node_fuzzy_bookmarks["Bookmark finder<br/>[commands.go]"]
  node_fuzzy_dirs["Directory finders<br/>[commands.go]"]
end

subgraph group_maintenance["Settings and maintenance"]
  node_settings_command["Settings command<br/>[commands.go]"]
  node_settings_tui["Settings interface<br/>[models.go]"]
  node_settings_views["Settings views<br/>[views.go]"]
  node_tui_bridge["TUI launcher<br/>[init.go]"]
  node_updater["Version updater<br/>[commands.go]"]
end

node_user(("Shell user"))
node_fzf["fzf and tree"]
node_github["GitHub releases"]

node_user -->|"invokes"| node_shell_fn
node_shell_fn -.->|"runs CLI"| node_main
node_main -->|"dispatches command"| node_dispatch
node_main -->|"loads bookmarks"| node_bookmark_data
node_main -->|"loads settings"| node_settings_data
node_dispatch -->|"updates bookmarks"| node_bookmark_data
node_dispatch -.->|"resolves paths"| node_path_queries
node_dispatch -.->|"handles navigation"| node_navigation_cmds
node_dispatch -.->|"handles bookmarks"| node_bookmark_ops
node_dispatch -.->|"handles history"| node_history
node_dispatch -.->|"opens finder"| node_fuzzy_bookmarks
node_dispatch -.->|"opens finder"| node_fuzzy_dirs
node_fuzzy_bookmarks -.->|"uses tools"| node_fzf
node_fuzzy_dirs -.->|"uses tools"| node_fzf
node_dispatch -.->|"handles settings"| node_settings_command
node_settings_command -->|"starts interface"| node_tui_bridge
node_tui_bridge -->|"runs settings UI"| node_settings_tui
node_settings_tui -.->|"renders views"| node_settings_views
node_settings_tui -->|"writes settings"| node_settings_data
node_dispatch -.->|"handles updates"| node_updater
node_updater -.->|"checks releases"| node_github

click node_shell_fn "https://github.com/osteensco/fasttravelcli/blob/master/shells/bash/ftmain.sh"
click node_main "https://github.com/osteensco/fasttravelcli/blob/master/main.go"
click node_dispatch "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"
click node_navigation_cmds "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"
click node_path_queries "https://github.com/osteensco/fasttravelcli/blob/master/ft/query.go"
click node_bookmark_ops "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"
click node_bookmark_data "https://github.com/osteensco/fasttravelcli/blob/master/data/io.go"
click node_settings_data "https://github.com/osteensco/fasttravelcli/blob/master/data/settings.go"
click node_history "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"
click node_fuzzy_bookmarks "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"
click node_fuzzy_dirs "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"
click node_settings_command "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"
click node_settings_tui "https://github.com/osteensco/fasttravelcli/blob/master/tui/settings/models.go"
click node_settings_views "https://github.com/osteensco/fasttravelcli/blob/master/tui/settings/views.go"
click node_tui_bridge "https://github.com/osteensco/fasttravelcli/blob/master/tui/init.go"
click node_updater "https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_shell_fn,node_main,node_dispatch,node_user toneBlue
class node_navigation_cmds,node_path_queries,node_history toneAmber
class node_bookmark_ops,node_bookmark_data,node_settings_data toneMint
class node_fuzzy_bookmarks,node_fuzzy_dirs toneRose
class node_settings_command,node_settings_tui,node_settings_views,node_tui_bridge,node_updater,node_fzf,node_github toneIndigo
```

## Components

### CLI entry

- [Shell integration](https://github.com/osteensco/fasttravelcli/blob/master/shells/bash/ftmain.sh): `shells/bash/ftmain.sh`
- [CLI entry point](https://github.com/osteensco/fasttravelcli/blob/master/main.go): `main.go`
- [Command dispatch](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`

### Navigation

- [Directory navigation](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`
- [Path resolution](https://github.com/osteensco/fasttravelcli/blob/master/ft/query.go): `ft/query.go`
- [Directory history](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`

### Bookmarks and state

- [Bookmark management](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`
- [Bookmark persistence](https://github.com/osteensco/fasttravelcli/blob/master/data/io.go): `data/io.go`
- [Settings persistence](https://github.com/osteensco/fasttravelcli/blob/master/data/settings.go): `data/settings.go`

### Interactive features

- [Bookmark finder](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`
- [Directory finders](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`

### Settings and maintenance

- [Settings command](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`
- [Settings interface](https://github.com/osteensco/fasttravelcli/blob/master/tui/settings/models.go): `tui/settings/models.go`
- [Settings views](https://github.com/osteensco/fasttravelcli/blob/master/tui/settings/views.go): `tui/settings/views.go`
- [TUI launcher](https://github.com/osteensco/fasttravelcli/blob/master/tui/init.go): `tui/init.go`
- [Version updater](https://github.com/osteensco/fasttravelcli/blob/master/ft/commands.go): `ft/commands.go`

### Other components

- **Shell user**
- **fzf and tree**
- **GitHub releases**

## Connections

- Shell user → Shell integration: invokes (evidence: `README.md`)
- Shell integration → CLI entry point: runs CLI
- CLI entry point → Command dispatch: dispatches command (evidence: `main.go`)
- CLI entry point → Bookmark persistence: loads bookmarks (evidence: `main.go`)
- CLI entry point → Settings persistence: loads settings (evidence: `main.go`)
- Command dispatch → Bookmark persistence: updates bookmarks (evidence: `ft/commands.go`)
- Command dispatch → Path resolution: resolves paths
- Command dispatch → Directory navigation: handles navigation (evidence: `ft/commands.go`)
- Command dispatch → Bookmark management: handles bookmarks (evidence: `ft/commands.go`)
- Command dispatch → Directory history: handles history (evidence: `ft/commands.go`)
- Command dispatch → Bookmark finder: opens finder (evidence: `ft/commands.go`)
- Command dispatch → Directory finders: opens finder (evidence: `ft/commands.go`)
- Bookmark finder → fzf and tree: uses tools
- Directory finders → fzf and tree: uses tools
- Command dispatch → Settings command: handles settings (evidence: `ft/commands.go`)
- Settings command → TUI launcher: starts interface (evidence: `ft/commands.go`)
- TUI launcher → Settings interface: runs settings UI (evidence: `tui/init.go`)
- Settings interface → Settings views: renders views
- Settings interface → Settings persistence: writes settings (evidence: `tui/settings/models.go`)
- Command dispatch → Version updater: handles updates (evidence: `ft/commands.go`)
- Version updater → GitHub releases: checks releases
