Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
dead8ea
docs(comparison): Add feature comparison table for tmuxp/tmuxinator/t…
tony Feb 8, 2026
8ea97c4
fix(docs): Correct parity docs from verification pass
tony Feb 8, 2026
7125036
fix(comparison): Correct tmuxinator min tmux and detach flag
tony Feb 8, 2026
fcb6099
fix(comparison): Correct tmuxinator version ref and clarify details
tony Feb 8, 2026
6c2b5d4
fix(comparison): Annotate startup_window/startup_pane with tmuxp focu…
tony Feb 8, 2026
6b8806f
fix(parity-docs): Correct before_script hook mapping and --here details
tony Feb 8, 2026
29c3b8e
fix(comparison): Correct tmuxinator min tmux, add session rename note…
tony Feb 8, 2026
f782997
docs(comparison): Update version, fix hook descriptions, add auto-det…
tony Mar 6, 2026
b7f157f
docs(comparison): Add teamocil v0.x pane sizing keys
tony Mar 6, 2026
3e34169
docs(comparison): Refine auto-detection algorithm with v0.x fallback
tony Mar 6, 2026
f85de7a
docs(comparison): Fix pre-build script and deprecated hook mappings
tony Mar 6, 2026
87d7236
docs(comparison): Add synchronize deprecation, pane shell_command_bef…
tony Mar 7, 2026
f19f2c6
fix(importers[import_tmuxinator]): Fix pre/pre_window mapping to corr…
tony Mar 7, 2026
abceffc
test(importers[import_tmuxinator]): Cover multi-flag cli_args parsing
tony Mar 7, 2026
c48aec7
fix(importers[import_teamocil]): Replace filter loop with direct assi…
tony Mar 7, 2026
9313800
test(importers[import_teamocil]): Add v1.x format test fixture
tony Mar 7, 2026
fde744b
feat(importers[import_tmuxinator]): Add rvm, pre_tab, startup, and sy…
tony Mar 7, 2026
0773910
test(importers[import_teamocil]): Cover focus, options, and height keys
tony Mar 7, 2026
93b68ef
feat(importers): Add logging for unsupported/dropped keys and remove …
tony Mar 7, 2026
95a8346
feat(loader[expand]): Desugar synchronize shorthand into options/opti…
tony Mar 15, 2026
65f274f
test(builder,loader): Add synchronize config key tests
tony Mar 15, 2026
22b654b
feat(builder[config_after_window],loader[expand]): Add shell_command_…
tony Mar 15, 2026
74cc54b
test(builder,loader): Add shell_command_after tests
tony Mar 15, 2026
1414368
feat(loader[expand],builder[iter_create_panes]): Add pane title confi…
tony Mar 15, 2026
5fcb06a
test(builder,loader): Add pane title config key tests
tony Mar 15, 2026
b53d99b
feat(cli[load],builder): Add --here flag to reuse current window
tony Mar 15, 2026
5d4bb06
test(builder): Add here mode integration test
tony Mar 15, 2026
c796e25
feat(cli[stop]): Add tmuxp stop command to kill sessions
tony Mar 15, 2026
26403af
test(cli[stop]): Add stop command tests
tony Mar 15, 2026
635442b
test(cli[stop]): Register stop in help examples validation tests
tony Mar 15, 2026
f7fd1ec
feat(cli[new,copy,delete]): Add config management commands
tony Mar 15, 2026
12520ef
test(cli[new,copy,delete]): Add config management command tests
tony Mar 15, 2026
db5398f
feat(cli[load]): Add --no-shell-command-before flag
tony Mar 15, 2026
03e812e
test(cli[load]): Add --no-shell-command-before flag tests
tony Mar 15, 2026
accdfe5
feat(cli[load]): Add --debug flag to show tmux commands during build
tony Mar 15, 2026
18de253
test(cli[load]): Add --debug flag tests
tony Mar 15, 2026
e69de14
feat(util,builder,cli[load,stop],loader): Add lifecycle hook config keys
tony Mar 15, 2026
8507b08
test(util,builder,cli[load,stop],loader): Add lifecycle hook tests
tony Mar 15, 2026
296ec35
feat(importers[tmuxinator]): Map startup_window/startup_pane to focus…
tony Mar 15, 2026
5f3d037
test(importers[tmuxinator]): Add startup_window/startup_pane focus tests
tony Mar 15, 2026
325e3d4
feat(builder[config_after_window]): Handle clear config key for windo…
tony Mar 16, 2026
c984c34
test(builder): Add clear config key tests
tony Mar 16, 2026
14cf87a
fix(cli[load]): Read socket_name, socket_path, config from workspace …
tony Mar 16, 2026
4952b42
test(cli[load]): Add config key precedence tests for load_workspace
tony Mar 16, 2026
94e5b34
feat(loader,cli[load]): Add {{ variable }} config templating with --s…
tony Mar 16, 2026
24973ce
test(loader,cli[load]): Add config templating and --set flag tests
tony Mar 16, 2026
eb27852
fix(importers[tmuxinator]): Coerce window names to str, convert named…
tony Mar 16, 2026
70657fa
test(importers[tmuxinator]): Add edge case tests for window names, al…
tony Mar 16, 2026
b8012aa
fix(cli[load]): Only fire on_project_start when load proceeds
tony Mar 16, 2026
e0b23ca
fix(cli[load]): Only fire on_project_restart after user confirms
tony Mar 16, 2026
6b30faf
docs(cli[copy,delete,new,stop]): Add doctests to create_*_subparser f…
tony Mar 16, 2026
08d91d7
docs(CHANGES): Add 1.68.0 release notes for parity features
tony Mar 16, 2026
c0773f8
docs(cli[stop,new,copy,delete]): Add command docs and API pages
tony Mar 16, 2026
10e99da
docs(cli[load]): Document new flags and config templating
tony Mar 16, 2026
e773685
docs(config[top-level]): Document new config keys and lifecycle hooks
tony Mar 16, 2026
4d4c1eb
docs(config[examples]): Add examples and tests for new features
tony Mar 16, 2026
d8c1ec3
docs(comparison): Update feature tables for parity
tony Mar 16, 2026
2e902ad
docs(index,import): Add comparison to toctree and update import notes
tony Mar 16, 2026
3280889
cli(stop,new,copy,delete[help]): Show help when called with no arguments
tony Mar 17, 2026
a3442be
fix(builder[here]): Use shlex.quote for start_directory in --here mode
tony Mar 21, 2026
af2a373
docs(cli[copy,delete,new,stop]): Add doctests to command_* entrypoints
tony Mar 21, 2026
bdb8764
docs(cli[load]): Add doctest to _load_here_in_current_session
tony Mar 21, 2026
019ed63
feat(importers[tmuxinator]): Warn when explicit socket_name overrides…
tony Mar 21, 2026
38f8ab0
fix(util[run_hook_commands]): Add 120s timeout to hook subprocess
tony Mar 21, 2026
7297b37
fix(importers[tmuxinator]): Join list pre values before assigning to …
tony Mar 21, 2026
2b72ab7
fix(builder[here]): Clean existing panes before rebuilding in --here …
tony Mar 21, 2026
e1ccad4
fix(cli[load]): Clean up debug handler on early parse/expand failures
tony Mar 21, 2026
00b2b98
fix(cli[new]): Split EDITOR env var with shlex for flag support
tony Mar 21, 2026
8c671d3
fix(importers[tmuxinator]): Pass through pane title and lifecycle hoo…
tony Mar 21, 2026
63d1216
fix(importers[tmuxinator]): Warn on silently dropped tmux_command, at…
tony Mar 21, 2026
f0afc96
fix(loader[expand]): Validate pane_title_position against top/bottom/off
tony Mar 21, 2026
51ed7e1
test(cli[load]): Assert --no-shell-command-before actually strips com…
tony Mar 21, 2026
821eafd
fix(cli[new]): Handle missing EDITOR binary gracefully
tony Mar 21, 2026
cb8d82b
fix(importers[tmuxinator]): Map standalone pre_window/pre_tab without…
tony Mar 22, 2026
e2ada35
fix(importers[tmuxinator]): Log info on numeric startup_window/pane i…
tony Mar 22, 2026
90d77fd
fix(builder[here]): Detect duplicate session name before renaming in …
tony Mar 22, 2026
f25957d
fix(builder[here]): Provision environment and window_shell in --here …
tony Mar 22, 2026
e8fe218
fix(cli[copy]): Respect TMUXP_CONFIGDIR even when directory doesn't e…
tony Mar 22, 2026
73f69d0
fix(importers[tmuxinator]): Drop dead on_project_first_start key from…
tony Mar 22, 2026
3ec417c
fix(importers[tmuxinator]): Join pre_window list with "; " when pre i…
tony Mar 22, 2026
310625e
docs(cli[import]): Fix pre mapping description (before_script, not on…
tony Mar 22, 2026
e2a6c80
fix(util[run_hook_commands]): Catch OSError for nonexistent cwd
tony Mar 22, 2026
3550d5b
fix(cli[stop]): Enable current-session fallback when no args given
tony Mar 22, 2026
45c438b
fix(cli[stop]): Require TMUX env for no-args current-session fallback
tony Mar 22, 2026
4bddd88
fix(importers[tmuxinator]): Use exclusive rbenv/rvm/pre_tab/pre_windo…
tony Mar 22, 2026
dd66c6c
fix(builder[hooks]): Add cwd to on_project_exit run-shell command
tony Mar 22, 2026
8acf644
fix(cli[load]): Make --here and --append mutually exclusive
tony Mar 22, 2026
fb9089d
fix(cli[load]): Warn when --here used outside tmux
tony Mar 22, 2026
596db38
test(cli[help]): Add safety test for dangerous subprocess tmuxp calls
tony Mar 22, 2026
95d4b44
fix(importers[tmuxinator]): Map pre to on_project_start instead of be…
tony Mar 23, 2026
b93cb19
fix(builder[here]): Move rename-conflict check before session mutation
tony Mar 23, 2026
8e4bfe5
fix(cli[stop]): Exit with code 1 on SessionNotFound
tony Mar 23, 2026
af3451b
fix(cli[load]): Add --detached to --here/--append mutual exclusion group
tony Mar 23, 2026
5ea65aa
fix(builder[hooks]): Fix double-escaping in on_project_exit cwd
tony Mar 28, 2026
515b590
fix(importers[tmuxinator]): Preserve passthrough on_project_start ove…
tony Mar 28, 2026
539c403
docs(cli[load]): Correct --debug output stream from stderr to stdout
tony Mar 28, 2026
1d6a345
fix(cli[load]): Add doctest for _TmuxCommandDebugHandler.emit()
tony Mar 28, 2026
ea107d3
fix(cli[load]): Replace callable() doctests with real exercising doct…
tony Mar 28, 2026
ea45627
fix(importers[tmuxinator]): Rename window_dict shadowing to tmuxp_window
tony Mar 28, 2026
3e95321
fix(loader): Guard expandshell against None window names
tony Mar 28, 2026
48019db
fix(cli[load]): Rename t variable to srv to avoid typing module shadow
tony Mar 28, 2026
4f0430a
fix(cli[copy,delete,new]): Exit with code 1 on error paths
tony Mar 28, 2026
af85952
fix(cli[copy]): Preserve source file extension for pure-name destinat…
tony Mar 28, 2026
8699f66
fix(cli[new]): Validate workspace name against path traversal and YAM…
tony Mar 28, 2026
a06d8f2
fix(util): Log hook stdout/stderr at DEBUG level on non-zero exit
tony Mar 28, 2026
b95cb9c
docs(cli[load],CHANGES): Clarify template syntax is simple variable s…
tony Mar 28, 2026
0e81c23
docs(configuration): Add note that on_project_exit fires on any clien…
tony Mar 28, 2026
1da5c94
docs(comparison,cli[load]): Add --debug semantic footnote, --here she…
tony Mar 28, 2026
4abd889
chore: Exclude notes/ and .claude/commands/ from version control
tony Mar 28, 2026
ecd3377
fix(cli[load]): Skip (k)ill option in --here error recovery
tony Mar 29, 2026
3f24e8b
fix(util): Raise SessionNotFound instead of falling back to sessions[0]
tony Mar 29, 2026
80c7908
fix(cli[load],docs): Tighten lifecycle hook semantics and parity claims
tony Mar 29, 2026
584d457
fix(importers): Warn on numeric startup_window/startup_pane index res…
tony Mar 29, 2026
e58cd82
fix(cli[new]): Reject quotes in workspace names to prevent invalid YAML
tony Mar 29, 2026
36cccd4
fix(cli[copy]): Guard against self-copy with resolved real path check
tony Mar 29, 2026
781f4a1
fix(importers): Handle attached POSIX flags in cli_args parsing
tony Mar 29, 2026
e8516ed
fix(loader): Validate --set template values against YAML-unsafe chara…
tony Mar 29, 2026
c6c0235
docs(cli[load]): Document --no-shell-command-before as intentionally …
tony Mar 29, 2026
34eaee6
fix(builder): Guard on_project_exit hook with session_attached check
tony Mar 29, 2026
f105b1e
refactor(importers): Move _TMUXINATOR_UNMAPPED_KEYS to module level
tony Mar 29, 2026
a5d6c75
fix(util,cli[stop]): Require pane resolution for destructive get_session
tony Mar 29, 2026
2c76e6e
fix(builder[here]): Use respawn-pane and set_environment instead of s…
tony Mar 29, 2026
cbe2594
fix(builder[here]): Warn when respawn-pane will kill running processes
tony Mar 29, 2026
ae09c8a
test(builder,cli[load]): Add tests for --here respawn-pane and error …
tony Mar 29, 2026
ad3f0fd
cli/load(fix[hooks]): Run on_project_start only for new session builds
tony Mar 29, 2026
9ad98cb
CHANGES(docs): Correct lifecycle hook semantics
tony Mar 29, 2026
3720832
WorkspaceBuilder(fix[here]): Preserve reused sessions on startup fail…
tony Mar 29, 2026
6d17e1c
cli/load(fix[here]): Reject multi-workspace here invocations
tony Mar 29, 2026
90ec543
Tmuxinator(fix[startup_targets]): Respect tmux base indices during im…
tony Mar 29, 2026
4f10142
WorkspaceBuilder(fix[reused_sessions]): Keep existing session hooks a…
tony Mar 29, 2026
d0dfdef
docs(CHANGES): Restructure parity release notes to house style
tony Jun 6, 2026
56f480a
docs(comparison): Drop dated last-updated marker
tony Jun 6, 2026
9a36d43
test(cli[load]): Replace MagicMock with monkeypatch stubs in --here e…
tony Jun 6, 2026
e490d1c
docs(importers): Add doctests to import_tmuxinator and import_teamocil
tony Jun 6, 2026
382be3d
WorkspaceBuilder(fix[options_after]): Apply options_after after the p…
tony Jun 6, 2026
520c29c
WorkspaceBuilder(fix[here]): Avoid respawning the pane running tmuxp
tony Jun 6, 2026
20b9270
WorkspaceBuilder(fix[here]): Normalize socket_path before self-pane c…
tony Jun 6, 2026
b9a8e28
cli/delete(fix[validation]): Refuse to unlink non-workspace files
tony Jun 6, 2026
249b3a6
util(fix[run_hook_commands]): Let lifecycle hooks run to completion
tony Jun 6, 2026
f265566
cli/load(fix[here]): Normalize --here outside tmux before session-exi…
tony Jun 6, 2026
75f8c77
cli/delete(fix[validation]): Match workspace extensions case-insensit…
tony Jun 6, 2026
1cde216
util(fix[run_hook_commands]): Align hook start log with logging schema
tony Jun 6, 2026
13dc17e
cli/delete(docs[help]): Note the workspace-extension restriction
tony Jun 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ docs/_static/css/fonts.css
**/CLAUDE.local.md
**/CLAUDE.*.md
**/.claude/settings.local.json
.claude/commands/

# Development notes
notes/
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Pass structured data on every log call where useful for filtering, searching, or
| `tmux_pane` | `str` | pane identifier |
| `tmux_config_path` | `str` | workspace config file path |
| `tmux_layout` | `str` | window layout string |
| `tmux_hook_cmd` | `str` | lifecycle hook shell command line |

**Heavy/optional keys** (DEBUG only, potentially large):

Expand Down
77 changes: 77 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,83 @@ $ tmuxp@next load yoursession
_Notes on the upcoming release will go here._
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->

tmuxp 1.71.0 brings tmuxp to feature parity with tmuxinator and
teamocil. Sessions can be managed end to end from the CLI (`stop`,
`new`, `copy`, `delete`), workspace configs gain lifecycle hooks,
`{{ variable }}` templating, and pane titles, and `tmuxp load` learns
`--here` and friends. Imports from tmuxinator and teamocil now convert
much more of an existing config. See {doc}`comparison` for a
side-by-side of all three tools.

### What's new

#### `tmuxp stop` — kill a session with cleanup (#1025)

Stop a running session by name. The `on_project_stop` lifecycle hook
runs before the session is killed, giving your project a chance to
clean up. See {ref}`cli-stop`.

```console
$ tmuxp stop mysession
```

#### `tmuxp new`, `tmuxp copy`, `tmuxp delete` — manage workspace configs (#1025)

Create a workspace config from a starter template and open it in
`$EDITOR`, duplicate an existing config under a new name, or delete
configs (with a confirmation prompt unless `-y` is passed).

```console
$ tmuxp new myproject
```

#### Lifecycle hooks (#1025)

Workspace configs support four hooks, modeled on tmuxinator's:

- `on_project_start` — before a new session is built
- `on_project_restart` — after you confirm reattaching to an existing session
- `on_project_exit` — when the last client detaches
- `on_project_stop` — before `tmuxp stop` kills the session

See {ref}`top-level` for examples.

#### Config templating with `--set` (#1025)

Workspace configs may contain `{{ variable }}` placeholders, filled at
load time:

```console
$ tmuxp load --set project=myapp mytemplate.yaml
```

#### Pane titles (#1025)

Session-level `enable_pane_titles`, `pane_title_position`, and
`pane_title_format` keys turn on tmux pane border titles; a pane-level
`title` key names individual panes.

#### New window keys: `synchronize`, `shell_command_after`, `clear` (#1025)

`synchronize: before/after/true` mirrors keystrokes across a window's
panes; `shell_command_after` runs commands in every pane after the
window is built; `clear: true` clears each pane once its commands
complete.

#### New `tmuxp load` flags (#1025)

- `--here` — build the workspace in your current tmux window instead of a new session
- `--no-shell-command-before` — skip all `shell_command_before` entries
- `--debug` — show each tmux command as it executes
- `--set KEY=VALUE` — fill config template variables

#### Broader tmuxinator and teamocil imports (#1025)

`tmuxp import` now converts lifecycle hooks, named panes, startup
window/pane focus, synchronized windows, and tmux CLI arguments from
tmuxinator configs, and recognizes teamocil's v1.x format. See
{ref}`cli-import` for the full key mappings.

## tmuxp 1.70.0 (2026-05-23)

tmuxp 1.70.0 bumps libtmux to 0.58.0, fixing session and window listing on systems whose locale is not UTF-8.
Expand Down
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def socket_name(request: pytest.FixtureRequest) -> str:

# Modules that actually need tmux fixtures in their doctests
DOCTEST_NEEDS_TMUX = {
"tmuxp.cli.load",
"tmuxp.cli.stop",
"tmuxp.util",
"tmuxp.workspace.builder",
}

Expand Down
25 changes: 25 additions & 0 deletions docs/cli/copy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(cli-copy)=

(cli-copy-reference)=

# tmuxp copy

Copy an existing workspace config to a new name. Source is resolved using the same logic as `tmuxp load` (supports names, paths, and extensions).

## Command

```{eval-rst}
.. argparse::
:module: tmuxp.cli
:func: create_parser
:prog: tmuxp
:path: copy
```

## Basic usage

Copy a workspace:

```console
$ tmuxp copy myproject myproject-backup
```
41 changes: 41 additions & 0 deletions docs/cli/delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
(cli-delete)=

(cli-delete-reference)=

# tmuxp delete

Delete one or more workspace config files. Prompts for confirmation unless `-y` is passed.

## Command

```{eval-rst}
.. argparse::
:module: tmuxp.cli
:func: create_parser
:prog: tmuxp
:path: delete
```

## Basic usage

Delete a workspace:

```console
$ tmuxp delete old-project
```

Delete without confirmation:

```console
$ tmuxp delete -y old-project
```

Delete multiple workspaces:

```console
$ tmuxp delete proj1 proj2
```

```{note}
Only workspace files are deletable: the resolved path must end in `.yaml`, `.yml`, or `.json`. Any other file is refused and the command exits with code 1.
```
18 changes: 18 additions & 0 deletions docs/cli/import.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ $ tmuxp import teamocil /path/to/file.json

````

### Supported teamocil features

The teamocil importer handles:

- **v1.x format** — `windows` at top level with `commands` key in panes
- **Focus** — `focus: true` on windows and panes is preserved
- **Window options** — `options` on windows are passed through

(import-tmuxinator)=

## From tmuxinator
Expand Down Expand Up @@ -71,3 +79,13 @@ $ tmuxp import tmuxinator /path/to/file.json
```

````

### Supported tmuxinator features

The tmuxinator importer maps:

- **Hook mapping** — `pre` maps to `on_project_start`, `pre_window` maps to `shell_command_before`
- **CLI args** — `cli_args` values (`-f`, `-S`, `-L`) are parsed into tmuxp config equivalents
- **Synchronize** — `synchronize` window key is converted
- **Startup focus** — `startup_window` / `startup_pane` convert to `focus: true`
- **Named panes** — hash-key pane syntax converts to `title` on the pane
4 changes: 4 additions & 0 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ load
shell
ls
search
stop
```

```{toctree}
Expand All @@ -63,6 +64,9 @@ edit
import
convert
freeze
new
copy
delete
```

```{toctree}
Expand Down
64 changes: 64 additions & 0 deletions docs/cli/load.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,67 @@ When progress is disabled, logging flows normally to the terminal and no spinner
### Before-script behavior

During `before_script` execution, the progress bar shows a marching animation and a ⏸ status icon, indicating that tmuxp is waiting for the script to finish before continuing with pane creation.

## Here mode

The `--here` flag reuses the current tmux window instead of creating a new session. This is similar to teamocil's `--here` flag.

```console
$ tmuxp load --here .
```

When used, tmuxp builds the workspace panes inside the current window rather than spawning a new session.

`--here` only supports a single workspace file per invocation.

```{note}
When `--here` needs to provision a directory, environment, or shell, tmuxp uses tmux primitives instead of typing `cd` / `export` into the pane. The pane tmuxp itself runs in is never respawned (that would kill the build mid-flight): there the directory is provisioned with a quoted `cd`, environment variables land in the tmux session environment (inherited by the panes the build creates, not the already-running shell), and `window_shell` is skipped with a warning. Any other reused pane is provisioned with `respawn-pane`, which replaces the pane's process before the workspace commands run — long-running child processes in that pane will be terminated.
```

## Skipping shell_command_before

The `--no-shell-command-before` flag skips all `shell_command_before` entries at every level (session, window, pane). This is useful for quick reloads when the setup commands (virtualenv activation, etc.) are already active.

```console
$ tmuxp load --no-shell-command-before myproject
```

```{note}
This flag is intentionally broader than tmuxinator's `--no-pre-window`, which only disables the window-level `pre_window` chain. tmuxp's flag strips `shell_command_before` at all levels for a clean reload experience.
```

## Debug mode

The `--debug` flag shows tmux commands as they execute. This disables the progress spinner and attaches a debug handler to libtmux's logger, printing each tmux command to stdout.

```console
$ tmuxp load --debug myproject
```

## Config templating

Workspace configs support simple `{{ variable }}` placeholders for variable substitution. Pass values via `--set KEY=VALUE`:

```console
$ tmuxp load --set project=myapp mytemplate.yaml
```

Multiple variables can be passed:

```console
$ tmuxp load --set project=myapp --set env=staging mytemplate.yaml
```

In the config file, use double-brace syntax:

```yaml
session_name: "{{ project }}"
windows:
- window_name: "{{ project }}-main"
panes:
- echo "Working on {{ project }}"
```

```{note}
Values containing `{{ }}` must be quoted in YAML to avoid parse errors.
```
25 changes: 25 additions & 0 deletions docs/cli/new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
(cli-new)=

(cli-new-reference)=

# tmuxp new

Create a new workspace configuration file from a minimal template and open it in `$EDITOR`. If the workspace already exists, it opens for editing.

## Command

```{eval-rst}
.. argparse::
:module: tmuxp.cli
:func: create_parser
:prog: tmuxp
:path: new
```

## Basic usage

Create a new workspace:

```console
$ tmuxp new myproject
```
37 changes: 37 additions & 0 deletions docs/cli/stop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
(cli-stop)=

(cli-stop-reference)=

# tmuxp stop

Stop (kill) a running tmux session. If `on_project_stop` is defined in the workspace config, that hook runs before the session is killed.

## Command

```{eval-rst}
.. argparse::
:module: tmuxp.cli
:func: create_parser
:prog: tmuxp
:path: stop
```

## Basic usage

Stop a session by name:

```console
$ tmuxp stop mysession
```

Stop the currently attached session:

```console
$ tmuxp stop
```

Use a custom socket:

```console
$ tmuxp stop -L mysocket mysession
```
Loading
Loading