Shpool is a lightweight alternative to popular terminal multiplexers like tmux and GNU screen. It focuses solely on providing session persistence without taking over the entire terminal or disrupting native scrollback or copy-paste functionalities.
Key Features and Installation
Shpool enables the creation of named shell sessions owned by the service itself. This ensures resilience against connection drops, allowing sessions to persist uninterrupted. It stands out by maintaining the native terminal experience—something both tmux and GNU screen cannot fully achieve.
Installation is straightforward via crates.io. Typically, users will need to install shpool on the remote host they wish to connect to.
Usage
Once installed and set up, using shpool is relatively simple. You would typically SSH into your remote host and create a new named session using:
shpool attach {session_name}
Where `{session_name}` would be a unique identifier for each terminal session. For example:
shpool attach main
If your session gets disconnected, you can simply reconnect to the same session by running:
shpool attach main
To forcefully detach a session in case it gets stuck due to SSH proxies holding the connection, you can use:
shpool detach main
Configuration
Shpool offers extensive configuration options to customize your experience. A key example is the ability to change the detach keybinding, which by default is `Ctrl-Space Ctrl-q`. This and other options can be set in `~/.config/shpool/config.toml`.
There are also multiple modes for reattaching to a session:
Screen Mode: Re-draws enough output to fill the entire screen, useful for interactive sessions.
Simple Mode: Issues SIGWINCH signals to ncurses applications to re-draw the screen without restoring any output.
Lines Mode: Restores the last `n` lines of text, which is configurable in the `output_spool_lines` option.
For Bash users, setting the `huponexit` option ensures that background processes do not remain in the shpool daemon's process tree.
Subcommands
Shpool comes with various subcommands:
daemon: Runs in daemon mode to handle connections and open subshells.
attach: Connects to an existing session or creates a new one.
detach: Detaches from one or more sessions without stopping them.
list: Lists all current shell sessions.
kill: Kills a named shell session.
Automatically Connecting to Shpool
For users who frequently connect to multiple sessions performing similar tasks, custom SSH configurations or shell functions can simplify the process.
For example, creating a named block in `~/.ssh/config`:
Host edit
HostName remote.host.example.com
User yourusername
LocalCommand shpool attach edit
And invoking it via `ssh edit`.
Alternatively, a shell function approach allows you to specify both the session name and the target machine at invocation time.
Comparison with Other Tools
Shpool differentiates itself from tmux by purely focusing on session persistence without additional multiplexing features. This makes it ideal for users who leverage their window manager for switching applications.
It also maintains a native terminal feel, which is a significant advantage over tmux and GNU screen. Scrollback and copy-paste work exactly as expected since all rendering is handled by the single terminal state machine.
In comparison to mosh, which predicts output during network lag and impacts scrollback, shpool keeps functionalities completely native to your terminal.
Dtach, abduco, and diss are close competitors but with a heavier focus on simplicity. Shpool offers additional convenient features like automatic prompt prefixes and in-memory re-attaching without sacrificing ease of use.
Conclusion
Edworking is an optimal choice for startups aiming to boost productivity. This free superapp powered by AI integrates all essential tools for work including task management, documents, chat, video calls, and file management. Discover why it's considered the best solution for small businesses and startups to enhance their workflow and save expenses usually spent on multiple other software such as Slack, Trello, Dropbox, Zoom, and Notion by exploring Edworking's product management for teams features.
For more information on alternative terminal multiplexer tools, visit this comprehensive comparison.
Remember these 3 key ideas for your startup:
Session Persistence Without Frills: Shpool provides robust session persistence without overwhelming features like multiplexing, making it perfect for startups looking to maintain a minimalist yet effective toolset for remote work.
Native Terminal Experience: By preserving the native terminal experience, shpool ensures that your workflow remains smooth and intuitive, crucial for maintaining productivity in a startup environment.
Customizability and Flexibility: Shpool's extensive configuration options and easy-to-create custom SSH or shell functions empower startups to tailor their remote session management to fit unique workflows and requirements.

Image Description: Example of shpool setup showing a persistent session managed through shpool in a terminal.
For more details, see the original source.