| Crates.io | rustag |
| lib.rs | rustag |
| version | 0.2.1 |
| created_at | 2023-12-12 07:01:20.663528+00 |
| updated_at | 2025-12-05 02:56:18.417066+00 |
| description | Rustag, a Rust-built command-line tool for bookmarking directories with custom aliases and fuzzy search. |
| homepage | |
| repository | https://github.com/Axect/Rustag |
| max_upload_size | |
| id | 1066118 |
| size | 49,962 |
Rustag is a Rust-based command-line tool for bookmarking directories on your system. It allows users to assign custom aliases to directories and navigate to them easily using a fuzzy search interface.
To install Rustag, ensure you have Rust and Cargo installed on your system. Then run the following command:
cargo install rustag
And for additional features, add the following to your ~/.bashrc or ~/.zshrc:
rtg() {
local output=$(rustag "$@")
local last_line=$(echo "$output" | tail -n 1)
# Check if the last line is a valid directory path
if [[ -d "$last_line" ]]; then
cd "$last_line"
else
echo "$output"
fi
}
Then run rtg to get started.
Upon first run, Rustag will create a .rustag directory in your home folder to store its data. This includes a bookmarks file that maintains the bookmark information.
To bookmark the current directory, run Rustag without arguments and select "Add bookmark":
rtg
Follow the prompts to:
To view and manage your bookmarks:
rtg without any arguments# Navigate to a project directory
cd ~/projects/myproject
# Add a bookmark
rtg
# Select: Add bookmark
# Enter alias: myproj
# Later, from anywhere
rtg
# Select: View bookmarks
# You'll see fuzzy searchable list:
# myproj -> /home/user/projects/myproject
# docs -> /home/user/documents
# ...
# Select: myproj -> /home/user/projects/myproject
# Select: Open in Terminal
# Now you're in ~/projects/myproject
Rustag uses two custom data structures:
Bookmark: Represents a bookmarked directory, including:
alias: User-defined alias for the directoryfolder_path: Absolute path to the directorycreated_at: Timestamp when the bookmark was createdlast_accessed: Timestamp when the bookmark was last accessed (optional)BookmarkList: Manages the collection of bookmarks using:
bookmarks: HashMap mapping aliases to Bookmark instances for O(1) lookupaliases: Sorted vector of aliases for display purposesContributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under either of:
at your option.