A simple terminal-based tool designed to help you quickly store, navigate, and manage your favorite file paths right from the terminal.
- Add Bookmarks: Store frequently used file paths with custom names.
- Navigate Quickly: Jump to any saved bookmark with a single command.
- Recent Bookmarks: View the most recently accessed bookmarks.
- Categorization: Organize bookmarks into custom categories (e.g., work, education, personal).
- PowerShell (Windows, macOS, or Linux)
- A terminal: PowerShell, Git Bash, Hyper, or any other terminal you prefer.
Start by cloning the repository to your local machine.
git clone https://github.com/TanmayBansode/hop.gitTo use the hop.ps1 script from anywhere in your terminal, you can either move it to a directory already in your system’s PATH or create an alias for it in PowerShell.
- Move the
hop.ps1file to a directory likeC:\Scripts(or any directory you prefer). - Add that directory to your
PATHenvironment variable:- Press
Win + Xand select "System". - Click "Advanced system settings" and then "Environment Variables".
- Under "System variables", select
Pathand click "Edit". - Add the directory (
C:\Scripts) to the list of paths.
- Press
- Move the
hop.ps1file to/usr/local/bin/or any directory listed in your$PATH:sudo mv hop.ps1 /usr/local/bin/hop
Alternatively, you can create an alias in PowerShell to make the hop command accessible from anywhere.
-
Open your PowerShell profile file. If you don't have one, create it by running:
notepad $PROFILEThis will open your PowerShell profile in Notepad.
-
Add the following line to the profile file to create an alias for
hop.ps1:Set-Alias hop "C:\path\to\hop.ps1"Replace
C:\path\to\hop.ps1with the actual path to yourhop.ps1file. -
Save the profile file and restart your PowerShell terminal.
Now, you can use hop directly from anywhere in your terminal!
Ensure that your PowerShell allows running scripts. You might need to set the execution policy to allow running scripts:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUserTo add a bookmark with a name and a path, use the following command:
hop add <name> <path> [<category>]Example:
hop add project1 "C:\Users\YourName\Documents\Projects\Project1" "work"name: The name of your bookmark.path: The full file or folder path to bookmark.category: Optional. Categorize your bookmarks (e.g.,work,personal).
To quickly jump to a bookmarked location, use:
hop to <name>Example:
hop to project1This will navigate you to the path you bookmarked.
To set current directory as a bookmark, use:
hop set <name>Example:
hop set importantThis will set current directory bookmarked with name "important"
To list all saved bookmarks:
hop listTo search for a specific bookmark by name or part of the name:
hop list <search-term>Example:
hop list projectTo filter bookmarks by category:
hop list -t <category>Example:
hop list -t workTo list the most recently accessed bookmarks, use:
hop recentTo list the most frequently accessed bookmarks, use:
hop frequentTo view detailed stats of all bookmarks (including last accessed time and access count):
hop statsTo remove a bookmark:
hop remove <name>Example:
hop remove project1To delete all bookmarks, with a warning and confirmation prompt:
hop clearYou will be asked to type yes to confirm the action.
For a list of all commands and usage examples:
hop helpWe welcome contributions! If you'd like to contribute to this project, feel free to fork the repository and submit a pull request.