A simple CLI tool for bookmarking SSH connections from your bash history
Project description
rembook
rembook is a simple CLI tool that helps you bookmark and manage SSH connections from your bash history. Stop scrolling through .bash_history to find that one server you accessed last week!
Features
- 📚 Automatic History Parsing: Scans your
.bash_historyfor SSH connections - 🔖 Bookmark Management: Save frequently used SSH commands with memorable names
- 🎯 Quick Access: Launch saved connections with a single command
- 📊 Interactive Selection: Browse available connections in a neat table
- 🔢 Smart Sorting: Shows most frequently used connections first
Installation
From PyPI
pip install rembook
From Source
git clone git@github.com:Glucksistemi/rembook.git
cd rembook
pip install -e .
Usage
Basic Usage
Simply run rembook to see an interactive list of all available SSH connections:
rembook
This will display a table with:
- All your bookmarked connections
- SSH commands from your bash history (sorted by frequency)
Select a connection by entering its number, or type a new SSH command directly.
Launch a Saved Bookmark
rembook myserver
This will execute the SSH command associated with the bookmark myserver.
Create a Bookmark
Add a bookmark interactively:
rembook -a
You'll be prompted to select a connection and give it a name.
Or create a bookmark directly:
rembook mybookmark -a
This will prompt you to select a connection to save as mybookmark.
Delete a Bookmark
rembook mybookmark -d
Or delete interactively:
rembook -d
Examples
Example 1: Browse and connect
$ rembook
No Connection Bookmark
-- ---------------------- ----------
1 ssh user@server1.com prod
2 ssh admin@192.168.1.1 router
3 ssh dev@staging.com
Enter number of connection or ssh command [1]: 1
# Connects to server1.com
Example 2: Save a bookmark
$ rembook production -a
No Connection Bookmark
-- ---------------------- ----------
1 ssh user@prod.app.com
2 ssh admin@192.168.1.1 router
Enter number of connection or ssh command [1]: 1
# Saves ssh user@prod.app.com as "production"
Example 3: Use a saved bookmark
$ rembook production
# Immediately connects to ssh user@prod.app.com
Example 4: Quick SSH with custom command
$ rembook
No Connection Bookmark
-- ---------------------- ----------
1 ssh user@server1.com prod
Enter number of connection or ssh command [1]: user@newserver.com
# Connects to ssh user@newserver.com
How It Works
- History Parsing: rembook scans your
~/.bash_historyfile for SSH commands - Frequency Analysis: Commands are ranked by how often you've used them
- Persistent Bookmarks: Saved bookmarks are stored in your user config directory
- Quick Execution: Selected commands are executed directly via
os.system()
Requirements
- Python 3.10+
- Bash shell (uses
.bash_history) - Linux or macOS
Dependencies
Configuration
Bookmarks are stored in a JSON file at:
- Linux:
~/.config/rembook/bookmarks.json - macOS:
~/Library/Application Support/rembook/bookmarks.json
License
BSD 3-Clause License. See LICENSE file for details.
Author
Kirill Nikolsky - glucksistemi@gmail.com
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Repository
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rembook-0.1.0.tar.gz.
File metadata
- Download URL: rembook-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01af135c1681b8fd4ac4cf6ce0e8256c79a5bd188e2838086fdb7d295fa0c6b9
|
|
| MD5 |
0c0de69bdc694c1949af18e1af7b9a22
|
|
| BLAKE2b-256 |
3471355b29e395d27151f12e0467beff32cb6b8ba66a772ebbe77c068e2e7b44
|
File details
Details for the file rembook-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rembook-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60e5292cd755fb6b2254c3bdb4549ee6478b8a82b4c0b8b8a43962d4d8042ce8
|
|
| MD5 |
69cda1baee4180a865d1bb849646e99c
|
|
| BLAKE2b-256 |
62634b05459c9805ab363e8b5e6b7ccb356c27ffa8f3cbeadf7d953325fd7ac3
|