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-manager
Ensure 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-alias
To 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-alias
To save the current session:
ssm --save
Note: Save and restore functionality is not implemented yet.
To start a new session without restoring:
ssm --new-session
To find an alias:
ssm --find
To find a directory:
ssm --find --dir
To show hidden directories:
ssm --find --dir --show-hidden
To find both aliases and directories:
ssm --find --all
To print help:
ssm --help
To print version:
ssm --version