Commit Graph

53 Commits

Author SHA1 Message Date
9c639206f7 feat: add hidden tag to hide hosts from TUI and search
Hosts tagged with "hidden" are excluded from the TUI list, shell
completions, and sshm search. Direct connections via sshm <host>
still work regardless of the tag.

A toggle key (H) shows or hides hidden hosts in the TUI, with a
yellow banner indicating the active state. The key is documented
in the help panel (h).

A contextual hint on the Tags field in the add and edit forms
reminds the user that "hidden" hides the host from the list.
2026-02-25 20:27:22 +01:00
838941e3eb fix: allow env vars and SSH tokens in IdentityFile validation (issue #33)
ValidateIdentityFile now accepts $VAR/${VAR} (expanded via os.Expand, undefined vars accepted as-is) and SSH tokens like %d, %h before falling back to os.Stat.
The raw value is preserved when writing to ssh_config.
2026-02-23 23:04:40 +01:00
f189cb37e3 feat: add --no-update-check flag and disable update check via config (issue #23)
Add support for disabling the automatic update check at startup, which could cause delays on air-gapped or offline machines due to DNS timeouts.

- Add --no-update-check CLI flag for one-time override
- Add check_for_updates field (*bool) to AppConfig with default true
- CLI flag overrides the config file setting (both feed into IsUpdateCheckEnabled)
- Move update check from --version template to TUI Init() only, respecting the new configuration
- Remove getVersionWithUpdateCheck() from cmd/root.go; --version now prints a plain version string
- Rename internal/config/keybindings.go → appconfig.go and keybindings_test.go → appconfig_test.go to reflect the broader scope of the file
- Add TestIsUpdateCheckEnabled with table-driven cases (nil config, nil field, true, false) and extend existing integration test with a CheckForUpdates round-trip
- Update README: document --no-update-check flag, config option, and rename "Custom Key Bindings" section to "Application Configuration"
2026-02-23 21:28:54 +01:00
Guillaume Archambault
891fb2a0f4 Merge pull request #44 from fgbm/main
Fix: connectivity check for hosts using ProxyJump or ProxyCommand
2026-02-22 12:24:42 +01:00
Vladislav Chmelyuk
5d0c0ffcf3 refactor: update NewPingManager to accept a config file parameter
- Modified the NewPingManager function to include a configFile argument for better SSH configuration management.
- Updated all relevant tests to reflect the new function signature.
- Enhanced ping functionality to support ProxyJump and ProxyCommand using an external SSH command.
- Adjusted UI initialization to pass the config file to the PingManager.

This change improves flexibility in managing SSH connections and enhances the overall functionality of the ping manager.
2026-02-04 14:17:28 +03:00
David Ibia
7d9b794ceb feat: add info command for JSON host details
Adds a jq-friendly `sshm info` subcommand with host completion and documentation, and makes home directory resolution testable for backup path tests.
2026-01-12 23:53:35 +01:00
87f8fb9c6c fix: problems with quotes from Host names and support SSH tokens (issue #32) 2026-01-04 22:21:13 +01:00
8f780e288c fix: use line numbers to prevent deleting all duplicate SSH hosts when removing one 2026-01-04 21:34:09 +01:00
def2b4fa8d fix: correct field mapping in forms and prevent double -o prefix in SSH options 2026-01-04 20:46:11 +01:00
66cb80f29c fix(edit): correct Advanced tab field indices mapping 2026-01-04 18:39:39 +01:00
Francesco Raso
e4570e612e fix(add-form): align add/edit form behavior (#28)
Co-authored-by: francesco.raso <francesco.raso@elco.it>
2026-01-04 18:15:57 +01:00
Loïc Dreux
49f01b7494 feat: focus on search input at startup (#27) 2026-01-04 17:59:14 +01:00
Simon Gaufreteau
ce9d678652 feat: ProxyCommand support (#26)
* Add base for ProxyCommand

* Fix crashes with ProxyCommand

* Add ProxyCommand to README

---------

Co-authored-by: Simon Gaufreteau <sgaufret@amazon.lu>
2026-01-04 17:49:04 +01:00
825c534ebe feat(ui): add tabbed forms with height validation
- Implement General/Advanced tabs for add/edit forms
- Add terminal height detection with user-friendly warnings
- Add Ctrl+J/K tab navigation and SSH RemoteCommand/RequestTTY fields
2025-10-13 21:55:08 +02:00
c1457af73a feat: add support for SSH RemoteCommand and RequestTTY in host configuration and TUI forms
- Allow users to specify a RemoteCommand to execute on SSH connection, both via TUI and config file
- Add RequestTTY option (yes, no, force, auto) to host configuration and forms
- Update config parsing and writing to handle new fields
- Improve TUI forms to support editing and adding these options
- Fix edit form standalone mode to allow proper quit/save via keyboard shortcuts
2025-10-12 20:25:20 +02:00
6ba82b1c97 feat: filter non-SSH files from config parsing
- Skip README, .git, and documentation files during SSH config parsing
- Add QuickHostExists for fast host validation without full parsing
- Prevent errors when Include * encounters non-config files
2025-10-10 21:47:13 +02:00
d686d97f8c fix: SSH identity file paths with spaces and edit form navigation
- Quote IdentityFile paths containing spaces to prevent SSH config errors
- Fix edit form ESC/Ctrl+C to return to main view instead of quitting
- Improve edit form navigation consistency with add form
- Fix focus management when adding host fields with Ctrl+A
2025-10-09 22:04:36 +02:00
8d5f59fab2 feat: add multi-host block support for SSH config management
- Support "Host server1 server2 server3" syntax in SSH configurations
- Add multi-host editing UI with separate host name inputs
- Implement multi-host block update and deletion operations
- Add comprehensive test coverage
- Maintain backward compatibility with single-host configs
2025-10-09 20:46:10 +02:00
Guillaume Archambault
5986659048 Merge pull request #11 from qingfengzxr/main
feat: add configurable key bindings with ESC quit disable option
2025-10-04 17:00:56 +02:00
Loïc Dreux
986017a552 feat: support multiple words search 2025-10-01 12:07:05 +02:00
zxr
120cd6c009 feat: add configurable key bindings with ESC quit disable option
- Add unified application configuration system with JSON config file
- Implement configurable quit keys (default: "q", "ctrl+c")
- Add disable_esc_quit option for vim users to prevent accidental exits
- Auto-create default config file at ~/.config/sshm/config.json
- Maintain backward compatibility (ESC quit enabled by default)
- Include comprehensive tests and documentation
2025-09-29 11:05:26 +08:00
4efec57a8a fix: make ValidateIdentityFile test robust for CI environments
- Remove assumption that ~/.ssh/id_rsa always exists
- Test tilde path expansion without asserting file existence
2025-09-17 14:20:08 +02:00
45eccabc23 fix: replace Ctrl+Enter with Ctrl+S in forms to avoid terminal conflicts 2025-09-13 11:53:45 +02:00
306f38e862 feat: show error when move requires includes but none found 2025-09-13 11:53:45 +02:00
3c627a5d21 feat: add port forwarding history persistence 2025-09-13 11:53:45 +02:00
8c6f3b01ef feat: centralize history storage in config directory
Automatically migrates existing ~/.ssh/sshm_history.json to platform-appropriate config location
2025-09-13 11:53:45 +02:00
77b2b8fd22 feat: add move command to relocate SSH hosts between config files
- Add 'move' command with interactive file selector
- Implement atomic host moving between SSH config files
- Support for configs with include directives
- Add comprehensive error handling and validation
- Update help screen with improved two-column layout
2025-09-13 11:53:45 +02:00
5c832ce26f feat: add automatic version update checking and notifications
- Add internal/version module for GitHub release checking
- Integrate async version check in Bubble Tea UI
- Display update notification in main interface
- Add version check to --version/-v command output
- Include comprehensive version comparison and error handling
- Add unit tests for version parsing and comparison logic
2025-09-13 11:53:45 +02:00
ef075e74cf test: add comprehensive test suite and fix failing tests
- Fix history tests with proper test isolation using temp files
- Fix CMD tests with proper string contains and simplified assertions
- Add missing test utilities and helper functions
- Improve test coverage across all packages
- Remove flaky tests and replace with robust alternatives"
2025-09-10 08:15:46 +02:00
9bb5d18f8e fix: resolve search behavior when cursor is not at top of list
- Fix search mode not triggering properly after navigation
- Preserve cursor position during filtering operations
- Add comprehensive UI tests for search functionality
- Improve search to include user field filtering
2025-09-08 16:37:25 +02:00
edf61049fc fix: update module path to use GitHub URL 2025-09-06 23:48:30 +02:00
67987e6242 refactor: move SSH backups to ~/.config/sshm/backups/ 2025-09-06 23:36:12 +02:00
e1efef4680 ui: reduce search bar width to 25 characters 2025-09-06 17:37:46 +02:00
42387eb1fa feat: add async SSH ping for all hosts with status indicator 2025-09-06 17:20:14 +02:00
be3dcaa1cd fix: enable editing and management of hosts from included SSH config files
• Add SourceFile field to SSHHost struct to track config file origins
• Implement FindHostInAllConfigs() to locate hosts across all config files
• Fix "host not found" errors when editing/deleting hosts from included files
• Add GetAllConfigFiles() and GetAllConfigFilesFromBase() for config discovery
• Create UpdateSSHHostV2() and DeleteSSHHostV2() for cross-file operations
• Display config file source in edit and info forms for better visibility
• Add intelligent file selector for host addition when multiple configs exist
• Support -c parameter context with proper file resolution
• Exclude .backup files from Include directive processing
• Maintain backward compatibility with existing SSH config workflows

Resolves limitation where hosts from included config files could be viewed
but not edited, deleted, or properly managed through the interface.
2025-09-05 17:04:11 +02:00
b587defabc fix: improve TUI layout responsiveness for large host lists 2025-09-05 12:35:02 +02:00
22586484c7 Merge branch 'main' into feature/tui-refactor 2025-09-05 12:17:30 +02:00
420db56ff5 fix: improve table height calculation for better UI responsiveness 2025-09-05 12:08:52 +02:00
yimeng
e0dd32993a add ssh config include 2025-09-05 12:43:34 +08:00
1cea3795e4 feat: refactor TUI with read-only info view and optimized layout
- Add new 'i' command for read-only host information display
- Implement info view with option to switch to edit mode (e/Enter)
- Hide User and Port columns to optimize table space usage
- Improve table height calculation for better host visibility
- Add proper message handling for info view navigation
- Interface optimization
2025-09-04 16:47:07 +02:00
2deec405f7 feat: add port forwarding support 2025-09-04 10:34:54 +02:00
20bc506e36 feat: add Windows platform support 2025-09-03 17:48:58 +02:00
b5d8d505cf docs: clarify main usage in help text (TUI by default, CLI also available) 2025-09-03 10:48:35 +02:00
3a72694e5a fix: preserve search filter after host operations 2025-09-03 10:04:24 +02:00
8f2837db78 feat: implement dynamic table sizing based on available terminal space 2025-09-03 09:58:53 +02:00
959c084466 fix: pass config file flag to add/edit commands 2025-09-03 08:33:07 +02:00
94225cbfbe feat: support custom SSH config files via -c flag 2025-09-02 17:00:17 +02:00
98aa2b6579 cleanup: delete unused Model fields 2025-09-02 14:14:26 +02:00
5dca755b11 refactor(ui): split TUI logic into multiple files and improve styling 2025-09-02 13:17:20 +02:00
1d50e7cb47 fix: reformat code 2025-09-02 09:21:00 +02:00