| Crates.io | ferret-tracker |
| lib.rs | ferret-tracker |
| version | 0.1.4 |
| created_at | 2025-12-27 15:48:40.277738+00 |
| updated_at | 2025-12-28 19:10:24.087951+00 |
| description | A curious file tracker - monitors and logs new files in a searchable TUI |
| homepage | |
| repository | https://github.com/mohammad-albarham/ferret |
| max_upload_size | |
| id | 2007436 |
| size | 640,024 |
A lightweight, real-time file tracker with an interactive terminal UI for monitoring watched directories. Ferret maintains a persistent SQLite ledger of all detected files, making it easy to audit and browse file activity.
Ferret is designed for users who need to track files appearing in specific directories in real-time. Whether monitoring download folders, artifact outputs, or project directories, Ferret provides an intuitive interface with multiple view modes, filtering, and persistent storage.
From crates.io (once published):
cargo install ferret-tracker
From source:
git clone https://github.com/mohammad-albarham/Ferret.git
cd Ferret
cargo build --release
./target/release/ferret-tracker watch
# Start the watcher with interactive TUI
cargo run -- watch
# Watch specific directories
cargo run -- watch --watch ~/Downloads --watch ~/Desktop
# Run headless (no TUI, just database population)
cargo run -- watch --headless
While running, create files in watched directories to see them appear in the interface.
Press Tab to cycle between three view modes:
| Mode | Description |
|---|---|
| Flat | Chronological list of recent file events |
| Grouped | Files organized under folder headers |
| Tree | Nested folder hierarchy with expand/collapse |
| Key | Action |
|---|---|
Tab |
Cycle view mode |
↑ / ↓ or k / j |
Move selection up/down |
← / → or h / l |
Collapse/expand (Tree view) |
Space |
Toggle expand/collapse |
e / E |
Expand all / Collapse all (Tree view) |
Home / End |
Jump to start/end of list |
PgUp / PgDn |
Page up/down |
Enter |
View file details |
f |
Open filter menu |
/ |
Search by path |
o |
Open file with default program |
? |
Show help overlay |
q / Esc |
Quit or close overlay |
Configuration file location:
~/.config/ferret/config.toml%APPDATA%\ferret\config.toml# Directories to monitor recursively
watch_paths = [
"~/Downloads",
"~/Desktop",
"~/Projects"
]
# Glob patterns to exclude from monitoring
ignore_patterns = [
"**/node_modules/**",
"**/target/**",
"**/.git/**",
"**/.venv/**",
"**/*.tmp",
"**/*.swp"
]
# Minimum file size to log (bytes, 0 = all files)
min_size_bytes = 0
# Retention period for old entries (days, 0 = no cleanup)
retention_days = 90
# Log level (error, warn, info, debug, trace)
log_level = "info"
By default, Ferret monitors all files including those in hidden directories like .venv. To exclude hidden directories, add the pattern to ignore_patterns:
ignore_patterns = [
"/**/.*/**", # Exclude all hidden directories
]
Start the file watcher with interactive TUI or headless mode.
ferret-tracker watch [OPTIONS]
Options:
--watch <PATH> Add directory to watch (can be repeated)
--headless Run without TUI (background mode)
--no-defaults Ignore paths in config file
Display recent file events from the database.
ferret-tracker list [OPTIONS]
Options:
--since <DURATION> Time filter (e.g., "24h", "7d")
--type <TYPE> Filter by file type
--path <PATTERN> Filter by path substring
-n, --limit <N> Maximum entries to show (default: 50)
--json Output as JSON
Show statistics about tracked files.
ferret-tracker stats [OPTIONS]
Options:
--json Output as JSON
~/.local/share/ferret/ledger.db~/Library/Application Support/ferret/ledger.db%LOCALAPPDATA%\ferret\ledger.dbCREATE TABLE events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
path TEXT NOT NULL UNIQUE,
dir TEXT NOT NULL,
filename TEXT NOT NULL,
size_bytes INTEGER,
created_at TEXT NOT NULL,
file_type TEXT NOT NULL,
tags TEXT DEFAULT '',
notes TEXT DEFAULT ''
);
# Debug build
cargo build
# Release build
cargo build --release
# Run all tests
cargo test
# Run with verbose output
cargo test -- --nocapture
# Run specific test
cargo test test_tree_nav -- --nocapture
# Format check
cargo fmt --check
# Lint warnings
cargo clippy
# Fix formatting issues
cargo fmt
RUST_LOG=debug cargo run -- watch
┌─────────────────────────────────────────┐
│ Main/UI Thread │
│ ┌──────────┐ ┌──────────┐ │
│ │ Config │ │ Store │ SQLite DB │
│ │ Loader │ │ (read) │ │
│ └──────────┘ └──────────┘ │
│ ↑ │
│ Channel │
│ ↓ │
│ ┌────────────────────────────────┐ │
│ │ Ratatui TUI Engine │ │
│ └────────────────────────────────┘ │
└─────────────────────────────────────────┘
▲
│ File Events
│
┌─────────────────────────────────────────┐
│ Watcher Thread │
│ ┌────────────────────────────────┐ │
│ │ notify (inotify/FSEvents) │ │
│ │ → FileEvent → DB insertion │ │
│ └────────────────────────────────┘ │
└─────────────────────────────────────────┘
Contributions are welcome. Please ensure:
cargo testcargo fmtMIT License — see LICENSE for details.