{"id":13495733,"url":"https://github.com/remi/teamocil","last_synced_at":"2025-05-15T16:04:30.685Z","repository":{"id":1378593,"uuid":"1332134","full_name":"remi/teamocil","owner":"remi","description":"There's no I in Teamocil. At least not where you think. Teamocil is a simple tool used to automatically create windows and panes in tmux with YAML files.","archived":false,"fork":false,"pushed_at":"2021-03-10T12:26:11.000Z","size":208,"stargazers_count":2373,"open_issues_count":22,"forks_count":102,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-04-21T05:20:53.993Z","etag":null,"topics":["tmux"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/remi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-02-05T18:09:52.000Z","updated_at":"2025-04-20T00:44:37.000Z","dependencies_parsed_at":"2022-07-16T10:30:46.229Z","dependency_job_id":null,"html_url":"https://github.com/remi/teamocil","commit_stats":null,"previous_names":["remiprev/teamocil"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remi%2Fteamocil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remi%2Fteamocil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remi%2Fteamocil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remi%2Fteamocil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remi","download_url":"https://codeload.github.com/remi/teamocil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374408,"owners_count":22060610,"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":["tmux"],"created_at":"2024-07-31T19:01:37.684Z","updated_at":"2025-05-15T16:04:30.665Z","avatar_url":"https://github.com/remi.png","language":"Ruby","funding_links":[],"categories":["Ruby","tmux","Tools","\u003ca name=\"tools\"\u003e\u003c/a\u003eTools and session management"],"sub_categories":["Ruby"],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/remiprev/teamocil\"\u003e\n    \u003cimg src=\"http://i.imgur.com/NX2eV2X.png\" alt=\"Teamocil\" /\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n  Teamocil is a simple tool used to automatically create\u003cbr /\u003e windows and panes in \u003ca href=\"http://tmux.sourceforge.net\"\u003etmux\u003c/a\u003e with YAML files.\n  \u003cbr /\u003e\u003cbr /\u003e\n  \u003ca href=\"https://rubygems.org/gems/teamocil\"\u003e\u003cimg src=\"http://img.shields.io/gem/v/teamocil.svg\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://travis-ci.org/remiprev/teamocil\"\u003e\u003cimg src=\"http://img.shields.io/travis/remiprev/teamocil.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Installation\n\n```bash\n# Install the `teamocil` Ruby gem\n$ gem install teamocil\n\n# Create your layout directory\n$ mkdir ~/.teamocil\n\n# Edit ~/.teamocil/sample.yml (look for sample layouts in this very `README.md`)\n$ teamocil --edit sample\n\n# Launch tmux\n$ tmux\n\n# Run your newly-created sample layout\n$ teamocil sample\n```\n\n## Usage\n\n```bash\n$ teamocil [options] [layout-name]\n```\n\n### Global options\n\n| Option      | Description\n|-------------|----------------------------\n| `--list`    | Lists all available layouts in `~/.teamocil`\n\n### Layout options\n\n| Option      | Description\n|-------------|----------------------------\n| `--layout`  | Takes a custom file path to a YAML layout file instead of `[layout-name]`\n| `--here`    | Uses the current window as the layout’s first window\n| `--edit`    | Opens the layout file with `$EDITOR` instead of executing it\n| `--show`    | Shows the layout content instead of executing it\n\n## Upgrading\n\nTeamocil 1.0 is a complete rewrite (from scratch!) of Teamocil. The code is now\nvery much simpler, cleaner and easier to maintain.\n\nThe downside of that is that several features were dropped during the rewrite\nprocess, mostly because I didn’t actually use/need them and I got tired of\nmaintaining features I don’t think are useful.\n\nYou *might* have to clean up your layout files after upgrading to 1.0. I’m\nsorry about that. The documentation in `README.md` should help you find which\nkeys are now supported.\n\nThe [`0.4-stable` branch](https://github.com/remiprev/teamocil/tree/0.4-stable) is still available with the old code. Feel free to fork the repository and add back as many features as you want :)\n\n## Configuration\n\n### Session\n\n| Key       | Description\n|-----------|----------------------------\n| `name`    | The tmux session name\n| `windows` | An `Array` of windows\n\n### Windows\n\n| Key       | Description\n|-----------|----------------------------\n| `name`    | The tmux window name _(required)_\n| `root`    | The path where all panes in the window will be started\n| `layout`  | The layout that will be set after all panes are created by Teamocil\n| `panes`   | An `Array` of panes\n| `focus`   | If set to `true`, the window will be selected after the layout has been executed\n| `options` | A `Hash` of options that will be set with the `set-window-option` command\n\n### Panes\n\nA pane can either be a `String` or a `Hash`. If it’s a `String`, Teamocil will\ntreat it as a single-command pane.\n\n| Key        | Description\n|------------|----------------------------\n| `commands` | An `Array` of commands that will be ran when the pane is created\n| `focus`    | If set to `true`, the pane will be selected after the layout has been executed\n\n## Examples\n\n### Simple two pane window\n\n```yaml\nwindows:\n  - name: sample-two-panes\n    root: ~/Code/sample/www\n    layout: even-horizontal\n    panes:\n      - git status\n      - rails server\n```\n\n```\n.------------------.------------------.\n| (0)              | (1)              |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n'------------------'------------------'\n```\n\n### Simple three pane window\n\n```yaml\nwindows:\n  - name: sample-three-panes\n    root: ~/Code/sample/www\n    layout: main-vertical\n    panes:\n      - vim\n      - commands:\n        - git pull\n        - git status\n      - rails server\n```\n\n```\n.------------------.------------------.\n| (0)              | (1)              |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |------------------|\n|                  | (2)              |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n'------------------'------------------'\n```\n\n### Simple four pane window\n\n```yaml\nwindows:\n  - name: sample-four-panes\n    root: ~/Code/sample/www\n    layout: tiled\n    panes:\n      - vim\n      - foreman start web\n      - git status\n      - foreman start worker\n```\n\n```\n.------------------.------------------.\n| (0)              | (1)              |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|------------------|------------------|\n| (2)              | (3)              |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n'------------------'------------------'\n```\n\n### Two pane window with focus in second pane\n\n```yaml\nwindows:\n  - name: sample-two-panes\n    root: ~/Code/sample/www\n    layout: even-horizontal\n    panes:\n      - rails server\n      - commands:\n          - rails console\n        focus: true\n```\n\n```\n.------------------.------------------.\n| (0)              | (1) \u003cfocus here\u003e |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n|                  |                  |\n'------------------'------------------'\n```\n\n## Extras\n\n### Zsh autocompletion\n\nTo get autocompletion when typing `teamocil \u003cTab\u003e` in a zsh session, add this line to your `~/.zshrc` file:\n\n```zsh\ncompctl -g '~/.teamocil/*(:t:r)' teamocil\n```\n\n[zsh-completions](https://github.com/zsh-users/zsh-completions) also provides\nadditional completion definitions for Teamocil.\n\n### Bash autocompletion\n\nTo get autocompletion when typing `teamocil \u003cTab\u003e` in a bash session, add this line to your `~/.bashrc` file:\n\n```bash\ncomplete -W \"$(teamocil --list)\" teamocil\n```\n\n### Fish autocompletion\n\nTo get autocompletion when typing `teamocil \u003cTab\u003e` in a fish session,\nadd the following file `~/.config/fish/completions/teamocil.fish` with\nthe following content:\n\n```fish\ncomplete -x -c teamocil -a '(teamocil --list)'\n```\n\n### Custom window layout\n\nTeamocil supports all the window layout names supported by tmux.\n\n* `even-horizontal`\n* `even-vertical`\n* `main-horizontal`\n* `main-vertical`\n* `tiled`\n\nHowever, it also supports the custom format understood by tmux. This is\nespecially useful if you want to manually resize your panes and keep using that\nlayout in the future.\n\nYou can grab the layout for the current window by running this command:\n\n```bash\ntmux list-windows -F \"#{window_active} #{window_layout}\" | grep \"^1\" | cut -d \" \" -f 2\n```\n\nYou can then use the result as the `layout` key for any Teamocil window object.\n\n```yaml\nwindows:\n  - name: sample-two-uneven-panes\n    layout: 00c7,158x38,0,0[158x9,0,0,37,158x28,0,10,39]\n    panes:\n      - echo foo\n      - echo bar\n```\n\n## Contributors\n\nFeel free to contribute and submit issues/pull requests\n[on GitHub](https://github.com/remiprev/teamocil/issues), just like these fine\nfolks did:\n\n* [@garno](https://github.com/garno)\n* [@jbourassa](https://github.com/jbourassa)\n* [@bdimcheff](https://github.com/bdimcheff)\n* [@jscheel](https://github.com/jscheel)\n* [@mklappstuhl](https://github.com/mklappstuhl)\n\n## License\n\nTeamocil is © 2011-2016 [Rémi Prévost](http://exomel.com) and may be freely\ndistributed under the [MIT license](https://github.com/remiprev/teamocil/blob/master/LICENSE.md).\nSee the `LICENSE.md` file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremi%2Fteamocil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremi%2Fteamocil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremi%2Fteamocil/lists"}