Skip to content

Commit 5a79fc6

Browse files
committed
docs(cli): Restructure command pages to match vcspull pattern
Add intro paragraphs, wrap argparse directives in `## Command` sections, and rename generic `## Usage` to descriptive section names for consistent documentation structure across projects.
1 parent d0687bd commit 5a79fc6

10 files changed

Lines changed: 66 additions & 8 deletions

File tree

docs/cli/convert.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
# tmuxp convert
44

5+
Convert workspace configuration files between YAML and JSON formats.
6+
7+
## Command
8+
59
```{eval-rst}
610
.. argparse::
711
:module: tmuxp.cli
@@ -10,7 +14,7 @@
1014
:path: convert
1115
```
1216

13-
## Usage
17+
## Basic usage
1418

1519
````{tab} YAML -> JSON
1620

docs/cli/debug-info.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
# tmuxp debug-info
66

7+
Collect and display system information useful for debugging tmuxp issues and submitting bug reports.
8+
9+
## Command
10+
711
```{eval-rst}
812
.. argparse::
913
:module: tmuxp.cli
@@ -12,7 +16,7 @@
1216
:path: debug-info
1317
```
1418

15-
## Usage
19+
## Example output
1620

1721
```console
1822

docs/cli/edit.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
# tmuxp edit
66

7+
Open a workspace configuration file in your default editor for quick modifications.
8+
9+
## Command
10+
711
```{eval-rst}
812
.. argparse::
913
:module: tmuxp.cli

docs/cli/freeze.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
# tmuxp freeze
66

7+
Export a running tmux session to a workspace configuration file. This allows you to save the current state of your tmux session for later restoration.
8+
9+
## Command
10+
711
```{eval-rst}
812
.. argparse::
913
:module: tmuxp.cli
@@ -12,23 +16,27 @@
1216
:path: freeze
1317
```
1418

15-
## Usage
19+
## Basic usage
1620

17-
Freeze sessions
21+
Freeze the current session:
1822

1923
```console
2024
$ tmuxp freeze
2125
```
2226

27+
Freeze a specific session by name:
28+
2329
```console
2430
$ tmuxp freeze [session_name]
2531
```
2632

33+
Overwrite an existing workspace file:
34+
2735
```console
2836
$ tmuxp freeze --force [session_name]
2937
```
3038

31-
You can save the state of your tmux session by freezing it.
39+
## Output format
3240

3341
Tmuxp will offer to save your session state to `.json` or `.yaml`.
3442

docs/cli/import.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
# tmuxp import
44

5+
Import and convert workspace configurations from other tmux session managers like teamocil and tmuxinator.
6+
57
(import-teamocil)=
68

79
## From teamocil
810

11+
Import teamocil configuration files and convert them to tmuxp format.
12+
13+
### Command
14+
915
```{eval-rst}
1016
.. argparse::
1117
:module: tmuxp.cli
@@ -14,6 +20,8 @@
1420
:path: import teamocil
1521
```
1622

23+
### Basic usage
24+
1725
````{tab} YAML
1826
1927
```console
@@ -34,6 +42,10 @@ $ tmuxp import teamocil /path/to/file.json
3442

3543
## From tmuxinator
3644

45+
Import tmuxinator configuration files and convert them to tmuxp format.
46+
47+
### Command
48+
3749
```{eval-rst}
3850
.. argparse::
3951
:module: tmuxp.cli
@@ -42,6 +54,8 @@ $ tmuxp import teamocil /path/to/file.json
4254
:path: import tmuxinator
4355
```
4456

57+
### Basic usage
58+
4559
````{tab} YAML
4660
4761
```console

docs/cli/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ completion
4242

4343
(tmuxp-main)=
4444

45-
## Command: `tmuxp`
45+
## Main command
46+
47+
The `tmuxp` command is the entry point for all tmuxp operations. Use subcommands to load sessions, manage configurations, and interact with tmux.
48+
49+
### Command
4650

4751
```{eval-rst}
4852
.. argparse::

docs/cli/load.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
# tmuxp load
88

9+
Load tmux sessions from workspace configuration files. This is the primary command for starting sessions from YAML or JSON configurations.
10+
11+
## Command
12+
913
```{eval-rst}
1014
.. argparse::
1115
:module: tmuxp.cli
@@ -14,7 +18,7 @@
1418
:path: load
1519
```
1620

17-
## Usage
21+
## Basic usage
1822

1923
You can load your tmuxp file and attach the tmux session via a few
2024
shorthands:

docs/cli/ls.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
# tmuxp ls
66

7+
List available workspace configurations from your local project and global tmuxp directories.
8+
9+
## Command
10+
711
```{eval-rst}
812
.. argparse::
913
:module: tmuxp.cli

docs/cli/search.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
# tmuxp search
66

7+
Search for workspace configurations by name or content across your tmuxp directories.
8+
9+
## Command
10+
711
```{eval-rst}
812
.. argparse::
913
:module: tmuxp.cli

docs/cli/shell.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
# tmuxp shell
66

7+
Launch an interactive Python shell with [libtmux] objects pre-loaded. Similar to Django's shell command, this provides quick access to your tmux server, sessions, windows, and panes for scripting and debugging.
8+
9+
## Command
10+
711
```{eval-rst}
812
.. argparse::
913
:module: tmuxp.cli
@@ -22,7 +26,7 @@ $ tmuxp shell -c 'python code'
2226
:width: 100%
2327
```
2428

25-
## Guide
29+
## Interactive usage
2630

2731
Launch into a Python console with [libtmux] objects. Compare to django's shell.
2832

@@ -50,6 +54,8 @@ Window(@3 1:your_window, Session($1 your_project))
5054
Pane(%6 Window(@3 1:your_window, Session($1 your_project)))
5155
```
5256

57+
## Debugger integration
58+
5359
Supports [PEP 553][pep 553]'s `PYTHONBREAKPOINT` and
5460
compatible debuggers, for instance [ipdb][ipdb]:
5561

@@ -73,6 +79,8 @@ $ uvx --from ipdb ipdb3 --help
7379
$ env PYTHONBREAKPOINT=ipdb.set_trace tmuxp shell
7480
```
7581

82+
## Code execution
83+
7684
You can also pass in python code directly, similar to `python -c`, do
7785
this via `tmuxp -c`:
7886

0 commit comments

Comments
 (0)