# nkh/ftl architecture

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

- Interactive diagram: https://gitdiagram.com/nkh/ftl
- Repository: https://github.com/nkh/ftl

## Overview

ftl is a Bash-based terminal file manager designed around tmux and live previews. Its runtime tree separates core navigation, bindings and commands, filters, preview generators and viewers, and metadata tags. The README supports the user-to-manager and manager-to-tmux relationships; without source excerpts, internal calls and data flows cannot be established, so those links are omitted.

Main entry points: [`config/ftl/etc/core/ftl`](https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/ftl) (File manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core navigation"]
  node_ftl["File manager"]
  node_setup["Runtime setup"]
end

subgraph group_interaction["Commands and bindings"]
  node_keyboard["Keyboard handling"]
  node_bindings["Bindings"]
  node_commands["Commands"]
  node_user_commands["User commands"]
end

subgraph group_discovery["Filters and tags"]
  node_filters["Entry filters"]
  node_dir_filter["Directory filtering"]
  node_tags["Entry tags"]
end

subgraph group_previews["Preview handling"]
  node_generators["Preview generators"]
  node_viewers["Preview viewers"]
  node_preview_lock["Preview locking"]
end

node_user(("Terminal user"))
node_tmux["tmux"]

node_user -->|"uses"| node_ftl
node_ftl -->|"uses for previews"| node_tmux

click node_ftl "https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/ftl"
click node_setup "https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/ftl_setup"
click node_keyboard "https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/keyboard"
click node_bindings "https://github.com/nkh/ftl/tree/main/config/ftl/etc/bindings"
click node_commands "https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/commands"
click node_user_commands "https://github.com/nkh/ftl/tree/main/config/ftl/etc/commands"
click node_filters "https://github.com/nkh/ftl/tree/main/config/ftl/etc/filters"
click node_dir_filter "https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/dir_file_filter"
click node_tags "https://github.com/nkh/ftl/tree/main/config/ftl/etc/etags"
click node_generators "https://github.com/nkh/ftl/tree/main/config/ftl/etc/generators"
click node_viewers "https://github.com/nkh/ftl/tree/main/config/ftl/etc/viewers"
click node_preview_lock "https://github.com/nkh/ftl/tree/main/config/ftl/etc/core/lib/lock_preview"

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_ftl,node_setup,node_user toneBlue
class node_keyboard,node_bindings,node_commands,node_user_commands toneAmber
class node_filters,node_dir_filter,node_tags toneMint
class node_generators,node_viewers,node_preview_lock toneRose
class node_tmux toneIndigo
```

## Components

### Core navigation

- [File manager](https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/ftl): `config/ftl/etc/core/ftl`
- [Runtime setup](https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/ftl_setup): `config/ftl/etc/core/ftl_setup`

### Commands and bindings

- [Keyboard handling](https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/keyboard): `config/ftl/etc/core/keyboard`
- [Bindings](https://github.com/nkh/ftl/tree/main/config/ftl/etc/bindings): `config/ftl/etc/bindings`
- [Commands](https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/commands): `config/ftl/etc/core/commands`
- [User commands](https://github.com/nkh/ftl/tree/main/config/ftl/etc/commands): `config/ftl/etc/commands`

### Filters and tags

- [Entry filters](https://github.com/nkh/ftl/tree/main/config/ftl/etc/filters): `config/ftl/etc/filters`
- [Directory filtering](https://github.com/nkh/ftl/blob/main/config/ftl/etc/core/dir_file_filter): `config/ftl/etc/core/dir_file_filter`
- [Entry tags](https://github.com/nkh/ftl/tree/main/config/ftl/etc/etags): `config/ftl/etc/etags`

### Preview handling

- [Preview generators](https://github.com/nkh/ftl/tree/main/config/ftl/etc/generators): `config/ftl/etc/generators`
- [Preview viewers](https://github.com/nkh/ftl/tree/main/config/ftl/etc/viewers): `config/ftl/etc/viewers`
- [Preview locking](https://github.com/nkh/ftl/tree/main/config/ftl/etc/core/lib/lock_preview): `config/ftl/etc/core/lib/lock_preview`

### Other components

- **Terminal user**
- **tmux**

## Connections

- Terminal user → File manager: uses (evidence: `README.md`)
- File manager → tmux: uses for previews (evidence: `README.md`)
