otot
A command-line tool for quickly opening URLs with fuzzy matching and frecency-based search.
Overview
otot ("Open Tab Over There") helps you quickly open links from your terminal by remembering each usage and allowing fuzzy pattern matching. Instead of typing full URLs, use partial matches to quickly access your most frequently and recently visited sites.
Installation
Via Homebrew (macOS/Linux)
Via Cargo
Or build from source:
Tip
Aliasing the
opensubcommand is helpful for ergonomic, quick usage:
Usage
Open a full URL
The tool automatically opens the URL in your default browser.
Fuzzy matching
# exact match on URL segments
# or, fuzzy-match using shorthand
This finds the most relevant URL in your visit history (not browser history) that matches on all segments of the provided pattern. The ranking uses a frecency algorithm that considers both frequency (how often you visit) and recency (when you last visited).
Query the database
This returns all matches in a table, using the same query as open, for debugging.
Configuration
Set your preferred browser:
View current settings:
Show config file location:
How It Works
otot maintains a local SQLite database tracking your URL visits. When you use fuzzy matching, it:
- Breaks your input into segments
- Searches for URLs in your history that match on:
- fuzzy match of base domain (e.g. "github.com")
- fuzzy match on last path segment (e.g. "rust")
- intermediate segments may be skipped, but when provided, must fuzzy match in the correct relative order (not all must be provided)
- Ranks results by frecency score (visit count × recency multiplier)
- Opens the best match
Configuration
Default config location: ~/.config/otot/default-config.toml
Available settings
preferred_browser: Browser command (e.g., "firefox", "chrome", "brave")
Database
The database is a simple SQLite file that tracks:
- URLs you've opened
- Visit counts
- Last access timestamps
- URL segments for fuzzy matching
Location:
| Platform | Value | Example |
|---|---|---|
| Linux | $XDG_DATA_HOME or $HOME/.local/share | /home/alice/.local/share |
| macOS | $HOME/Library/Application Support | /Users/Alice/Library/Application Support |
| Windows | {FOLDERID_LocalAppData} | C:\Users\Alice\AppData\Local |
Privacy
The database stores visit counts and timestamps but no personal browsing data beyond the URLs you explicitly open with otot.
Inspiration
This project is heavily inspired by zoxide, a wonderful CLI for navigating between directories.
License
MIT