- Introduction
- Installation
- Getting Started
- Basic Commands
- Sessions
- Windows and Panes
- Copy Mode
- Configuration
- Remote Sessions
- Plugins
- Advanced Features
Ferrix is a revolutionary terminal multiplexer that combines the best features of GNU Screen and tmux while introducing innovative capabilities only possible with modern technology. Built in Rust for performance and safety, Ferrix offers:
- Session persistence across system restarts
- Advanced window and pane management with intelligent layouts
- Vim-style copy mode with search and visual selection
- Remote session support with TLS encryption
- Plugin system for extensibility
- Git-like session versioning for checkpoint and rollback
- GPU-accelerated rendering (when available)
# Clone the repository
git clone https://github.com/yourusername/ferrix.git
cd ferrix
# Build in release mode
cargo build --release
# Install to system
sudo cp target/release/ferrix /usr/local/bin/
# Verify installation
ferrix --versioncargo install ferrix# Start a new session
ferrix new
# Start a named session
ferrix new -s development
# Start a detached session
ferrix new -s background --detached# List all sessions
ferrix list
# List sessions with details
ferrix list --verbose# Attach to the most recent session
ferrix attach
# Attach to a specific session
ferrix attach -t development
# Force attach (detach other clients)
ferrix attach -t development --forceOnce attached to a session, use the prefix key (default: Ctrl-b) followed by a command key:
Ctrl-b d- Detach from sessionCtrl-b ?- Show helpCtrl-b :- Enter command modeCtrl-b [- Enter copy modeCtrl-b ]- Paste buffer
Ctrl-b c- Create new windowCtrl-b n- Next windowCtrl-b p- Previous windowCtrl-b 0-9- Switch to window by numberCtrl-b w- List windowsCtrl-b ,- Rename current windowCtrl-b &- Kill current window
Ctrl-b %- Split pane horizontallyCtrl-b "- Split pane verticallyCtrl-b o- Switch to next paneCtrl-b ;- Switch to last active paneCtrl-b ↑/↓/←/→- Navigate panes by directionCtrl-b q- Show pane numbersCtrl-b x- Kill current paneCtrl-b z- Zoom/unzoom paneCtrl-b {/}- Swap panes
# Create session with custom shell
ferrix new -s dev -c /usr/bin/zsh
# Create session in specific directory
ferrix new -s project -d ~/projects/myapp
# Kill a session
ferrix kill -t old-session
# Kill all sessions
ferrix kill-serverFerrix automatically persists sessions. After a system restart:
# Restore all sessions
ferrix restore
# Restore specific session
ferrix restore -t developmentCreate checkpoints of your session state:
# Save a snapshot
ferrix save-snapshot development --name "Before refactoring"
# List snapshots
ferrix list-snapshots
# Restore from snapshot
ferrix restore-snapshot development --snapshot-id abc123
# Export snapshot
ferrix export-snapshot development --output ~/backups/dev.snapshotFerrix supports sophisticated pane layouts:
# In command mode (:)
:layout even-horizontal
:layout even-vertical
:layout main-horizontal
:layout main-vertical
:layout tiled# Split with specific size (percentage)
:split-window -h -p 30 # 30% horizontal split
:split-window -v -p 75 # 75% vertical split
# Split with command
:split-window -h -c "npm run watch"Organize windows into groups:
:new-window -n frontend -g web
:new-window -n backend -g web
:new-window -n database -g infra
:switch-group webFerrix features a powerful vim-style copy mode:
Ctrl-b [- Enter copy modeCtrl-b PgUp- Enter copy mode and scroll up
h/j/k/l- Move cursor left/down/up/rightw/b- Move word forward/backward0/$- Move to line start/endgg/G- Go to top/bottomCtrl-f/Ctrl-b- Page down/upCtrl-d/Ctrl-u- Half page down/up
v- Start character selectionV- Start line selectionCtrl-v- Start block selectionSpace- Toggle selectionEsc- Cancel selection
/- Search forward?- Search backwardn/N- Next/previous match
y- Yank selectionEnter- Copy selection and exitq- Exit copy modeCtrl-b ]- Paste yanked text
Ferrix uses ~/.ferrix/config.toml for configuration:
# ~/.ferrix/config.toml
# General settings
prefix = "C-b" # Prefix key
mouse = true # Enable mouse support
base_index = 1 # Start window numbering at 1
escape_time = 10 # Escape key delay (ms)
history_limit = 10000 # Scrollback lines
# Display
status_position = "bottom" # Status bar position
status_interval = 1 # Status refresh interval (seconds)
clock_mode = "24" # 24-hour clock
# Copy mode
copy_mode_style = "vim" # vim or emacs
copy_mode_highlight = true # Highlight search matches
# Colors
[colors]
status_bg = "black"
status_fg = "white"
active_border = "green"
inactive_border = "gray"
# Plugins
[[plugins]]
name = "git-status"
path = "~/.ferrix/plugins/git-status.wasm"
enabled = trueFor complex configurations, use ~/.ferrixrc:
# ~/.ferrixrc
# Set options
set -g prefix C-a
set -g mouse on
set -g status-position top
set -g base-index 1
set -g pane-base-index 1
# Key bindings
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
# Vim-style pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# Custom commands
bind S command-prompt -p "Save session:" "save-snapshot %1"
bind R command-prompt -p "Restore session:" "restore-snapshot %1"
# Hooks
set-hook after-new-window 'display "Window created"'
set-hook after-kill-pane 'display "Pane closed"'
# Status bar
set -g status-left '[#S] '
set -g status-right '%H:%M %d-%b-%y'
set -g window-status-format '#I:#W'
set -g window-status-current-format '#I:#W*'On the server machine:
# Start remote server with TLS
ferrix server --bind 0.0.0.0:9999 \
--cert ~/.ferrix/server.crt \
--key ~/.ferrix/server.key \
--auth-mode password
# Or with token authentication
ferrix server --bind 0.0.0.0:9999 \
--auth-mode token \
--auth-token $SECRET_TOKENFrom client machine:
# Connect to remote server
ferrix connect user@remote.host:9999
# Connect with specific session
ferrix connect user@remote.host:9999 -t development
# List remote sessions
ferrix connect user@remote.host:9999 --listFerrix integrates seamlessly with SSH:
# Start remote session over SSH
ssh user@host -t ferrix new -s remote
# Attach to remote session over SSH
ssh user@host -t ferrix attach -t remote# Install from repository
ferrix plugin install git-status
# Install from file
ferrix plugin install ~/.ferrix/plugins/custom.wasm
# List installed plugins
ferrix plugin list
# Enable/disable plugin
ferrix plugin enable git-status
ferrix plugin disable git-status- git-status: Shows git information in status bar
- system-monitor: CPU/memory usage display
- clipboard-sync: Sync clipboard across sessions
- autocomplete: Command autocomplete
- themes: Additional color schemes
See the Developer Documentation for plugin development.
Monitor and track activity in your panes:
# Enable activity monitoring
ferrix toggle-activity-monitoring
# Set monitoring for specific pane
ferrix set-activity-monitoring on
# Activity indicators in status bar:
# 🔔 - Bell triggered
# ● - Recent output activity
# ○ - Silence detected (no output for threshold period)Send input to all panes in a window simultaneously:
# Toggle synchronization
Ctrl-b s
# Or via command mode
:toggle-pane-sync
# Set sync status explicitly
:set-pane-sync on
:set-pane-sync offPerfect for running the same command across multiple servers or environments.
Lock sessions for read-only viewing:
# Lock current session
Ctrl-b L
# Or via command
ferrix lock-session
# Unlock session
ferrix unlock-session
# The status bar shows [LOCKED] when session is locked# Rename current window
Ctrl-b ,
# Zoom current pane to full window
Ctrl-b z
# Activity indicators appear in window list
# Example: 1:editor● 2:logs○ 3:terminal🔔Manage and customize your keybindings:
# List all keybindings
ferrix list-keys
# Add custom keybinding
ferrix bind-key "Ctrl-b S" "save-snapshot"
# Remove keybinding
ferrix unbind-key "Ctrl-b x"
# Export keybindings to file
ferrix export-keys ~/my-bindings.toml
# Import keybindings from file
ferrix import-keys ~/my-bindings.toml
# Reset to defaults
ferrix reset-keys
# Reload from config
ferrix reload-keysExample keybindings configuration:
# ~/.ferrix/keybindings.toml
[[keybindings]]
key = "Ctrl-b r"
command = "reload-config"
description = "Reload configuration"
[[keybindings]]
key = "Ctrl-b S"
command = "save-snapshot"
description = "Save session snapshot"
[[keybindings]]
key = "Ctrl-b M"
command = "toggle-mouse"
description = "Toggle mouse support"Enable automatic saving of your sessions:
# Enable auto-save with default 5-minute interval
ferrix enable-auto-save
# Set custom interval (10 minutes)
ferrix enable-auto-save --interval 10
# Check auto-save status
ferrix auto-save-status
# Output: Auto-save: Enabled
# Interval: 5 minutes
# Last save: 2024-01-20 14:30:15 UTC
# Next save: 2024-01-20 14:35:15 UTC
# Disable auto-save
ferrix disable-auto-saveAuto-saves are stored in ~/.ferrix/auto/ and can be restored like regular snapshots.
Improved terminal history with efficient memory usage:
# Configure scrollback buffer size
set history-limit 50000
# Search in scrollback (in copy mode)
Ctrl-b [
/search-term
# The scrollback buffer is optimized for:
# - Fast scrolling performance
# - Efficient memory usage
# - Quick search operationsFerrix provides git-like versioning for sessions:
# Initialize versioning for session
ferrix version init development
# Create a checkpoint
ferrix version commit development -m "Before major refactor"
# View history
ferrix version log development
# Create branch
ferrix version branch development feature-branch
# Switch branches
ferrix version checkout development feature-branch
# Merge branches
ferrix version merge development feature-branch
# Revert to previous state
ferrix version revert development HEAD~1Create automation scripts:
#!/bin/bash
# setup-dev.sh
ferrix new -d -s development <<EOF
new-window -n editor
send "vim ." Enter
split-window -h -p 30
send "npm run watch" Enter
new-window -n terminal
new-window -n logs
send "tail -f app.log" Enter
select-window -t editor
EOFAdd to ~/.vimrc:
" Send selection to ferrix pane
vnoremap <leader>s y:!ferrix send -t .1 '<C-r>"'<CR>
" Open file in new ferrix pane
nnoremap <leader>o :!ferrix split-window -h vim %<CR>Add to ~/.bashrc or ~/.zshrc:
# Auto-attach to ferrix
if [ -z "$FERRIX" ]; then
ferrix attach || ferrix new
fi
# Quick session switcher
fs() {
session=$(ferrix list | fzf | cut -d: -f1)
[ -n "$session" ] && ferrix attach -t "$session"
}Session won't attach:
# Check if server is running
ferrix list
# Force kill stuck session
ferrix kill -t session-name
# Clear socket file
rm /tmp/ferrix-$USER/defaultCopy mode not working:
- Ensure terminal supports the required escape sequences
- Check
$TERMenvironment variable - Try:
export TERM=screen-256color
Performance issues:
# Reduce history limit
ferrix set -g history-limit 2000
# Disable plugins
ferrix plugin disable --all
# Check system resources
ferrix info# Built-in help
ferrix help
ferrix help [command]
# Show keybindings
# (Inside session)
Ctrl-b ?
# Version and build info
ferrix --version --verbose- Quick window switching: Use
Ctrl-b 'to select window by name - Synchronize panes: Use
Ctrl-b sto toggle synchronization across all panes - Save layout:
Ctrl-b :save-layout my-layoutto save current layout - Monitor activity: Activity indicators (🔔 ● ○) show automatically in status bar
- Pipe pane output:
Ctrl-b :pipe-pane -o 'cat >> output.log' - Zoom for focus:
Ctrl-b zto zoom current pane, repeat to unzoom - Lock for viewing:
Ctrl-b Lto lock session in read-only mode - Auto-save peace of mind: Enable with
ferrix enable-auto-savefor automatic backups - Custom shortcuts: Use
ferrix bind-keyto create your own keybindings - Rename windows:
Ctrl-b ,to give windows meaningful names
Ferrix brings modern innovation to terminal multiplexing while maintaining the reliability and performance users expect. For more advanced usage and development, see the Developer Guide.
Session Management Window Commands Pane Commands
------------------ --------------- -------------
new Create session c Create window % Split horizontal
attach Attach session n Next window " Split vertical
detach Detach (Ctrl-d) p Previous window o Next pane
list List sessions 0-9 Select window ↑↓←→ Navigate panes
kill Kill session , Rename window z Zoom pane
& Kill window x Kill pane
w List windows q Show pane numbers
Copy Mode Command Mode Special
--------- ------------ -------
[ Enter copy mode : Enter command ? Show help
v Visual mode q Exit mode d Detach
y Yank selection [ Copy mode
/ Search forward ] Paste buffer
q Exit copy mode