shellscripts 0.26.2__tar.gz → 0.26.10__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.
- shellscripts-0.26.10/PKG-INFO +400 -0
- shellscripts-0.26.10/README.md +379 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/pyproject.toml +1 -1
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/__init__.py +1 -1
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/__init__.py +9 -4
- shellscripts-0.26.10/src/shell_scripts/commands/cargo_bootstrap_trust.py +702 -0
- shellscripts-0.26.10/src/shell_scripts/commands/chrome_debug.py +87 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/codex.py +1 -1
- shellscripts-0.26.10/src/shell_scripts/commands/meld_highlight_theme.py +389 -0
- shellscripts-0.26.10/src/shell_scripts/commands/net_cmd.py +278 -0
- shellscripts-0.26.10/src/shell_scripts/commands/npm_bootstrap_trust.py +378 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/vscode_cmd.py +8 -11
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/vsinsider_cmd.py +8 -11
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/config.py +1 -66
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/config_cli.py +7 -34
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/core.py +27 -8
- shellscripts-0.26.2/PKG-INFO +0 -300
- shellscripts-0.26.2/README.md +0 -279
- shellscripts-0.26.2/src/shell_scripts/commands/req_cmd.py +0 -362
- {shellscripts-0.26.2 → shellscripts-0.26.10}/LICENSE +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/__main__.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/_dc_common.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/_yolo_common.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/agy.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/claude.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/clean.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/copilot.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/dicom2jpg.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/dicomviewer.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/diff_cmd.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/doxygen_cmd.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/edit_cmd.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/opencode.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/pdf_crop.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/pdf_merge.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/pdf_split_by_format.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/pdf_split_by_toc.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/pdf_tiler_090.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/pdf_tiler_100.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/pdf_toc_clean.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/tests_cmd.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/ubuntu_dark_theme.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/venv_cmd.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/video2h264.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/video2h265.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/commands/view_cmd.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/utils.py +0 -0
- {shellscripts-0.26.2 → shellscripts-0.26.10}/src/shell_scripts/version_check.py +0 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: shellscripts
|
|
3
|
+
Version: 0.26.10
|
|
4
|
+
Summary: Execute useful shell scripts via an uvx-compatible CLI interface.
|
|
5
|
+
Author: Francesco Rolando
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://github.com/Ogekuri/shellScripts
|
|
8
|
+
Project-URL: Repository, https://github.com/Ogekuri/shellScripts
|
|
9
|
+
Keywords: shell,scripts,uv,astral,uvx,cli
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Topic :: Software Development
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
22
|
+
> [!CAUTION]
|
|
23
|
+
> ### 🚨 STRICTLY EXPERIMENTAL — PROOF OF CONCEPT (PRE-ALPHA)
|
|
24
|
+
>
|
|
25
|
+
>    
|
|
26
|
+
>
|
|
27
|
+
> **PLEASE READ CAREFULLY BEFORE USING THIS SOFTWARE:**
|
|
28
|
+
>
|
|
29
|
+
> * **Very Early Stage:** This project is currently a raw **Proof of Concept (PoC)** in a **pre-alpha** state. It is nowhere near production-ready and may contain severe bugs, breaking changes, or incomplete logic.
|
|
30
|
+
> * **Personal Use Only:** This repository is developed, maintained, and shared strictly for **personal use**.
|
|
31
|
+
> * **No Support or Feature Requests:** Please **do not** open issues, bug reports, or feature requests. They will not be addressed or accepted at this stage of development.
|
|
32
|
+
> * **No Warranty:** This software is provided **"AS IS"**, without warranty of any kind, express or implied. You may use it strictly for **testing and evaluation purposes** at your own sole risk.
|
|
33
|
+
|
|
34
|
+
# shellScripts / s (0.26.10)
|
|
35
|
+
|
|
36
|
+
<p align="center">
|
|
37
|
+
<img src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+">
|
|
38
|
+
<img src="https://img.shields.io/badge/license-GPL--3.0-491?style=flat-square" alt="License: GPL-3.0">
|
|
39
|
+
<img src="https://img.shields.io/badge/platform-Linux-6A7EC2?style=flat-square&logo=terminal&logoColor=white" alt="Platforms">
|
|
40
|
+
<img src="https://img.shields.io/badge/docs-live-b31b1b" alt="Docs">
|
|
41
|
+
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv">
|
|
42
|
+
</p>
|
|
43
|
+
<p align="center">
|
|
44
|
+
<strong>Execute useful shell scripts via an uvx-compatible CLI interface.</strong><br>
|
|
45
|
+
<code>shellscripts</code> is a Linux-first command collection for project automation, AI CLI launchers,
|
|
46
|
+
PDF/DICOM utilities, development helpers, and editor integrations, exposed through a single command.
|
|
47
|
+
<br>
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
<p align="center">
|
|
52
|
+
<a href="#feature-highlights">Feature Highlights</a> |
|
|
53
|
+
<a href="#quick-start">Quick Start</a> |
|
|
54
|
+
<a href="#requirements">Requirements</a> |
|
|
55
|
+
<a href="#users-guide">User's Guide</a> |
|
|
56
|
+
<a href="#acknowledgments">Acknowledgments</a>
|
|
57
|
+
</p>
|
|
58
|
+
|
|
59
|
+
<p align="center">
|
|
60
|
+
<br>
|
|
61
|
+
🚧 <strong>DRAFT:</strong> Proof-of-Concept (PoC) Version 📝 - Work in Progress 🏗️ 🚧<br>
|
|
62
|
+
⚠️ <strong>IMPORTANT NOTICE</strong>: Created with <a href="https://www.npmjs.com/package/pi-usereq"><strong>PI-useReq/pi-usereq</strong></a> 🤖✨ ⚠️<br>
|
|
63
|
+
<br>
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# Feature Highlights
|
|
68
|
+
|
|
69
|
+
- Single CLI entrypoint with command dispatch and grouped built-in help (`shellscripts` and alias `s`).
|
|
70
|
+
- YOLO-mode launchers for AI CLIs (`agy`, `claude`, `codex`, `copilot`, `opencode`) and project-root IDE launchers (`vscode`, `vsinsider`).
|
|
71
|
+
- PDF workflow commands for crop, merge, split, TOC cleanup, and tiling.
|
|
72
|
+
- DICOM helpers (`dicom2jpg`, `dicomviewer`) and video transcoders (`video2h264`, `video2h265`).
|
|
73
|
+
- Project maintenance and automation commands (`clean`, `venv`, `tests`, `doxygen`, `ubuntu-dark-theme`).
|
|
74
|
+
- Desktop and network helpers (`meld-highlight-theme`, `chrome-debug`, `net`) and npm bootstrap automation (`npm-bootstrap-trust`).
|
|
75
|
+
- Startup update notification with rate-limited checks against the PyPI registry.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# Quick Start
|
|
79
|
+
|
|
80
|
+
Bring the CLI up in three steps: install, configure (optional), execute.
|
|
81
|
+
|
|
82
|
+
### Install
|
|
83
|
+
|
|
84
|
+
Install from PyPI (primary distribution channel) with [Astral `uv`](https://docs.astral.sh/uv/getting-started/installation/):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv tool install shellscripts
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Later upgrades are managed by the CLI itself with `s --upgrade` (see the User's Guide).
|
|
91
|
+
|
|
92
|
+
### Configure (Optional)
|
|
93
|
+
|
|
94
|
+
The CLI works out of the box with built-in defaults. To generate the default configuration file:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
s --write-config
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The configuration is stored in `~/.config/shellScripts/config.json`.
|
|
101
|
+
|
|
102
|
+
### Execute
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
s <command> [args...]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- Run `s` without arguments to print the grouped global help.
|
|
109
|
+
- Run without installing: `uvx shellscripts <command> [args...]`
|
|
110
|
+
- Run from a local clone: `./scripts/s.sh <command> [args...]`
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
# Requirements
|
|
114
|
+
|
|
115
|
+
- Python `>=3.11`.
|
|
116
|
+
- Astral `uv` is the supported install and launcher tool (`uv tool install`, `uvx`, `uv run`); the package also runs as `python -m shell_scripts`.
|
|
117
|
+
- Git is required for project-root commands (`clean`, `venv`, `tests`, `doxygen`, `vscode`, `vsinsider`).
|
|
118
|
+
- AI CLI launchers (`agy`, `claude`, `codex`, `copilot`, `opencode`) execute in the current directory without Git root validation.
|
|
119
|
+
- Command-specific external tools are required only for related commands:
|
|
120
|
+
- `doxygen` (plus optional `make` and `pdflatex`) for `doxygen`.
|
|
121
|
+
- `gs`, `pdfinfo`, `qpdf`, `pdftk`, `plakativ` for PDF commands.
|
|
122
|
+
- `ffmpeg` for `video2h264` and `video2h265`.
|
|
123
|
+
- `google-chrome` for `chrome-debug`.
|
|
124
|
+
- `nmcli`, `resolvectl`, `ip`, and `journalctl` for `net`.
|
|
125
|
+
- `node` (>= 22.14.0) and `npm` (>= 11.15.0) for `npm-bootstrap-trust`.
|
|
126
|
+
- Java runtime + PixelMed jars (+ `java-wrappers`) for DICOM commands.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
# User's Guide
|
|
130
|
+
|
|
131
|
+
## Global Syntax
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
shellscripts [command] [options]
|
|
135
|
+
# or
|
|
136
|
+
s [command] [options]
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
- Invoking the CLI without arguments prints the grouped global help and exits with code `0`.
|
|
140
|
+
- An unknown command prints an error plus the global help and exits with code `1`.
|
|
141
|
+
|
|
142
|
+
## Management Flags
|
|
143
|
+
|
|
144
|
+
Built-in management flags:
|
|
145
|
+
|
|
146
|
+
- `--help` : print the full help screen, or one command help with `s --help <command>` / `s <command> --help`.
|
|
147
|
+
- `--version` / `--ver` : print the installed version plus the latest versions available on PyPI and GitHub.
|
|
148
|
+
- `--upgrade` : run the configured upgrade command automatically on Linux (installs the latest PyPI release by default), otherwise print the manual command.
|
|
149
|
+
- `--upgrade --force` : force download and complete reinstallation by appending `--force --reinstall --refresh` to the `--upgrade` or `--upgrade --dev`/`--upgrade --develop` command.
|
|
150
|
+
- `--upgrade --dev` / `--upgrade --develop` : upgrade from the latest tagged GitHub release instead of PyPI, regardless of its source branch.
|
|
151
|
+
- `--uninstall` : run configured uninstall command automatically on Linux, otherwise print the manual command.
|
|
152
|
+
- `--write-config` : write the default runtime configuration file.
|
|
153
|
+
- `--print-raw` : print the on-disk configuration file content verbatim.
|
|
154
|
+
- `--print [Sub:Path]` : print the effective configuration, or the addressed subtree, as an options tree.
|
|
155
|
+
- `--info [Sub:Path]` : print the configurable parameters, or the addressed subtree, with types, descriptions, and copy-paste command lines.
|
|
156
|
+
- `--get <Path>` : read one configuration value.
|
|
157
|
+
- `--set <Path> <Value>` : set one configuration value or collection element.
|
|
158
|
+
- `--unset <Path>` : remove one configuration override and reactivate the default.
|
|
159
|
+
|
|
160
|
+
## Install from GitHub (Alternative)
|
|
161
|
+
|
|
162
|
+
PyPI is the primary distribution channel. As an alternative, the package can be installed from GitHub Releases, which also hosts intermediate and test releases that are not published on PyPI:
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
uv tool install shellscripts --force --from git+https://github.com/Ogekuri/shellScripts.git@vX.Y.Z
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Intermediate and test releases are available at: [https://github.com/Ogekuri/shellScripts/releases](https://github.com/Ogekuri/shellScripts/releases).
|
|
169
|
+
|
|
170
|
+
To upgrade to the newest tagged GitHub release, regardless of the branch that carries the tag, use the `--dev` (alias `--develop`) flag together with `--upgrade`:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
s --upgrade --dev
|
|
174
|
+
# or
|
|
175
|
+
s --upgrade --develop
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Add `--force` to force a complete re-download and reinstallation of the tagged release:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
s --upgrade --develop --force
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Run Without Installing (uvx)
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
uvx shellscripts <command> [args...]
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Run From a Local Clone
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
./scripts/s.sh <command> [args...]
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
or
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
uv run --project . python -m shell_scripts <command> [args...]
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Runtime Configuration
|
|
203
|
+
|
|
204
|
+
Generate a default config file:
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
s --write-config
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Default location:
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
~/.config/shellScripts/config.json
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Top-level configuration keys:
|
|
217
|
+
|
|
218
|
+
- `management`
|
|
219
|
+
- `upgrade`: command string executed by `--upgrade` (PyPI install by default).
|
|
220
|
+
- `upgrade_develop`: command template executed by `--upgrade --dev`; the `{tag}` placeholder is replaced with the latest GitHub release tag.
|
|
221
|
+
- `uninstall`: command string executed by `--uninstall`.
|
|
222
|
+
- `dispatch`
|
|
223
|
+
- `diff`, `edit`, `view`: each command supports `categories` and `fallback` command vectors.
|
|
224
|
+
|
|
225
|
+
## Configuration CLI
|
|
226
|
+
|
|
227
|
+
The configuration management flags operate on the effective configuration (hardcoded defaults merged with the file) and write only overrides:
|
|
228
|
+
|
|
229
|
+
- Paths use `:` as hierarchical separator (for example `management:upgrade`).
|
|
230
|
+
- `--get`, `--set`, and `--unset` support collection tokens:
|
|
231
|
+
- `<Path>:<Idx>` : 0-based array row.
|
|
232
|
+
- `<Path>:<Idx>:<Field>` : one field of an object row.
|
|
233
|
+
- `<Path>:<Key>` : dynamic map key.
|
|
234
|
+
- `--set` only: `<Path>:append` / `<Path>:+` (append), `<Path>:insert:<Idx>` (insert), JSON arrays/maps/objects (full overwrite).
|
|
235
|
+
- `--set` accepts `$NAME` value tokens and acquires the value from environment variable `NAME`.
|
|
236
|
+
- Array values are validated against the schema; row deletion re-indexes the array contiguously.
|
|
237
|
+
- Every configuration command bootstraps a missing `~/.config/shellScripts/config.json` with system defaults before running.
|
|
238
|
+
- Persistence is atomic (same-directory temporary file followed by rename) and keeps unrelated keys.
|
|
239
|
+
- Values are always displayed in plain text, including credentials and API keys.
|
|
240
|
+
|
|
241
|
+
Examples:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
s --get management:upgrade
|
|
245
|
+
s --set management:upgrade "uv tool install shellscripts"
|
|
246
|
+
s --set dispatch:diff:fallback:+ "meld"
|
|
247
|
+
s --set dispatch:diff:fallback:insert:0 "meld"
|
|
248
|
+
s --set dispatch:diff:fallback "$DIFF_FALLBACK"
|
|
249
|
+
s --unset management:upgrade
|
|
250
|
+
s --print dispatch:diff
|
|
251
|
+
s --info dispatch
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
`--print` renders default/custom indicators, selection tables, and collection tables with `[Path: ...]` badges; `--info` renders each option type plus full-path `--set`/`--unset` command templates.
|
|
255
|
+
|
|
256
|
+
## Command List
|
|
257
|
+
|
|
258
|
+
| Command | Purpose |
|
|
259
|
+
|---|---|
|
|
260
|
+
| `agy` | Launch Antigravity CLI in YOLO mode (`agy --dangerously-skip-permissions`). |
|
|
261
|
+
| `claude` | Launch Claude CLI in YOLO mode (`claude --dangerously-skip-permissions`). |
|
|
262
|
+
| `codex` | Launch Codex CLI in YOLO mode (`codex --yolo`). |
|
|
263
|
+
| `copilot` | Launch Copilot CLI in YOLO mode (`copilot --yolo`; alternative `--allow-all` documented in help). |
|
|
264
|
+
| `opencode` | Launch OpenCode CLI in auto-approval mode (`opencode --auto`). |
|
|
265
|
+
| `clean` | Find and delete cache directories under the project root (or a passed directory). |
|
|
266
|
+
| `venv` | Recreate `.venv` and install `requirements.txt` if present. |
|
|
267
|
+
| `tests` | Ensure/create `.venv` and run pytest (arguments passed through). |
|
|
268
|
+
| `doxygen` | Generate HTML/XML/Markdown docs and optional PDF output. |
|
|
269
|
+
| `vscode` | Open project in VS Code. |
|
|
270
|
+
| `vsinsider` | Open project in VS Code Insiders. |
|
|
271
|
+
| `diff` | Dispatch file differ by MIME/category. |
|
|
272
|
+
| `edit` | Dispatch file editor by MIME/category. |
|
|
273
|
+
| `view` | Dispatch file viewer by MIME/category. |
|
|
274
|
+
| `pdf-crop` | Crop PDF pages with auto or manual bounding boxes. |
|
|
275
|
+
| `pdf-merge` | Merge multiple PDFs preserving/rebuilding bookmarks. |
|
|
276
|
+
| `pdf-split-by-format` | Split PDFs into parts when page format changes. |
|
|
277
|
+
| `pdf-split-by-toc` | Split PDF into chapter files from level-1 TOC entries. |
|
|
278
|
+
| `pdf-tiler-090` | Tile PDF to A4 at 90% scale. |
|
|
279
|
+
| `pdf-tiler-100` | Tile PDF to A4 at original A1 size. |
|
|
280
|
+
| `pdf-toc-clean` | Remove out-of-range TOC entries and write cleaned outputs. |
|
|
281
|
+
| `dicom2jpg` | Convert DICOM images to JPEG (PixelMed). |
|
|
282
|
+
| `dicomviewer` | Launch PixelMed DICOM viewer. |
|
|
283
|
+
| `video2h264` | Convert one video to H.264 MP4 via ffmpeg. |
|
|
284
|
+
| `video2h265` | Convert one video to H.265 MP4 via ffmpeg. |
|
|
285
|
+
| `ubuntu-dark-theme` | Apply GNOME and Qt dark-theme settings. |
|
|
286
|
+
| `meld-highlight-theme` | Create `<id>-highlight` Meld/GtkSourceView color schemes with red inline highlighting. |
|
|
287
|
+
| `chrome-debug` | Launch Google Chrome detached with remote debugging on port 9222. |
|
|
288
|
+
| `net` | Print network status (`status`) and activate/deactivate VLANs (`vlan <id> up\|down`). |
|
|
289
|
+
| `npm-bootstrap-trust` | Publish a 0.0.0 placeholder with dist-tag `bootstrap` and register the GitHub Trusted Publisher. |
|
|
290
|
+
|
|
291
|
+
## Selected Usage Examples
|
|
292
|
+
|
|
293
|
+
Launch Antigravity CLI in YOLO mode (each YOLO command help documents every registered YOLO CLI option in alphabetical order):
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
s agy
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Clean caches without interactive confirmation:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
s clean --yes
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Crop PDF with automatic bbox over a page window:
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
s pdf-crop --in input.pdf --out cropped.pdf --analyze-pages 1-10 --pages 1-
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Merge PDFs and choose output file:
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
s pdf-merge -o merged.pdf a.pdf b.pdf c.pdf
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
Split PDF by TOC chapters:
|
|
318
|
+
|
|
319
|
+
```bash
|
|
320
|
+
s pdf-split-by-toc document.pdf
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
Convert a video to H.264 MP4:
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
s video2h264 input.mov
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Run tests and pass pytest options:
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
s tests -q -k "pdf"
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Open current git project in VS Code / Insiders:
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
s vscode
|
|
339
|
+
s vsinsider
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
# Documentation
|
|
344
|
+
|
|
345
|
+
## Update Checks and Cooldown
|
|
346
|
+
|
|
347
|
+
- At startup the CLI checks PyPI for a newer release and prints a bright-green `Update Available` notice when one exists.
|
|
348
|
+
- Checks are rate-limited: one hour of cooldown after a successful check, 24 hours after a failed request; the cooldown state persists in `~/.cache/shellscripts/check_version_idle-time.json`.
|
|
349
|
+
- `--version` / `--ver` always force a fresh check and print the installed version plus the `Latest @ PyPI` and `Latest @ GitHub` lines.
|
|
350
|
+
- A failed remote lookup is reported per source as `Latest @ <source>: unknown (<reason>)` without interrupting the remaining sources or the command.
|
|
351
|
+
|
|
352
|
+
## MIME-Based File Dispatch (diff / edit / view)
|
|
353
|
+
|
|
354
|
+
- `diff`, `edit`, and `view` classify the input file by MIME type and extension (code, text, markdown, html, image, pdf) and launch the configured external command; a missing file argument prints the command-specific help and exits with code `2`.
|
|
355
|
+
- Categories and fallback commands are configurable through the `dispatch.diff`, `dispatch.edit`, and `dispatch.view` runtime keys (see the Configuration CLI).
|
|
356
|
+
|
|
357
|
+
## Local Build and Release
|
|
358
|
+
|
|
359
|
+
Build validated sdist and wheel archives (requires Python `>=3.11` and `uv` or `build`):
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
./scripts/build.sh
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
- Removes every existing archive in the output directory (`*.tar.gz`, `*.whl`, `*.zip`, `*.egg`) of any version before building and preserves non-generated entries.
|
|
366
|
+
- Writes to `dist/` by default; set `BUILD_DIST_DIR` to use another output directory.
|
|
367
|
+
- Resolves the reproducible timestamp from a valid `SOURCE_DATE_EPOCH` environment value or from the tracked `.build-epoch` file; a missing or malformed epoch aborts the build.
|
|
368
|
+
- Validates archive readability and members: the sdist contains `pyproject.toml` and `src/shell_scripts/__init__.py` and excludes `tests/`, `src/shellscripts.egg-info/`, `setup.cfg`, and `MANIFEST.in`; the wheel contains the license and the `shellscripts`/`s` entry points.
|
|
369
|
+
- Removes intermediate build trees, generated metadata, temporary files, and `src` bytecode caches before printing `PASS`/`FAIL` phase evidence and a `BUILD SUMMARY` listing every deliverable.
|
|
370
|
+
|
|
371
|
+
Run the full pre-release verification before an official release:
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
./scripts/pre-release-check.sh
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
- Runs project-structure, executable-bit, toolchain, Bash/Python syntax, optional quality (`SKIP` when not configured), pytest, delegated build, artifact-validation, and repository-integrity checks in order.
|
|
378
|
+
- Builds inside a `mktemp -d` directory outside the working tree through `BUILD_DIST_DIR` and never reads, verifies, cleans, or modifies `dist/` entries.
|
|
379
|
+
- Removes generated artifacts and the temporary build directory on success, failure, and signal termination, then compares the repository state with the pre-run baseline.
|
|
380
|
+
- Stops at the first failed mandatory check with exit code `1` and prints `PASS`/`FAIL`/`SKIP` evidence plus a final summary.
|
|
381
|
+
|
|
382
|
+
Publishing: pushing a `vX.Y.Z` tag triggers `.github/workflows/release-pypi.yml`, which publishes the `dist/` archives present in the tagged commit to the GitHub Release and, only for tags reachable from `master`, to PyPI through OIDC Trusted Publishing. The workflow never builds distributions.
|
|
383
|
+
|
|
384
|
+
## Changelog
|
|
385
|
+
|
|
386
|
+
See [CHANGELOG.md](CHANGELOG.md) for the release history.
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
# License
|
|
390
|
+
|
|
391
|
+
This project is licensed under the **GNU General Public License v3.0 only** (`GPL-3.0-only`).
|
|
392
|
+
See the [LICENSE](LICENSE) file for the full license text.
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
# Acknowledgments
|
|
396
|
+
|
|
397
|
+
- [Astral `uv`](https://docs.astral.sh/uv/) — the toolchain behind the install, upgrade, and launcher workflow.
|
|
398
|
+
- [PixelMed](http://www.dclunie.com/pixelmed/content.html) — the DICOM toolkit powering `dicomviewer` and `dicom2jpg`.
|
|
399
|
+
- [Meld](https://meldmerge.org/) and GTK/GtkSourceView — the style-scheme model reused by `meld-highlight-theme`.
|
|
400
|
+
- The external command-line tools wrapped by the commands: [qpdf](https://qpdf.github.io), [pdftk](https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/), [Ghostscript](https://www.ghostscript.com), [Poppler](https://poppler.freedesktop.org), `plakativ`, [Doxygen](https://www.doxygen.nl), [FFmpeg](https://www.ffmpeg.org).
|