shellScripts / s (0.26.10)
Execute useful shell scripts via an uvx-compatible CLI interface.
shellscripts is a Linux-first command collection for project automation, AI CLI launchers,
PDF/DICOM utilities, development helpers, and editor integrations, exposed through a single command.
Feature Highlights | Quick Start | Requirements | User's Guide | Acknowledgments
🚧 DRAFT: Proof-of-Concept (PoC) Version 📝 - Work in Progress 🏗️ 🚧
⚠️ IMPORTANT NOTICE: Created with PI-useReq/pi-usereq 🤖✨ ⚠️
Feature Highlights
- Single CLI entrypoint with command dispatch and grouped built-in help (
shellscriptsand aliass). - YOLO-mode launchers for AI CLIs (
agy,claude,codex,copilot,opencode) and project-root IDE launchers (vscode,vsinsider). - PDF workflow commands for crop, merge, split, TOC cleanup, and tiling.
- DICOM helpers (
dicom2jpg,dicomviewer) and video transcoders (video2h264,video2h265). - Project maintenance and automation commands (
clean,venv,tests,doxygen,ubuntu-dark-theme). - Desktop and network helpers (
meld-highlight-theme,chrome-debug,net) and npm bootstrap automation (npm-bootstrap-trust). - Startup update notification with rate-limited checks against the PyPI registry.
Quick Start
Bring the CLI up in three steps: install, configure (optional), execute.
Install
Install from PyPI (primary distribution channel) with Astral uv:
uv tool install shellscripts
Later upgrades are managed by the CLI itself with s --upgrade (see the User's Guide).
Configure (Optional)
The CLI works out of the box with built-in defaults. To generate the default configuration file:
s --write-config
The configuration is stored in ~/.config/shellScripts/config.json.
Execute
s <command> [args...]
- Run
swithout arguments to print the grouped global help. - Run without installing:
uvx shellscripts <command> [args...] - Run from a local clone:
./scripts/s.sh <command> [args...]
Requirements
- Python
>=3.11. - Astral
uvis the supported install and launcher tool (uv tool install,uvx,uv run); the package also runs aspython -m shell_scripts. - Git is required for project-root commands (
clean,venv,tests,doxygen,vscode,vsinsider). - AI CLI launchers (
agy,claude,codex,copilot,opencode) execute in the current directory without Git root validation. - Command-specific external tools are required only for related commands:
doxygen(plus optionalmakeandpdflatex) fordoxygen.gs,pdfinfo,qpdf,pdftk,plakativfor PDF commands.ffmpegforvideo2h264andvideo2h265.google-chromeforchrome-debug.nmcli,resolvectl,ip, andjournalctlfornet.node(>= 22.14.0) andnpm(>= 11.15.0) fornpm-bootstrap-trust.- Java runtime + PixelMed jars (+
java-wrappers) for DICOM commands.
User's Guide
Global Syntax
shellscripts [command] [options]
# or
s [command] [options]
- Invoking the CLI without arguments prints the grouped global help and exits with code
0. - An unknown command prints an error plus the global help and exits with code
1.
Management Flags
Built-in management flags:
--help: print the full help screen, or one command help withs --help <command>/s <command> --help.--version/--ver: print the installed version plus the latest versions available on PyPI and GitHub.--upgrade: run the configured upgrade command automatically on Linux (installs the latest PyPI release by default), otherwise print the manual command.--upgrade --force: force download and complete reinstallation by appending--force --reinstall --refreshto the--upgradeor--upgrade --dev/--upgrade --developcommand.--upgrade --dev/--upgrade --develop: upgrade from the latest tagged GitHub release instead of PyPI, regardless of its source branch.--uninstall: run configured uninstall command automatically on Linux, otherwise print the manual command.--write-config: write the default runtime configuration file.--print-raw: print the on-disk configuration file content verbatim.--print [Sub:Path]: print the effective configuration, or the addressed subtree, as an options tree.--info [Sub:Path]: print the configurable parameters, or the addressed subtree, with types, descriptions, and copy-paste command lines.--get <Path>: read one configuration value.--set <Path> <Value>: set one configuration value or collection element.--unset <Path>: remove one configuration override and reactivate the default.
Install from GitHub (Alternative)
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:
uv tool install shellscripts --force --from git+https://github.com/Ogekuri/shellScripts.git@vX.Y.Z
Intermediate and test releases are available at: https://github.com/Ogekuri/shellScripts/releases.
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:
s --upgrade --dev
# or
s --upgrade --develop
Add --force to force a complete re-download and reinstallation of the tagged release:
s --upgrade --develop --force
Run Without Installing (uvx)
uvx shellscripts <command> [args...]
Run From a Local Clone
./scripts/s.sh <command> [args...]
or
uv run --project . python -m shell_scripts <command> [args...]
Runtime Configuration
Generate a default config file:
s --write-config
Default location:
~/.config/shellScripts/config.json
Top-level configuration keys:
managementupgrade: command string executed by--upgrade(PyPI install by default).upgrade_develop: command template executed by--upgrade --dev; the{tag}placeholder is replaced with the latest GitHub release tag.uninstall: command string executed by--uninstall.
dispatchdiff,edit,view: each command supportscategoriesandfallbackcommand vectors.
Configuration CLI
The configuration management flags operate on the effective configuration (hardcoded defaults merged with the file) and write only overrides:
- Paths use
:as hierarchical separator (for examplemanagement:upgrade). --get,--set, and--unsetsupport collection tokens:<Path>:<Idx>: 0-based array row.<Path>:<Idx>:<Field>: one field of an object row.<Path>:<Key>: dynamic map key.--setonly:<Path>:append/<Path>:+(append),<Path>:insert:<Idx>(insert), JSON arrays/maps/objects (full overwrite).
--setaccepts$NAMEvalue tokens and acquires the value from environment variableNAME.- Array values are validated against the schema; row deletion re-indexes the array contiguously.
- Every configuration command bootstraps a missing
~/.config/shellScripts/config.jsonwith system defaults before running. - Persistence is atomic (same-directory temporary file followed by rename) and keeps unrelated keys.
- Values are always displayed in plain text, including credentials and API keys.
Examples:
s --get management:upgrade
s --set management:upgrade "uv tool install shellscripts"
s --set dispatch:diff:fallback:+ "meld"
s --set dispatch:diff:fallback:insert:0 "meld"
s --set dispatch:diff:fallback "$DIFF_FALLBACK"
s --unset management:upgrade
s --print dispatch:diff
s --info dispatch
--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.
Command List
| Command | Purpose |
|---|---|
agy |
Launch Antigravity CLI in YOLO mode (agy --dangerously-skip-permissions). |
claude |
Launch Claude CLI in YOLO mode (claude --dangerously-skip-permissions). |
codex |
Launch Codex CLI in YOLO mode (codex --yolo). |
copilot |
Launch Copilot CLI in YOLO mode (copilot --yolo; alternative --allow-all documented in help). |
opencode |
Launch OpenCode CLI in auto-approval mode (opencode --auto). |
clean |
Find and delete cache directories under the project root (or a passed directory). |
venv |
Recreate .venv and install requirements.txt if present. |
tests |
Ensure/create .venv and run pytest (arguments passed through). |
doxygen |
Generate HTML/XML/Markdown docs and optional PDF output. |
vscode |
Open project in VS Code. |
vsinsider |
Open project in VS Code Insiders. |
diff |
Dispatch file differ by MIME/category. |
edit |
Dispatch file editor by MIME/category. |
view |
Dispatch file viewer by MIME/category. |
pdf-crop |
Crop PDF pages with auto or manual bounding boxes. |
pdf-merge |
Merge multiple PDFs preserving/rebuilding bookmarks. |
pdf-split-by-format |
Split PDFs into parts when page format changes. |
pdf-split-by-toc |
Split PDF into chapter files from level-1 TOC entries. |
pdf-tiler-090 |
Tile PDF to A4 at 90% scale. |
pdf-tiler-100 |
Tile PDF to A4 at original A1 size. |
pdf-toc-clean |
Remove out-of-range TOC entries and write cleaned outputs. |
dicom2jpg |
Convert DICOM images to JPEG (PixelMed). |
dicomviewer |
Launch PixelMed DICOM viewer. |
video2h264 |
Convert one video to H.264 MP4 via ffmpeg. |
video2h265 |
Convert one video to H.265 MP4 via ffmpeg. |
ubuntu-dark-theme |
Apply GNOME and Qt dark-theme settings. |
meld-highlight-theme |
Create <id>-highlight Meld/GtkSourceView color schemes with red inline highlighting. |
chrome-debug |
Launch Google Chrome detached with remote debugging on port 9222. |
net |
Print network status (status) and activate/deactivate VLANs (vlan <id> up|down). |
npm-bootstrap-trust |
Publish a 0.0.0 placeholder with dist-tag bootstrap and register the GitHub Trusted Publisher. |
Selected Usage Examples
Launch Antigravity CLI in YOLO mode (each YOLO command help documents every registered YOLO CLI option in alphabetical order):
s agy
Clean caches without interactive confirmation:
s clean --yes
Crop PDF with automatic bbox over a page window:
s pdf-crop --in input.pdf --out cropped.pdf --analyze-pages 1-10 --pages 1-
Merge PDFs and choose output file:
s pdf-merge -o merged.pdf a.pdf b.pdf c.pdf
Split PDF by TOC chapters:
s pdf-split-by-toc document.pdf
Convert a video to H.264 MP4:
s video2h264 input.mov
Run tests and pass pytest options:
s tests -q -k "pdf"
Open current git project in VS Code / Insiders:
s vscode
s vsinsider
Documentation
Update Checks and Cooldown
- At startup the CLI checks PyPI for a newer release and prints a bright-green
Update Availablenotice when one exists. - 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. --version/--veralways force a fresh check and print the installed version plus theLatest @ PyPIandLatest @ GitHublines.- A failed remote lookup is reported per source as
Latest @ <source>: unknown (<reason>)without interrupting the remaining sources or the command.
MIME-Based File Dispatch (diff / edit / view)
diff,edit, andviewclassify 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 code2.- Categories and fallback commands are configurable through the
dispatch.diff,dispatch.edit, anddispatch.viewruntime keys (see the Configuration CLI).
Local Build and Release
Build validated sdist and wheel archives (requires Python >=3.11 and uv or build):
./scripts/build.sh
- Removes every existing archive in the output directory (
*.tar.gz,*.whl,*.zip,*.egg) of any version before building and preserves non-generated entries. - Writes to
dist/by default; setBUILD_DIST_DIRto use another output directory. - Resolves the reproducible timestamp from a valid
SOURCE_DATE_EPOCHenvironment value or from the tracked.build-epochfile; a missing or malformed epoch aborts the build. - Validates archive readability and members: the sdist contains
pyproject.tomlandsrc/shell_scripts/__init__.pyand excludestests/,src/shellscripts.egg-info/,setup.cfg, andMANIFEST.in; the wheel contains the license and theshellscripts/sentry points. - Removes intermediate build trees, generated metadata, temporary files, and
srcbytecode caches before printingPASS/FAILphase evidence and aBUILD SUMMARYlisting every deliverable.
Run the full pre-release verification before an official release:
./scripts/pre-release-check.sh
- Runs project-structure, executable-bit, toolchain, Bash/Python syntax, optional quality (
SKIPwhen not configured), pytest, delegated build, artifact-validation, and repository-integrity checks in order. - Builds inside a
mktemp -ddirectory outside the working tree throughBUILD_DIST_DIRand never reads, verifies, cleans, or modifiesdist/entries. - Removes generated artifacts and the temporary build directory on success, failure, and signal termination, then compares the repository state with the pre-run baseline.
- Stops at the first failed mandatory check with exit code
1and printsPASS/FAIL/SKIPevidence plus a final summary.
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.
Changelog
See CHANGELOG.md for the release history.
License
This project is licensed under the GNU General Public License v3.0 only (GPL-3.0-only).
See the LICENSE file for the full license text.
Acknowledgments
- Astral
uv— the toolchain behind the install, upgrade, and launcher workflow. - PixelMed — the DICOM toolkit powering
dicomvieweranddicom2jpg. - Meld and GTK/GtkSourceView — the style-scheme model reused by
meld-highlight-theme. - The external command-line tools wrapped by the commands: qpdf, pdftk, Ghostscript, Poppler,
plakativ, Doxygen, FFmpeg.
Metadata
Release files for shellscripts 0.26.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shellscripts-0.26.10.tar.gz | 98.1 kB | With provenance | Details for shellscripts-0.26.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shellscripts-0.26.10-py3-none-any.whl | Python 3 | none | any | Details for shellscripts-0.26.10-py3-none-any.whl |
Total release size: 226.2 kB
Release files / shellscripts-0.26.10.tar.gz
| Download URL | shellscripts-0.26.10.tar.gz |
|---|---|
| Size | 98.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f05c182597dcf2b519e6e9d32e0f55c4040887b64f0fcbad94e2a7b30ae46fe7
|
|
BLAKE2b-256 checksum How to use checksums |
5f0ed19ed04052591627e1a6024dd62adf779a33404787509d0bd0cce9b74802
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / shellscripts-0.26.10-py3-none-any.whl
| Download URL | shellscripts-0.26.10-py3-none-any.whl |
|---|---|
| Size | 128.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7f235174e55eea953b1a7c0b70c2d723d22aa141a01682f9c1eef8e4c4b35d2
|
|
BLAKE2b-256 checksum How to use checksums |
36c4bb50ec09ec2540a97ad75b15eeaa5cb982598210787fe69a7cf7eb46ce3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for shellscripts 0.26.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for shellscripts-0.26.10.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.