{"id":16615673,"url":"https://github.com/pschmitt/tmux-slay","last_synced_at":"2025-03-16T21:31:10.153Z","repository":{"id":37485828,"uuid":"269610700","full_name":"pschmitt/tmux-slay","owner":"pschmitt","description":"TMUX script to run commands in a background session. Similar to abduco/dtach.","archived":false,"fork":false,"pushed_at":"2024-05-09T12:14:35.000Z","size":71,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T14:46:36.609Z","etag":null,"topics":["abduco","background-jobs","bash","dtach","init-system","screen","slay","tmux"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/pschmitt.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},"funding":{"github":["pschmitt"],"custom":["https://www.paypal.com/paypalme/pppschmitt"]}},"created_at":"2020-06-05T11:11:23.000Z","updated_at":"2025-01-24T12:24:59.000Z","dependencies_parsed_at":"2024-05-09T13:42:09.269Z","dependency_job_id":"4348ef1e-89a6-440e-a918-cc17e6716548","html_url":"https://github.com/pschmitt/tmux-slay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschmitt%2Ftmux-slay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschmitt%2Ftmux-slay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschmitt%2Ftmux-slay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pschmitt%2Ftmux-slay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pschmitt","download_url":"https://codeload.github.com/pschmitt/tmux-slay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830949,"owners_count":20354854,"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":["abduco","background-jobs","bash","dtach","init-system","screen","slay","tmux"],"created_at":"2024-10-12T02:10:18.284Z","updated_at":"2025-03-16T21:31:09.732Z","avatar_url":"https://github.com/pschmitt.png","language":"Shell","readme":"# 🚬 tmux-slay\n\nThis scripts allows running commands in the background, in a TMUX session.\n\nIt can be a poor man's init-sytem.\n\n# 🚏 Dependencies\n\nbash, awk, sed and tmux 🤷\n\n# 🔨 Installation\n\n## 🧊 Using zinit\n\n```zsh\nzinit light-mode wait lucid as\"null\" \\\n  sbin\"tmux-slay\" \\\n  atload\"alias tslay=tmux-slay\" \\\n  for @pschmitt/tmux-slay\n```\n\n## 🦆 Otherwise\n\nJust get `tmux-slay` and put it in your PATH.\n\n# 🎼 Completions\n\nCompletions for ZSH are available in the `completions/` dir.\n\n# 🎮 Usage\n\n```bash\n# Run single command\ntmux-slay run COMMAND\n\n# List running commands\ntmux-slay list\n\n# Display and follow log\ntmux-slay logs -f COMMAND\n\n# Stop/kill it\ntmux-slay kill COMMAND\n\n# Run command in a loop (repeatedly)\ntmux-slay run -l COMMAND\n\n# Run command once (don't start a second instance if it is already running)\ntmux-slay run -c COMMAND\n\n# Spawn a new instance of COMMAND and kill other windows running the same command\ntmux-slay run -u COMMAND\n\n# Clear all. Kill all running commands\ntmux-slay killall\n\n# Focus on output window running command\ntmux-slay select COMMAND\n```\n\n# ⚙️ Configuration\n\n## 👶 Session name\n\nBy default `tmux-slay` will create a new TMUX session named `bg` (for\nbackgroud) to run all the commands you instruct it to.\n\nTo change that you can set the env var `TMUX_SLAY_SESSION`:\n\n```bash\nTMUX_SLAY_SESSION=\"MY_SESSION_NAME\"\n```\n\n## 🌅 Init window\n\n`tmux-slay` keeps its session alive by creating an empty init-window named\n`bg-init`.\n\nTo change it you need to set `TMUX_SLAY_INIT_WINDOW_TITLE`:\n\n```bash\nTMUX_SLAY_INIT_WINDOW_TITLE=\"MY_INIT_WINDOW_TITLE\"\n```\n\n## 🐛 Debug mode\n\nTo debug `tmux-slay` just set `TMUX_SLAY_DEBUG` to any value:\n\n```bash\nTMUX_SLAY_DEBUG=1\n```\n\nTo debug commands started with `tmux-slay` the best thing to do is to enable the\n`remain-on-exit` options for the session, so that you don't loose the logs of\nyour command:\n\n```bash\ntmux-slay debug on\n```\n\nTo disable this again, run:\n\n```bash\ntmux-slay debug off\n```\n\n# 🧪 Examples\n\n## 💻 Run an auto-reconnecting reverse SSH tunnel to the current machine\n\n```bash\ntmux-slay run -l -c -u -n ssh-forward -- \\\n  ssh -o ExitOnForwardFailure=yes -R 22222:localhost:22 user@myvps.example.com\n```\n","funding_links":["https://github.com/sponsors/pschmitt","https://www.paypal.com/paypalme/pppschmitt"],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschmitt%2Ftmux-slay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpschmitt%2Ftmux-slay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpschmitt%2Ftmux-slay/lists"}