{"id":27603618,"url":"https://github.com/mohamedelashri/txm","last_synced_at":"2026-02-25T23:02:24.450Z","repository":{"id":242844701,"uuid":"810725226","full_name":"MohamedElashri/txm","owner":"MohamedElashri","description":" A command-line utility to make working with tmux more efficient and user-friendly ","archived":false,"fork":false,"pushed_at":"2025-04-20T11:24:32.000Z","size":81,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T12:11:53.244Z","etag":null,"topics":["go","golang","multiplexer","multiplexing","screen","terminal","tmux"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MohamedElashri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-05T08:40:45.000Z","updated_at":"2025-04-20T11:24:22.000Z","dependencies_parsed_at":"2025-03-17T07:33:50.983Z","dependency_job_id":"185a777e-a25f-4b35-9ec8-50e1f5ac67a5","html_url":"https://github.com/MohamedElashri/txm","commit_stats":null,"previous_names":["mohamedelashri/txm-go","mohamedelashri/txm"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedElashri%2Ftxm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedElashri%2Ftxm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedElashri%2Ftxm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MohamedElashri%2Ftxm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MohamedElashri","download_url":"https://codeload.github.com/MohamedElashri/txm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306626,"owners_count":21408927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","multiplexer","multiplexing","screen","terminal","tmux"],"created_at":"2025-04-22T19:18:03.145Z","updated_at":"2026-02-25T23:02:24.444Z","avatar_url":"https://github.com/MohamedElashri.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# txm - A Terminal Session Manager\n\n`txm` is a powerful command-line utility designed to manage terminal multiplexer sessions efficiently. It supports multiple backends including **tmux**, **zellij**, and **GNU Screen**, making it versatile across different environments and setups.\n\n## Features\n\n- **Multi-backend support**: tmux (primary), zellij, and GNU Screen\n- **Configuration system**: Choose your preferred backend with persistent settings\n- **Environment variable override**: Temporary backend switching via `TXM_DEFAULT_BACKEND`\n- **Intelligent fallback**: Automatically detects and uses available backends\n- Colored output support with automatic terminal capability detection\n- Comprehensive session management (`create`, `list`, `attach`, `delete`)\n- Window management for all supported backends\n- Advanced backend-specific features (tmux pane operations, zellij workspaces)\n- Cross-compatible command interface with backend-specific optimizations\n\n## Backend Support Matrix\n\n| Feature | tmux | zellij | GNU Screen |\n|---------|------|--------|------------|\n| Session Management | ✓ | ✓ | ✓ |\n| Window Operations | ✓ | ✓ | ✓ |\n| Pane/Panel Operations | ✓ (full targeting) | ✓ (focus-based) | ✓* |\n| Advanced Window Mgmt | ✓ | ✓ | ✗ |\n| Configuration Support | ✓ | ✓ | ✓ |\n| Workspace/Tab Paradigm | Windows | Tabs | Windows |\n\n**Note**: *GNU Screen supports basic splitting but with limited pane management\n\n## Pane Operation Differences\n\n**tmux**: Full pane targeting by number - you can specify which pane to operate on\n```bash\ntxm kill-pane my-session window-name 2    # Kills pane number 2\ntxm resize-pane my-session window-name 1 R 10  # Resizes pane 1\ntxm send-keys my-session window-name 0 \"echo hello\"  # Sends to pane 0\n```\n\n**zellij**: Focus-based operations with automatic pane navigation\n```bash\n# zellij attempts to navigate to the target pane number before operations\ntxm kill-pane my-session tab-name 2    # Navigates to pane 2, then kills it\ntxm resize-pane my-session tab-name 1 R 10  # Navigates to pane 1, then resizes\ntxm send-keys my-session tab-name 3 \"echo hello\"  # Navigates to pane 3, then sends keys\n\n# Note: Navigation is best-effort - if pane doesn't exist, operates on last reachable pane\n```\n\n**GNU Screen**: Limited pane support - basic splitting only\n\n## Configuration\n\n### Setting Your Preferred Backend\n\n```bash\n# Set default backend persistently\ntxm config set backend zellij\n\n# View current configuration\ntxm config show\n\n# Get specific configuration value\ntxm config get backend\n\n# Temporarily override via environment variable\nTXM_DEFAULT_BACKEND=tmux txm create my-session\n```\n\n### Backend Selection Priority\n\n1. **Environment Variable**: `TXM_DEFAULT_BACKEND` (temporary override)\n2. **Config File**: `~/.txm/config` (persistent setting)\n3. **Default**: tmux (if available, otherwise first available backend)\n\n\n## Available Commands\n\n| Command | Description | tmux | zellij | GNU Screen |\n|---------|-------------|------|--------|------------|\n| `create` | Create a new session | ✓ | ✓ | ✓ |\n| `list` | List all active sessions | ✓ | ✓ | ✓ |\n| `attach` | Attach to an existing session | ✓ | ✓ | ✓ |\n| `detach` | Detach from current session | ✓ | ✓ | ✓ |\n| `delete` | Delete a session | ✓ | ✓ | ✓ |\n| `nuke` | Remove all sessions | ✓ | ✓ | ✓ |\n| `new-window` | Create a new window/tab | ✓ | ✓ | ✓ |\n| `list-windows` | List windows in a session | ✓ | ✓ | ✓ |\n| `kill-window` | Remove a window | ✓ | ✓ | ✓ |\n| `next-window` | Switch to next window | ✓ | ✓ | ✓ |\n| `prev-window` | Switch to previous window | ✓ | ✓ | ✓ |\n| `rename-session` | Rename an existing session | ✓ | ✓ | ✗ |\n| `rename-window` | Rename a window | ✓ | ✓ | ✓ |\n| `move-window` | Move window between sessions | ✓ | ✓ | ✗ |\n| `swap-window` | Swap window positions | ✓ | ✗ | ✗ |\n| `split-window` | Split a window into panes | ✓ | ✓ | ✓* |\n| `list-panes` | List panes in a window | ✓ | ✓ | ✗ |\n| `kill-pane` | Remove a pane | ✓ | ✓ | ✗ |\n| `resize-pane` | Resize a pane | ✓ | ✓ | ✗ |\n| `send-keys` | Send keystrokes to a pane | ✓ | ✓ | ✗ |\n| `config` | Configuration management | ✓ | ✓ | ✓ |\n| `update` | Update txm to the latest version | ✓ | ✓ | ✓ |\n| `uninstall` | Uninstall txm | ✓ | ✓ | ✓ |\n| `version` | Show version and check for updates | ✓ | ✓ | ✓ |\n\n### Configuration Commands\n\n| Command | Description |\n|---------|-------------|\n| `txm config set backend \u003cbackend\u003e` | Set default backend (tmux/zellij/screen) |\n| `txm config get \u003ckey\u003e` | Get configuration value |\n| `txm config show` | Show all configuration |\n\n**Note**: \n- Basic session and window management commands are supported across all backends\n- *GNU Screen only supports vertical splitting\n- Advanced features automatically adapt to backend capabilities\n- zellij uses tab-based workflow while tmux/screen use windows\n\n## Installation\n\n### Using Pre-built Binaries\n\nDownload pre-built binaries from the [releases page](https://github.com/MohamedElashri/txm/releases):\n\n- `txm-ubuntu.zip`: Ubuntu (Linux)\n- `txm-macOS.zip`: macOS\n\nInstallation steps:\n\n1. Download the appropriate ZIP file\n2. Extract it:\n   ```bash\n   unzip txm-\u003cplatform\u003e.zip\n   ```\n3. Move to PATH:\n   ```bash\n   sudo mv txm /usr/local/bin/\n   ```\n\nQuick install using the installation script:\n\nFor user-local installation (default)\n\n```bash\ncurl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/install.sh | bash\n```\n \n\nFor system-wide installation\n\n```bash\ncurl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/install.sh | sudo bash -s -- --system\n```\n\n### Building from Source\n\nRequirements:\n- Go 1.17 or later\n- At least one terminal multiplexer: tmux, zellij, or GNU Screen\n\nSteps:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/MohamedElashri/txm\n   ```\n\n2. Navigate to project:\n   ```bash\n   cd txm\n   ```\n\n3. Build the binary:\n   ```bash\n   cd src\n   go build -o txm\n   ```\n\n4. (Optional) Move to PATH:\n   ```bash\n   sudo mv txm /usr/local/bin/\n   ```\n\n## Usage Examples\n\n### Backend Configuration\n\n```bash\n# Set zellij as your default backend\ntxm config set backend zellij\n\n# View current configuration\ntxm config show\n\n# Temporarily use tmux for a single command\nTXM_DEFAULT_BACKEND=tmux txm create dev-session\n```\n\n### Session Management\n\n```bash\n# Create a new session (uses configured backend)\ntxm create my-project\n\n# List all sessions\ntxm list\n\n# Attach to session\ntxm attach my-project\n\n# Create session with specific backend\nTXM_DEFAULT_BACKEND=zellij txm create zellij-session\n```\n\n### Window/Tab Management\n\n```bash\n# Create new window/tab\ntxm new-window my-project development\n\n# Navigate between windows\ntxm next-window my-project\ntxm prev-window my-project\n\n# List windows in session\ntxm list-windows my-project\n```\n\n### Advanced Operations\n\n```bash\n# Pane operations\ntxm split-window my-project development v  # vertical split (all backends)\ntxm split-window my-project development h  # horizontal split (tmux only)\n\n# tmux: Target specific panes by number\ntxm list-panes my-project development      # Lists all panes with numbers\ntxm resize-pane my-project development 0 R 10  # Resize pane 0\ntxm send-keys my-project development 1 \"npm start\"  # Send to pane 1\n\n# zellij: Operations work on focused pane (pane numbers ignored)\ntxm resize-pane my-project tab-name 0 R 10  # Resizes focused pane\ntxm send-keys my-project tab-name 0 \"npm start\"  # Sends to focused pane\n```\n\n3. Initialize module:\n   ```bash\n   go mod init github.com/MohamedElashri/txm\n   ```\n\n4. Build:\n   ```bash\n   go build -o txm\n   ```\n\n5. Install (optional):\n   ```bash\n   sudo mv txm /usr/local/bin/\n   ```\n\n## Basic Usage\n\n- Create session:\n  ```bash\n  txm create mysession\n  ```\n\n- List sessions:\n  ```bash\n  txm list\n  ```\n\n- Attach to session:\n  ```bash\n  txm attach mysession\n  ```\n\n- Delete session:\n  ```bash\n  txm delete mysession\n  ```\n\n- Create window (tmux only):\n  ```bash\n  txm new-window mysession windowname\n  ```\n\n## Advanced Features (tmux only)\n\n- Split window:\n  ```bash\n  txm split-window mysession 0 v  # vertical split\n  txm split-window mysession 0 h  # horizontal split\n  ```\n\n- Move window:\n  ```bash\n  txm move-window source-session 1 target-session\n  ```\n\n- Resize pane:\n  ```bash\n  txm resize-pane mysession 0 1 \"-D 10\"  # resize down 10 units\n  ```\n\nFor complete documentation, see [docs.md](docs.md). Or you can run `txm help` to see the available commands. There is an old fashioned `man` page available as well, run `man txm` to see\n\n## Environment Variables\n\n- `NO_COLOR`: Disable colored output\n- `TERM`: Used for terminal capability detection\n\n## Update \n\nTo update txm to the latest version, you simply need to run the following command:\n\n```bash\ntxm update\n```\n\nIf you have installed it as system-wide, you need to run the following command:\n\n```bash\nsudo txm update\n```\n\n\n## Uninstallation\n\nRemove txm and its configurations:\n\nThere is `uninstall` option to uninstall txm that can be used to uninstall txm .\n\nIf something went wrong during the this process, you can uninstall txm using the following script:\n\nFor user-local uninstallation\n```bash\ncurl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/uninstall.sh | bash\n```\n\nFor system-wide uninstallation\n\n```bash\ncurl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/uninstall.sh | sudo bash\n```\n\n\n## Contributing\n\nContributions welcome! Please submit issues and pull requests on GitHub.\n\n## License\n\nGNU General Public License v3.0 - see [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedelashri%2Ftxm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamedelashri%2Ftxm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamedelashri%2Ftxm/lists"}