https://github.com/AranBorkum/tmux-cookie-cutter
Tmux plugin to configure sessions with default templates
https://github.com/AranBorkum/tmux-cookie-cutter
tmux tmux-plugin tmux-plugins
Last synced: 6 months ago
JSON representation
Tmux plugin to configure sessions with default templates
- Host: GitHub
- URL: https://github.com/AranBorkum/tmux-cookie-cutter
- Owner: AranBorkum
- License: mit
- Created: 2025-07-11T10:06:45.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-11-17T14:32:52.000Z (7 months ago)
- Last Synced: 2025-11-17T16:20:20.070Z (7 months ago)
- Topics: tmux, tmux-plugin, tmux-plugins
- Language: Python
- Homepage:
- Size: 43.9 KB
- Stars: 15
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tmux - tmux-cookie-cutter
README
# Tmux Cookie Cutter
Letting you define your tmux window setup configuration, pre-run environment setup and launch programs as you start a new tmux session.
## Installation
### Installation with [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) (recommended)
Add plugin to the list of TPM plugins in `.tmux.conf`:
```shell
set -g @plugin 'AranBorkum/tmux-cookie-cutter'
```
Hit `prefix + I` to fetch the plugin and source it.
### Manual Installation
Clone the repo:
```shell
$ git clone https://github.com/AranBorkum/tmux-cookie-cutter ~/clone/path
```
Add this line to the bottom of `.tmux.conf`:
```shell
run-shell ~/clone/path/cookie-cutter.tmux
```
Reload TMUX environment:
```shell
# type this in terminal
$ tmux source-file ~/.tmux.conf
```
## Usage
Create a `.tmux-cookie-cutter.yaml` file in your `$HOME/.config/` directory _or_ a bespoke one in the root of your project. Configure this with the following values:
```yaml
globals:
envvars:
- VARIABLE_1=...
- VARIABLE_2=...
setup_command: "neofetch"
default_windows:
- name: "neovim"
envvars:
- VARIABLE_1=...
- VARIABLE_2=...
setup_command: "source .venv/bin/activate"
command: "nvim"
- name: "terminal"
envvars:
- VARIABLE_1=...
- VARIABLE_2=...
setup_command: "source .venv/bin/activate"
command:
panes:
- split_direction: "vertical"
size: 25 # percentage width of a vertically split pane
- split_direction: "horizontal"
command: ./manage runserver
size: 40 # percentage width of a horizontally split pane
```
Globals will be applied to every tmux window, removing the need for repetition. Optionally, you can set the python interpreter to use, it defaults to python3:
```shell
set-option -g @cookie_cutter_python "python3"
```
Be sure it has PyYAML available, you can use `uv` to run it with the `pyyaml` package:
```shell
set-option -g @cookie_cutter_python "uv run --with pyyaml"
```