Skip to main content

Crate ite_cli

Crate ite_cli 

Source
Expand description

Internal implementation crate shared by the ite binary, integration tests, and support programs. This is not a supported public library API.

Source adapters (fstree, json_tree) produce the neutral tree model. app coordinates that model with keys, config, jump, and keybindings; ui renders the result. Process and terminal I/O stay at the binary boundary, with runner and opener providing the subprocess edges for shell bindings and the platform’s default file opener.

Modules§

app
I/O-free interaction coordinator. App owns the tree-list state, effective keymap, expansion/focus behavior, modal jump picker, keybinding-panel state, and the execution of configured AppCommands.
cli
The declarative command-line surface: clap argument definitions and parsing for expansion policy, filesystem/JSON source selection, ignore behavior, and configuration paths.
config
User-configuration boundary and application-command vocabulary. It loads and merges TOML files, parses keybinding tables into actions, and names the commands that app can execute.
fstree
Filesystem scanner that transforms a directory into source-neutral tree data, lazily: scan walks only the top level, and each directory’s contents come from a targeted depth-1 walk when it is expanded or when the app’s background sweep reaches it. The targeted walk keeps full ignore semantics — ignore::WalkBuilder’s standard filters read ignore files in parent directories, so a lazily walked subdirectory honors the same rules the eager scan did. Unreadable directories are reported through the tree’s error list (banner + stderr on exit) instead of being skipped silently.
json_tree
Transforms JSON input into source-neutral tree data.
jump
Pure state machine for the / jump picker: a fuzzy finder over every node in the current tree.
keybindings
View-model and interaction state for the keybinding reference panel. It turns the application’s effective keymap into stable display entries, lays them out as a width-aware column grid, and tracks open/scroll/onscreen-area state for keyboard and mouse routing.
keys
Normalized keyboard vocabulary shared by configuration, the application, and modal pickers. It converts crossterm events and config spellings such as ctrl+e into the same compact Key value.
opener
Subprocess boundary for the platform’s default “open this path” program. app decides what to open; this module knows how, as one table arm per operating system.
profile
Lightweight span profiler, compiled in only under the profile cargo feature (what cargo profile-tui builds with). Shipped builds contain zero instrumentation: without the feature, span() returns a unit struct with no Drop, which the optimizer erases entirely. When compiled in, recording is enabled by ITE_PROFILE=<output-path> and the dump is a plain-text table. Stats and format_duration stay unconditional — the profile driver uses them for its own latency report.
runner
Subprocess boundary for configured shell bindings. The executable calls this module when app returns a shell effect; interaction policy remains in app, and terminal suspension/resumption remains in main.
tree
Source-neutral tree model at the center of the application. Filesystem and JSON adapters build its flat node arena; app navigates it and ui renders it through the tui_treelistview::TreeModel implementation.
ui
Ratatui rendering for the tree and its modal/auxiliary surfaces. This module turns App, Jump, and keybinding view-model state into buffer cells and records viewport geometry needed by paging and mouse routing; it owns no event loop or source data.