docs: update README.md

This commit is contained in:
Gu1llaum-3 2025-09-03 11:57:26 +02:00
parent b5d8d505cf
commit e8c6e602a2
2 changed files with 64 additions and 9 deletions

View File

@ -16,7 +16,11 @@
SSHM is a beautiful command-line tool that transforms how you manage and connect to your SSH hosts. Built with Go and featuring an intuitive TUI interface, it makes SSH connection management effortless and enjoyable. SSHM is a beautiful command-line tool that transforms how you manage and connect to your SSH hosts. Built with Go and featuring an intuitive TUI interface, it makes SSH connection management effortless and enjoyable.
<p align="center"> <p align="center">
<img src="images/sshm.gif" alt="Demo SSHM Terminal" width="600" /> <a href="images/sshm.gif" target="_blank">
<img src="images/sshm.gif" alt="Demo SSHM Terminal" width="800" />
</a>
<br>
<em>🖱️ Click on the image to view in full size</em>
</p> </p>
## ✨ Features ## ✨ Features
@ -28,6 +32,7 @@ SSHM is a beautiful command-line tool that transforms how you manage and connect
- **🏷️ Tag Support** - Organize your hosts with custom tags for better categorization - **🏷️ Tag Support** - Organize your hosts with custom tags for better categorization
- **🔍 Smart Search** - Find hosts quickly with built-in filtering and search - **🔍 Smart Search** - Find hosts quickly with built-in filtering and search
- **🔒 Secure** - Works directly with your existing `~/.ssh/config` file - **🔒 Secure** - Works directly with your existing `~/.ssh/config` file
- **📁 Custom Config Support** - Use any SSH configuration file with the `-c` flag
- **⚙️ SSH Options Support** - Add any SSH configuration option through intuitive forms - **⚙️ SSH Options Support** - Add any SSH configuration option through intuitive forms
- **🔄 Automatic Conversion** - Seamlessly converts between command-line and config formats - **🔄 Automatic Conversion** - Seamlessly converts between command-line and config formats
@ -85,6 +90,14 @@ sshm
- `q` - Quit - `q` - Quit
- `/` - Search/filter hosts - `/` - Search/filter hosts
**Sorting & Filtering:**
- `s` - Switch between sorting modes (name ↔ last login)
- `n` - Sort by **name** (alphabetical)
- `r` - Sort by **recent** (last login time)
- `Tab` - Cycle between filtering modes
- Filter by **name** (default) - Search through host names
- Filter by **last login** - Sort and filter by most recently used connections
The interactive forms will guide you through configuration: The interactive forms will guide you through configuration:
- **Hostname/IP** - Server address - **Hostname/IP** - Server address
- **Username** - SSH user - **Username** - SSH user
@ -102,15 +115,24 @@ SSHM provides both command-line operations and an interactive TUI interface:
# Launch interactive TUI mode for browsing and connecting to hosts # Launch interactive TUI mode for browsing and connecting to hosts
sshm sshm
# Launch TUI with custom SSH config file
sshm -c /path/to/custom/ssh_config
# Add a new host using interactive form # Add a new host using interactive form
sshm add sshm add
# Add a new host with pre-filled hostname # Add a new host with pre-filled hostname
sshm add hostname sshm add hostname
# Add a new host with custom SSH config file
sshm add hostname -c /path/to/custom/ssh_config
# Edit an existing host configuration # Edit an existing host configuration
sshm edit my-server sshm edit my-server
# Edit host with custom SSH config file
sshm edit my-server -c /path/to/custom/ssh_config
# Show version information # Show version information
sshm --version sshm --version
@ -118,6 +140,19 @@ sshm --version
sshm --help sshm --help
``` ```
### Configuration File Options
By default, SSHM uses the standard SSH configuration file at `~/.ssh/config`. You can specify a different configuration file using the `-c` flag:
```bash
# Use custom config file in TUI mode
sshm -c /path/to/custom/ssh_config
# Use custom config file with commands
sshm add hostname -c /path/to/custom/ssh_config
sshm edit hostname -c /path/to/custom/ssh_config
```
## 🏗️ Configuration ## 🏗️ Configuration
SSHM works directly with your standard SSH configuration file (`~/.ssh/config`). It adds special comment tags for enhanced functionality while maintaining full compatibility with standard SSH tools. SSHM works directly with your standard SSH configuration file (`~/.ssh/config`). It adds special comment tags for enhanced functionality while maintaining full compatibility with standard SSH tools.
@ -222,24 +257,44 @@ go build -o sshm .
``` ```
sshm/ sshm/
├── cmd/ # CLI commands (Cobra) ├── main.go # Application entry point
├── cmd/ # CLI commands (Cobra)
│ ├── root.go # Root command and interactive mode │ ├── root.go # Root command and interactive mode
│ ├── add.go # Add host command │ ├── add.go # Add host command
│ └── edit.go # Edit host command │ ├── edit.go # Edit host command
│ └── search.go # Search command
├── internal/ ├── internal/
│ ├── config/ # SSH configuration management │ ├── config/ # SSH configuration management
│ │ └── ssh.go # Config parsing and manipulation │ │ └── ssh.go # Config parsing and manipulation
│ ├── ui/ # Terminal UI components │ ├── history/ # Connection history tracking
│ │ ├── tui.go # Main TUI interface │ │ └── history.go # History management and last login tracking
│ │ ├── add_form.go # Add host form │ ├── ui/ # Terminal UI components (Bubble Tea)
│ │ └── edit_form.go# Edit host form │ │ ├── tui.go # Main TUI interface and program setup
│ │ ├── model.go # Core TUI model and state
│ │ ├── update.go # Message handling and state updates
│ │ ├── view.go # UI rendering and layout
│ │ ├── table.go # Host list table component
│ │ ├── add_form.go # Add host form interface
│ │ ├── edit_form.go# Edit host form interface
│ │ ├── styles.go # Lip Gloss styling definitions
│ │ ├── sort.go # Sorting and filtering logic
│ │ └── utils.go # UI utility functions
│ └── validation/ # Input validation │ └── validation/ # Input validation
│ └── ssh.go # SSH config validation │ └── ssh.go # SSH config validation
├── images/ # Documentation assets
│ ├── logo.png # Project logo
│ └── sshm.gif # Demo animation
├── install/ # Installation scripts ├── install/ # Installation scripts
│ ├── unix.sh # Unix/Linux/macOS installer │ ├── unix.sh # Unix/Linux/macOS installer
│ └── README.md # Installation guide │ └── README.md # Installation guide
└── .github/workflows/ # CI/CD pipelines ├── .github/ # GitHub configuration
└── build.yml # Multi-platform builds │ ├── copilot-instructions.md # Development guidelines
│ └── workflows/ # CI/CD pipelines
│ └── build.yml # Multi-platform builds
├── go.mod # Go module definition
├── go.sum # Go module checksums
├── LICENSE # MIT license
└── README.md # Project documentation
``` ```
### Dependencies ### Dependencies

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 KiB

After

Width:  |  Height:  |  Size: 797 KiB