Smart Session Manager (SSM) is a tool designed to manage Tmux sessions efficiently, focusing on project-based session management. With SSM, you can easily navigate through sessions using simple commands and aliases.
- Session Management: Create and manage Tmux sessions based on project directories or aliases.
- Alias Management: Set, list, and remove aliases for quick navigation.
- Directory Navigation: Easily find and navigate to directories.
- Session Storage: Sessions are stored in files, with session names based on the directory path or alias. Note: Session storage and restoration has not been implemented yet.
ssm [PATH_OR_ALIAS] or ssm [OPTIONS]
[PATH_OR_ALIAS]: Path of the directory or the alias you have saved.
| Option | Shorthand | Description |
|---|---|---|
--list-alias |
-l |
List all the aliases |
--set-alias |
-a |
Set alias to the active directory. Usage: ssm --set-alias |
--remove-alias |
Remove alias. Usage: ssm --remove-alias | |
--clear-alias |
Clear all the aliases. | |
--save |
-s |
Save the current session (Note: Save and restore functionality is not implemented yet). |
--new-session |
-n |
Start a new session, don't restore. |
--find |
-f |
Find (default is alias). |
--dir |
-d |
Opt to path. Usage: ssm -f -d or ssm --find --dir. |
--show-hidden |
-H |
Show hidden directories (use only with --dir). Usage: ssm -f -d -H or ssm --find --dir --show-hidden. |
--all |
-A |
Opt to both aliases and directories. Usage: ssm -f -A or ssm --find --all. |
--help |
-h |
Print help. |
--version |
-V |
Print version. |
Compulsory:
- Tmux: The terminal multiplexer required for managing sessions.
Optional:
fzf: The fuzzy finder. Necessary for the find-related options to work.fd: A faster alternative to the find command. For an improved experience, especially when finding directories, it's recommended to install fd.
Clone the repository and navigate to the project directory:
git clone <repository_url>
cd smart-session-managerEnsure you have Tmux installed on your system. Then, add the ssm script to your PATH or create an alias for it in your shell configuration file (for example, .bashrc, .zshrc).
- Session Restoration: Save and restore previous sessions (not yet implemented).
Contributions are welcome! Please fork the repository and create a pull request with your changes.
To list all the aliases:
ssm --list-aliasTo set an alias for the active directory:
ssm --set-alias <ALIAS_NAME>To remove an alias:
ssm --remove-alias <ALIAS_NAME>To clear all aliases:
ssm --clear-aliasTo save the current session:
ssm --saveNote: Save and restore functionality is not implemented yet.
To start a new session without restoring:
ssm --new-sessionTo find an alias:
ssm --findTo find a directory:
ssm --find --dirTo show hidden directories:
ssm --find --dir --show-hiddenTo find both aliases and directories:
ssm --find --allTo print help:
ssm --helpTo print version:
ssm --version