projectcats-cli 1.0.2__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- projectcats_cli-1.0.3/PKG-INFO +143 -0
- projectcats_cli-1.0.3/README.md +133 -0
- projectcats_cli-1.0.3/projectcats_cli.egg-info/PKG-INFO +143 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pyproject.toml +2 -2
- projectcats_cli-1.0.2/PKG-INFO +0 -11
- projectcats_cli-1.0.2/README.md +0 -1
- projectcats_cli-1.0.2/projectcats_cli.egg-info/PKG-INFO +0 -11
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/LICENSE +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/__init__.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/box.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/cli.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/config.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/modules.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/packer.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/plugins.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/templates.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/pcat/terminal.py +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/projectcats_cli.egg-info/SOURCES.txt +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/projectcats_cli.egg-info/dependency_links.txt +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/projectcats_cli.egg-info/entry_points.txt +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/projectcats_cli.egg-info/requires.txt +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/projectcats_cli.egg-info/top_level.txt +0 -0
- {projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/setup.cfg +0 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: projectcats-cli
|
|
3
|
+
Version: 1.0.3
|
|
4
|
+
Summary: ProjectCats CLI with .pcat packaging, isolated boxes, plugins, and multitasking terminal.
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: prompt-toolkit
|
|
9
|
+
Dynamic: license-file
|
|
10
|
+
|
|
11
|
+
Here is a ready-to-use `README.md` in English tailored to `projectcats-cli` (`pcat`), covering packaging, profiles, module inspection/merging/splitting, isolated boxes, plugins, and the multitasking terminal.
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# ProjectCats (`pcat`)
|
|
15
|
+
|
|
16
|
+
A lightweight Python CLI and multitasking terminal toolkit for packing projects into `.pcat` module archives, inspecting and splitting/merging builds, running isolated sandboxes (`pcat box`), and extending commands via plugins.
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- **Project Packaging & Execution (`pack`, `unpack`, `run`, `info`)**: Pack directories or single files into split or single-chunk `.pcat` modules (`PCATIDX` / `PCATMOD` format) with `SHA-256` verification and optional execution entry points.
|
|
21
|
+
- **Build Profiles (`--profile`, `profiles`)**: Use predefined or custom profiles (`dev`, `release`, `data`, or custom entries in `~/.pcat/config.json`) with clear descriptions and chunk/executable settings.
|
|
22
|
+
- **Module Inspection & Manipulation (`inspect`, `merge`, `split`)**:
|
|
23
|
+
- `pcat inspect`: View project metadata, chunk sizes, `SHA-256` checksums, and integrity status without extracting to a target folder.
|
|
24
|
+
- `pcat merge`: Combine multiple `.pcat` archives into a single bundle with conflict handling (`error`, `overwrite`, `prefix`).
|
|
25
|
+
- `pcat split`: Split a `.pcat` archive into multiple smaller `.pcat` modules (`--per-file` or `--parts`).
|
|
26
|
+
- **Isolated Boxes (`pcat box`)**: Run background or foreground workspaces (`up`, `run`, `ps`, `logs`, `attach`, `stop`, `rm`) with optional virtual environments and live console attachment.
|
|
27
|
+
- **Plugin System (`plugins`, `plugin init`)**: Load custom `.py` plugins from `~/.pcat/plugins`, `./plugins`, or `PCAT_PLUGINS_DIR` to register new CLI subcommands.
|
|
28
|
+
- **Project Cat Terminal (`pcat -o`)**: Multi-pane / tab terminal UI (`prompt_toolkit`) with `0.05s` UI refresh, built-in `EDIT`/`CMD` file editor (`edit` / `vim`), box `attach` / `detach`, and non-blocking process output streaming.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
Install from PyPI:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install projectcats-cli
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or install locally in editable mode from source:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install -e .
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Quick Start
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Check CLI version and help
|
|
50
|
+
pcat
|
|
51
|
+
pcat --help
|
|
52
|
+
|
|
53
|
+
# Create a new project from a template
|
|
54
|
+
pcat new my_app
|
|
55
|
+
|
|
56
|
+
# Pack a project using a build profile
|
|
57
|
+
pcat pack ./my_app --profile release -o ./dist/my_app.pcat
|
|
58
|
+
|
|
59
|
+
# Inspect archive metadata, chunks, and SHA-256 integrity
|
|
60
|
+
pcat inspect ./dist/my_app.pcat
|
|
61
|
+
|
|
62
|
+
# Run a packed project directly
|
|
63
|
+
pcat run ./dist/my_app.pcat
|
|
64
|
+
|
|
65
|
+
# Open the multitasking terminal
|
|
66
|
+
pcat -o
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## CLI Commands Overview
|
|
71
|
+
|
|
72
|
+
| Command | Description |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `pcat -o` | Launch Project Cat Terminal (`grid` and `tabs` layouts) |
|
|
75
|
+
| `pcat new <name...> [--force]` | Create one or more projects from a template (`pcat new --list`) |
|
|
76
|
+
| `pcat pack <path> [--profile name]` | Pack files or directories into `.pcat` modules |
|
|
77
|
+
| `pcat profiles` | List build profiles and their descriptions |
|
|
78
|
+
| `pcat inspect <file.pcat> [--json]` | Inspect chunks, sizes, and `SHA-256` checksums |
|
|
79
|
+
| `pcat merge <out.pcat> <parts...>` | Merge multiple `.pcat` archives into one bundle |
|
|
80
|
+
| `pcat split <file.pcat> [--per-file | --parts n]` | Split a `.pcat` archive into smaller `.pcat` modules |
|
|
81
|
+
| `pcat run <file.pcat> [-- args...]` | Execute a runnable `.pcat` archive |
|
|
82
|
+
| `pcat unpack <file.pcat> [-o dir]` | Verify and extract a `.pcat` archive |
|
|
83
|
+
| `pcat box {up|run|ps|logs|attach|stop|rm}` | Manage isolated box workspaces |
|
|
84
|
+
| `pcat plugins` / `pcat plugin init <name>` | List loaded plugins or scaffold a new plugin template |
|
|
85
|
+
| `pcat config {show|set|template|reset}` | Manage global `pcat` configuration |
|
|
86
|
+
|
|
87
|
+
## Writing Custom Plugins
|
|
88
|
+
|
|
89
|
+
Create a `.py` file in `~/.pcat/plugins/` (or generate a starter file with `pcat plugin init my_cmd`):
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from __future__ import annotations
|
|
93
|
+
|
|
94
|
+
import argparse
|
|
95
|
+
|
|
96
|
+
PLUGIN_VERSION = "0.1.0"
|
|
97
|
+
PLUGIN_DESCRIPTION = "Example plugin adding a custom 'hello' command."
|
|
98
|
+
ENABLED = True
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _setup_parser(parser: argparse.ArgumentParser) -> None:
|
|
102
|
+
parser.add_argument("--name", default="world", help="Target name")
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def _handle_hello(args: argparse.Namespace) -> int:
|
|
106
|
+
print(f"Hello, {args.name}!")
|
|
107
|
+
return 0
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def register(ctx) -> None:
|
|
111
|
+
ctx.register_command(
|
|
112
|
+
name="hello",
|
|
113
|
+
handler=_handle_hello,
|
|
114
|
+
help="Print a greeting message.",
|
|
115
|
+
parser_setup=_setup_parser,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Terminal Shortcuts (`pcat -o`)
|
|
121
|
+
|
|
122
|
+
* `Ctrl + N`: Create a new pane or tab
|
|
123
|
+
* `Ctrl + D`: Close current pane (prompts to exit if only one remains)
|
|
124
|
+
* `Ctrl + T`: Switch between `GRID` and `TABS` layout modes
|
|
125
|
+
* `Ctrl + Arrow Keys`: Move focus between panes or tabs
|
|
126
|
+
* `Ctrl + U` / `Ctrl + J`: Scroll output up / down (`Alt + U` / `Alt + J` for faster scroll)
|
|
127
|
+
* `Ctrl + K`: Jump to bottom of output
|
|
128
|
+
* `Ctrl + V`: Paste clipboard text
|
|
129
|
+
* `Ctrl + Q`: Quit `pcat`
|
|
130
|
+
|
|
131
|
+
Inside the built-in editor (`edit <file>` or `vim <file>`):
|
|
132
|
+
|
|
133
|
+
* `Ctrl + I`: Toggle between `EDIT` and `CMD` mode
|
|
134
|
+
* In `CMD` mode: `s` (save), `sq` (save & quit), `q` (quit without saving), `py` / `python` / `runbypython` / `rbp` (run buffer with Python)
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
<ElicitationsGroup message="Next steps for your release:">
|
|
139
|
+
<Elicitation label="Prepare a clean pyproject.toml" query="Create a complete pyproject.toml for projectcats-cli with metadata, description, dependencies, and the pcat entry point."/>
|
|
140
|
+
<Elicitation label="Add a LICENSE file" query="Write a clean MIT LICENSE file in English for my projectcats-cli repository."/>
|
|
141
|
+
</ElicitationsGroup>
|
|
142
|
+
|
|
143
|
+
```
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
Here is a ready-to-use `README.md` in English tailored to `projectcats-cli` (`pcat`), covering packaging, profiles, module inspection/merging/splitting, isolated boxes, plugins, and the multitasking terminal.
|
|
2
|
+
|
|
3
|
+
```markdown
|
|
4
|
+
# ProjectCats (`pcat`)
|
|
5
|
+
|
|
6
|
+
A lightweight Python CLI and multitasking terminal toolkit for packing projects into `.pcat` module archives, inspecting and splitting/merging builds, running isolated sandboxes (`pcat box`), and extending commands via plugins.
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- **Project Packaging & Execution (`pack`, `unpack`, `run`, `info`)**: Pack directories or single files into split or single-chunk `.pcat` modules (`PCATIDX` / `PCATMOD` format) with `SHA-256` verification and optional execution entry points.
|
|
11
|
+
- **Build Profiles (`--profile`, `profiles`)**: Use predefined or custom profiles (`dev`, `release`, `data`, or custom entries in `~/.pcat/config.json`) with clear descriptions and chunk/executable settings.
|
|
12
|
+
- **Module Inspection & Manipulation (`inspect`, `merge`, `split`)**:
|
|
13
|
+
- `pcat inspect`: View project metadata, chunk sizes, `SHA-256` checksums, and integrity status without extracting to a target folder.
|
|
14
|
+
- `pcat merge`: Combine multiple `.pcat` archives into a single bundle with conflict handling (`error`, `overwrite`, `prefix`).
|
|
15
|
+
- `pcat split`: Split a `.pcat` archive into multiple smaller `.pcat` modules (`--per-file` or `--parts`).
|
|
16
|
+
- **Isolated Boxes (`pcat box`)**: Run background or foreground workspaces (`up`, `run`, `ps`, `logs`, `attach`, `stop`, `rm`) with optional virtual environments and live console attachment.
|
|
17
|
+
- **Plugin System (`plugins`, `plugin init`)**: Load custom `.py` plugins from `~/.pcat/plugins`, `./plugins`, or `PCAT_PLUGINS_DIR` to register new CLI subcommands.
|
|
18
|
+
- **Project Cat Terminal (`pcat -o`)**: Multi-pane / tab terminal UI (`prompt_toolkit`) with `0.05s` UI refresh, built-in `EDIT`/`CMD` file editor (`edit` / `vim`), box `attach` / `detach`, and non-blocking process output streaming.
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
Install from PyPI:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install projectcats-cli
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or install locally in editable mode from source:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install -e .
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Check CLI version and help
|
|
40
|
+
pcat
|
|
41
|
+
pcat --help
|
|
42
|
+
|
|
43
|
+
# Create a new project from a template
|
|
44
|
+
pcat new my_app
|
|
45
|
+
|
|
46
|
+
# Pack a project using a build profile
|
|
47
|
+
pcat pack ./my_app --profile release -o ./dist/my_app.pcat
|
|
48
|
+
|
|
49
|
+
# Inspect archive metadata, chunks, and SHA-256 integrity
|
|
50
|
+
pcat inspect ./dist/my_app.pcat
|
|
51
|
+
|
|
52
|
+
# Run a packed project directly
|
|
53
|
+
pcat run ./dist/my_app.pcat
|
|
54
|
+
|
|
55
|
+
# Open the multitasking terminal
|
|
56
|
+
pcat -o
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## CLI Commands Overview
|
|
61
|
+
|
|
62
|
+
| Command | Description |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `pcat -o` | Launch Project Cat Terminal (`grid` and `tabs` layouts) |
|
|
65
|
+
| `pcat new <name...> [--force]` | Create one or more projects from a template (`pcat new --list`) |
|
|
66
|
+
| `pcat pack <path> [--profile name]` | Pack files or directories into `.pcat` modules |
|
|
67
|
+
| `pcat profiles` | List build profiles and their descriptions |
|
|
68
|
+
| `pcat inspect <file.pcat> [--json]` | Inspect chunks, sizes, and `SHA-256` checksums |
|
|
69
|
+
| `pcat merge <out.pcat> <parts...>` | Merge multiple `.pcat` archives into one bundle |
|
|
70
|
+
| `pcat split <file.pcat> [--per-file | --parts n]` | Split a `.pcat` archive into smaller `.pcat` modules |
|
|
71
|
+
| `pcat run <file.pcat> [-- args...]` | Execute a runnable `.pcat` archive |
|
|
72
|
+
| `pcat unpack <file.pcat> [-o dir]` | Verify and extract a `.pcat` archive |
|
|
73
|
+
| `pcat box {up|run|ps|logs|attach|stop|rm}` | Manage isolated box workspaces |
|
|
74
|
+
| `pcat plugins` / `pcat plugin init <name>` | List loaded plugins or scaffold a new plugin template |
|
|
75
|
+
| `pcat config {show|set|template|reset}` | Manage global `pcat` configuration |
|
|
76
|
+
|
|
77
|
+
## Writing Custom Plugins
|
|
78
|
+
|
|
79
|
+
Create a `.py` file in `~/.pcat/plugins/` (or generate a starter file with `pcat plugin init my_cmd`):
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from __future__ import annotations
|
|
83
|
+
|
|
84
|
+
import argparse
|
|
85
|
+
|
|
86
|
+
PLUGIN_VERSION = "0.1.0"
|
|
87
|
+
PLUGIN_DESCRIPTION = "Example plugin adding a custom 'hello' command."
|
|
88
|
+
ENABLED = True
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _setup_parser(parser: argparse.ArgumentParser) -> None:
|
|
92
|
+
parser.add_argument("--name", default="world", help="Target name")
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def _handle_hello(args: argparse.Namespace) -> int:
|
|
96
|
+
print(f"Hello, {args.name}!")
|
|
97
|
+
return 0
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
def register(ctx) -> None:
|
|
101
|
+
ctx.register_command(
|
|
102
|
+
name="hello",
|
|
103
|
+
handler=_handle_hello,
|
|
104
|
+
help="Print a greeting message.",
|
|
105
|
+
parser_setup=_setup_parser,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Terminal Shortcuts (`pcat -o`)
|
|
111
|
+
|
|
112
|
+
* `Ctrl + N`: Create a new pane or tab
|
|
113
|
+
* `Ctrl + D`: Close current pane (prompts to exit if only one remains)
|
|
114
|
+
* `Ctrl + T`: Switch between `GRID` and `TABS` layout modes
|
|
115
|
+
* `Ctrl + Arrow Keys`: Move focus between panes or tabs
|
|
116
|
+
* `Ctrl + U` / `Ctrl + J`: Scroll output up / down (`Alt + U` / `Alt + J` for faster scroll)
|
|
117
|
+
* `Ctrl + K`: Jump to bottom of output
|
|
118
|
+
* `Ctrl + V`: Paste clipboard text
|
|
119
|
+
* `Ctrl + Q`: Quit `pcat`
|
|
120
|
+
|
|
121
|
+
Inside the built-in editor (`edit <file>` or `vim <file>`):
|
|
122
|
+
|
|
123
|
+
* `Ctrl + I`: Toggle between `EDIT` and `CMD` mode
|
|
124
|
+
* In `CMD` mode: `s` (save), `sq` (save & quit), `q` (quit without saving), `py` / `python` / `runbypython` / `rbp` (run buffer with Python)
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
<ElicitationsGroup message="Next steps for your release:">
|
|
129
|
+
<Elicitation label="Prepare a clean pyproject.toml" query="Create a complete pyproject.toml for projectcats-cli with metadata, description, dependencies, and the pcat entry point."/>
|
|
130
|
+
<Elicitation label="Add a LICENSE file" query="Write a clean MIT LICENSE file in English for my projectcats-cli repository."/>
|
|
131
|
+
</ElicitationsGroup>
|
|
132
|
+
|
|
133
|
+
```
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: projectcats-cli
|
|
3
|
+
Version: 1.0.3
|
|
4
|
+
Summary: ProjectCats CLI with .pcat packaging, isolated boxes, plugins, and multitasking terminal.
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: prompt-toolkit
|
|
9
|
+
Dynamic: license-file
|
|
10
|
+
|
|
11
|
+
Here is a ready-to-use `README.md` in English tailored to `projectcats-cli` (`pcat`), covering packaging, profiles, module inspection/merging/splitting, isolated boxes, plugins, and the multitasking terminal.
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# ProjectCats (`pcat`)
|
|
15
|
+
|
|
16
|
+
A lightweight Python CLI and multitasking terminal toolkit for packing projects into `.pcat` module archives, inspecting and splitting/merging builds, running isolated sandboxes (`pcat box`), and extending commands via plugins.
|
|
17
|
+
|
|
18
|
+
## Features
|
|
19
|
+
|
|
20
|
+
- **Project Packaging & Execution (`pack`, `unpack`, `run`, `info`)**: Pack directories or single files into split or single-chunk `.pcat` modules (`PCATIDX` / `PCATMOD` format) with `SHA-256` verification and optional execution entry points.
|
|
21
|
+
- **Build Profiles (`--profile`, `profiles`)**: Use predefined or custom profiles (`dev`, `release`, `data`, or custom entries in `~/.pcat/config.json`) with clear descriptions and chunk/executable settings.
|
|
22
|
+
- **Module Inspection & Manipulation (`inspect`, `merge`, `split`)**:
|
|
23
|
+
- `pcat inspect`: View project metadata, chunk sizes, `SHA-256` checksums, and integrity status without extracting to a target folder.
|
|
24
|
+
- `pcat merge`: Combine multiple `.pcat` archives into a single bundle with conflict handling (`error`, `overwrite`, `prefix`).
|
|
25
|
+
- `pcat split`: Split a `.pcat` archive into multiple smaller `.pcat` modules (`--per-file` or `--parts`).
|
|
26
|
+
- **Isolated Boxes (`pcat box`)**: Run background or foreground workspaces (`up`, `run`, `ps`, `logs`, `attach`, `stop`, `rm`) with optional virtual environments and live console attachment.
|
|
27
|
+
- **Plugin System (`plugins`, `plugin init`)**: Load custom `.py` plugins from `~/.pcat/plugins`, `./plugins`, or `PCAT_PLUGINS_DIR` to register new CLI subcommands.
|
|
28
|
+
- **Project Cat Terminal (`pcat -o`)**: Multi-pane / tab terminal UI (`prompt_toolkit`) with `0.05s` UI refresh, built-in `EDIT`/`CMD` file editor (`edit` / `vim`), box `attach` / `detach`, and non-blocking process output streaming.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
Install from PyPI:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install projectcats-cli
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or install locally in editable mode from source:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pip install -e .
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Quick Start
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Check CLI version and help
|
|
50
|
+
pcat
|
|
51
|
+
pcat --help
|
|
52
|
+
|
|
53
|
+
# Create a new project from a template
|
|
54
|
+
pcat new my_app
|
|
55
|
+
|
|
56
|
+
# Pack a project using a build profile
|
|
57
|
+
pcat pack ./my_app --profile release -o ./dist/my_app.pcat
|
|
58
|
+
|
|
59
|
+
# Inspect archive metadata, chunks, and SHA-256 integrity
|
|
60
|
+
pcat inspect ./dist/my_app.pcat
|
|
61
|
+
|
|
62
|
+
# Run a packed project directly
|
|
63
|
+
pcat run ./dist/my_app.pcat
|
|
64
|
+
|
|
65
|
+
# Open the multitasking terminal
|
|
66
|
+
pcat -o
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## CLI Commands Overview
|
|
71
|
+
|
|
72
|
+
| Command | Description |
|
|
73
|
+
| --- | --- |
|
|
74
|
+
| `pcat -o` | Launch Project Cat Terminal (`grid` and `tabs` layouts) |
|
|
75
|
+
| `pcat new <name...> [--force]` | Create one or more projects from a template (`pcat new --list`) |
|
|
76
|
+
| `pcat pack <path> [--profile name]` | Pack files or directories into `.pcat` modules |
|
|
77
|
+
| `pcat profiles` | List build profiles and their descriptions |
|
|
78
|
+
| `pcat inspect <file.pcat> [--json]` | Inspect chunks, sizes, and `SHA-256` checksums |
|
|
79
|
+
| `pcat merge <out.pcat> <parts...>` | Merge multiple `.pcat` archives into one bundle |
|
|
80
|
+
| `pcat split <file.pcat> [--per-file | --parts n]` | Split a `.pcat` archive into smaller `.pcat` modules |
|
|
81
|
+
| `pcat run <file.pcat> [-- args...]` | Execute a runnable `.pcat` archive |
|
|
82
|
+
| `pcat unpack <file.pcat> [-o dir]` | Verify and extract a `.pcat` archive |
|
|
83
|
+
| `pcat box {up|run|ps|logs|attach|stop|rm}` | Manage isolated box workspaces |
|
|
84
|
+
| `pcat plugins` / `pcat plugin init <name>` | List loaded plugins or scaffold a new plugin template |
|
|
85
|
+
| `pcat config {show|set|template|reset}` | Manage global `pcat` configuration |
|
|
86
|
+
|
|
87
|
+
## Writing Custom Plugins
|
|
88
|
+
|
|
89
|
+
Create a `.py` file in `~/.pcat/plugins/` (or generate a starter file with `pcat plugin init my_cmd`):
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from __future__ import annotations
|
|
93
|
+
|
|
94
|
+
import argparse
|
|
95
|
+
|
|
96
|
+
PLUGIN_VERSION = "0.1.0"
|
|
97
|
+
PLUGIN_DESCRIPTION = "Example plugin adding a custom 'hello' command."
|
|
98
|
+
ENABLED = True
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _setup_parser(parser: argparse.ArgumentParser) -> None:
|
|
102
|
+
parser.add_argument("--name", default="world", help="Target name")
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def _handle_hello(args: argparse.Namespace) -> int:
|
|
106
|
+
print(f"Hello, {args.name}!")
|
|
107
|
+
return 0
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def register(ctx) -> None:
|
|
111
|
+
ctx.register_command(
|
|
112
|
+
name="hello",
|
|
113
|
+
handler=_handle_hello,
|
|
114
|
+
help="Print a greeting message.",
|
|
115
|
+
parser_setup=_setup_parser,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Terminal Shortcuts (`pcat -o`)
|
|
121
|
+
|
|
122
|
+
* `Ctrl + N`: Create a new pane or tab
|
|
123
|
+
* `Ctrl + D`: Close current pane (prompts to exit if only one remains)
|
|
124
|
+
* `Ctrl + T`: Switch between `GRID` and `TABS` layout modes
|
|
125
|
+
* `Ctrl + Arrow Keys`: Move focus between panes or tabs
|
|
126
|
+
* `Ctrl + U` / `Ctrl + J`: Scroll output up / down (`Alt + U` / `Alt + J` for faster scroll)
|
|
127
|
+
* `Ctrl + K`: Jump to bottom of output
|
|
128
|
+
* `Ctrl + V`: Paste clipboard text
|
|
129
|
+
* `Ctrl + Q`: Quit `pcat`
|
|
130
|
+
|
|
131
|
+
Inside the built-in editor (`edit <file>` or `vim <file>`):
|
|
132
|
+
|
|
133
|
+
* `Ctrl + I`: Toggle between `EDIT` and `CMD` mode
|
|
134
|
+
* In `CMD` mode: `s` (save), `sq` (save & quit), `q` (quit without saving), `py` / `python` / `runbypython` / `rbp` (run buffer with Python)
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
<ElicitationsGroup message="Next steps for your release:">
|
|
139
|
+
<Elicitation label="Prepare a clean pyproject.toml" query="Create a complete pyproject.toml for projectcats-cli with metadata, description, dependencies, and the pcat entry point."/>
|
|
140
|
+
<Elicitation label="Add a LICENSE file" query="Write a clean MIT LICENSE file in English for my projectcats-cli repository."/>
|
|
141
|
+
</ElicitationsGroup>
|
|
142
|
+
|
|
143
|
+
```
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "projectcats-cli"
|
|
7
|
-
version = "1.0.
|
|
8
|
-
description = "ProjectCats packaging, isolated boxes, plugins, and multitasking terminal."
|
|
7
|
+
version = "1.0.3"
|
|
8
|
+
description = "ProjectCats CLI with .pcat packaging, isolated boxes, plugins, and multitasking terminal."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
dependencies = [
|
projectcats_cli-1.0.2/PKG-INFO
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: projectcats-cli
|
|
3
|
-
Version: 1.0.2
|
|
4
|
-
Summary: ProjectCats packaging, isolated boxes, plugins, and multitasking terminal.
|
|
5
|
-
Requires-Python: >=3.10
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Requires-Dist: prompt-toolkit
|
|
9
|
-
Dynamic: license-file
|
|
10
|
-
|
|
11
|
-
# ProjectCat
|
projectcats_cli-1.0.2/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# ProjectCat
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: projectcats-cli
|
|
3
|
-
Version: 1.0.2
|
|
4
|
-
Summary: ProjectCats packaging, isolated boxes, plugins, and multitasking terminal.
|
|
5
|
-
Requires-Python: >=3.10
|
|
6
|
-
Description-Content-Type: text/markdown
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Requires-Dist: prompt-toolkit
|
|
9
|
-
Dynamic: license-file
|
|
10
|
-
|
|
11
|
-
# ProjectCat
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{projectcats_cli-1.0.2 → projectcats_cli-1.0.3}/projectcats_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|