{"id":13596105,"url":"https://github.com/jamesottaway/tmux-up","last_synced_at":"2025-04-09T16:31:34.182Z","repository":{"id":24853342,"uuid":"28268528","full_name":"jamesottaway/tmux-up","owner":"jamesottaway","description":"Bootstrap new `tmux` sessions without complex tools, DSLs, or dependencies","archived":false,"fork":false,"pushed_at":"2018-01-15T22:05:02.000Z","size":18,"stargazers_count":113,"open_issues_count":6,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-06T19:41:01.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamesottaway.png","metadata":{"files":{"readme":"README.markdown","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.markdown","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-20T14:02:55.000Z","updated_at":"2024-09-02T10:40:32.000Z","dependencies_parsed_at":"2022-08-23T07:50:59.459Z","dependency_job_id":null,"html_url":"https://github.com/jamesottaway/tmux-up","commit_stats":null,"previous_names":["jamesottaway/teemux"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesottaway%2Ftmux-up","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesottaway%2Ftmux-up/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesottaway%2Ftmux-up/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamesottaway%2Ftmux-up/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamesottaway","download_url":"https://codeload.github.com/jamesottaway/tmux-up/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248067768,"owners_count":21042352,"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":[],"created_at":"2024-08-01T16:02:08.299Z","updated_at":"2025-04-09T16:31:31.949Z","avatar_url":"https://github.com/jamesottaway.png","language":"Shell","readme":"# tmux-up\n\nBootstrap new `tmux` sessions without complex tools, DSLs, or dependencies.\n\n## Install\n\nIf you use [fresh](http://freshshell.com/) to manage your dotfiles, just run:\n\n```\nfresh jamesottaway/tmux-up tmux-up --bin\n```\n\nIf not, you might want to try [bpkg](http://www.bpkg.io/):\n\n```\nbpkg install jamesottaway/tmux-up\n```\n\nAlternatively just fetch the script with either `curl` or `wget`, and make sure it's executable:\n\n```\ncurl -L https://git.io/tmux-up -o /usr/local/bin/tmux-up\nwget https://git.io/tmux-up -O /usr/local/bin/tmux-up\nchmod u+x /usr/local/bin/tmux-up\n```\n\n## Usage\n\nDefine the desired initial state of your `tmux` session in a file, using the standard `tmux` commands.\n\nFor example, here is `dev.conf` for a fictional Rails application development environment:\n\n```\nsend-keys 'git up' C-m\nsend-keys 'git checkout develop' C-m\nsend-keys 'bundle install' C-m\nnew-window\nsend-keys 'vim' C-m\nnew-window -n server\nsend-keys 'rails server' C-m\nnew-window -n console\nsend-keys 'rails console' C-m\nnew-window -n db\nsend-keys 'psql -d example_development' C-m\n```\n\nTo create a new `tmux` session using the above configuration just run:\n\n```\n~/example ❯ tmux-up dev.conf\n```\n\nUnder the hood `tmux-up` will:\n\n- Create a `tmux` session named `example/dev`\n- Invoke each line in `dev.conf`\n- Switch to the first `tmux` window\n- Attach to the `example/dev` session\n\nIf you detach from the `example/dev` session, simply re-run `tmux-up dev.conf` which will reattach you to the session.\n\n## Alternatives\n\nThere are quite a lot of other approaches to this problem already floating around.\n\n### tmuxinator, teamocil, etc.\n\nThese tools are very popular, but having a dependency on a working Ruby environment (or similar) for a simple tool like this seems like overkill.\n\nAs a contrast, `tmux-up` is a simple shell script, meaning it will run anywhere `tmux` will.\n\nIn addition to this, these tools commonly use abstracted formats to define your session configuration, which increases the difficulty of adopting such a tool.\n\nIn the case of `tmux-up`, you use native `tmux` commands like `new-window` and `send-keys`.\n\n### Plain ol' tmux\n\nThe other end of the spectrum would be to invoke `tmux` directly, but override the configuration using the `-f` flag.\n\nI don't like this approach, for two reasons:\n\n- you need to add `source-file ~/.tmux.conf` (or wherever your default config lives) to ensure your top-level configuration is respected\n\n- you need to remember to append the `attach` command, since `tmux` always calls `new-session` when it starts\n\nTo avoid these pitfalls, `tmux-up dev.conf` is functionally identical to `tmux -f dev.conf attach`.\n","funding_links":[],"categories":["Shell","\u003ca name=\"tools\"\u003e\u003c/a\u003eTools and session management"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesottaway%2Ftmux-up","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamesottaway%2Ftmux-up","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamesottaway%2Ftmux-up/lists"}