jumprs
Unified Rust API for reading and writing directory jumper databases.
Supported Directory Jumpers
| Tool | Database Location | Format |
|---|---|---|
| zoxide | ~/.local/share/zoxide/db.zo |
path|rank|timestamp |
| z | ~/.z |
path|rank|timestamp |
| autojump | ~/.local/share/autojump/autojump.txt |
rank\tpath |
| fasd | ~/.fasd |
path|rank|timestamp |
Installation
[]
= "0.1"
Quick Start
use Database;
// Auto-detect the first available database
let db = detect.expect;
// Search for directories matching a query
let results = db.search;
for entry in results.iter.take
// Get the best match
if let Some = db.best_match
Recording Visits
use ;
use PathBuf;
// Load or create a database
let mut db = with_backend.unwrap;
// Record a directory visit (updates rank and timestamp)
db.add_visit;
// Save changes to disk
db.save.expect;
Specifying a Backend
use ;
// Use a specific backend
let db = with_backend.expect;
// Get top directories by frecency
for entry in db.top_dirs
// Check which backend was detected
println!;
API Overview
Database Methods
| Method | Description |
|---|---|
detect() |
Auto-detect and load the first available database |
with_backend(backend) |
Load a specific backend's database |
new(backend) |
Create an empty database |
search(query) |
Search for directories matching query terms |
best_match(query) |
Get the highest-frecency match |
top_dirs(n) |
Get top N directories by frecency |
add_visit(path) |
Record a visit to a directory |
remove(path) |
Remove a directory from the database |
clean() |
Remove directories that no longer exist |
save() |
Save changes to disk |
Backend Detection Priority
When using Backend::Auto, jumprs checks for databases in this order:
- zoxide
- z
- autojump
- fasd
The first available database is used.
MIT License
Copyright 2026 Paul Thrasher
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.