Build & run
make build # debug build
make release # release build
make test # run all tests
make install # install to ~/.cargo/bin
make setup # install + run ukrop setup --force
make clean # remove target/
Or use cargo directly:
cargo build # debug build
cargo test # run all tests
cargo build --release # optimized build
For a one-command dev rebuild that reloads your shell, add this to your ~/.zshrc:
ukrop-dev() {
cargo install --path . --force && source ~/.zshrc && ukrop setup --force
}
Project structure
src/
main.rs — entry point (thin wrapper calling ukrop::run())
bin/u.rs — `u` shortcut binary (same entry point)
cli.rs — clap CLI definition
lib.rs — library: module re-exports and run() with subcommand dispatch
config.rs — TOML configuration file, theme/layout structs, save support
demo.rs — demo data generation for screencasts
util.rs — XDG paths, path helpers
frecency.rs — frecency scoring (exponential decay)
db/
migrate.rs — schema migrations (v1, v2, v3) with column-existence checks
model.rs — DirEntry, CmdEntry, SshHostEntry structs
store.rs — SQLite operations with transactions, batch imports, stale cleanup
history/
bash.rs — bash history parser
zsh.rs — zsh history parser
fish.rs — fish history parser (YAML-like format)
shell/
bash.rs — bash init script template
zsh.rs — zsh init script template
fish.rs — fish init script template
ssh/
config.rs — ~/.ssh/config parser
tui/
app.rs — TUI state machine, panel state, event loop
ui.rs — ratatui rendering (3-panel layout, preview, match highlighting, config overlay)
input.rs — key bindings (cursor movement, word delete, Home/End, config dialog keys)
fuzzy.rs — nucleo two-tier matcher (substring + fuzzy) with match positions
tty_reader.rs — direct /dev/tty input reader (Home/End/Delete key support)
theme.rs — color theme resolution from ThemePreset to ratatui styles
config_dialog.rs — in-TUI config editor modal (field types, navigation, validation)
tests/ — integration tests
packaging/ — Homebrew formula and deb packaging
doc/website/ — static site for ukrop.org (this site)
Packaging
Homebrew
brew tap ukroporg/tap https://github.com/ukroporg/homebrew-tap
brew install ukroporg/tap/ukrop
Formula template lives at packaging/homebrew/ukrop.rb.
Debian / Ubuntu
cargo install cargo-deb
cargo deb
sudo dpkg -i target/debian/ukrop_*.deb
The deb package includes both ukrop and u binaries.