A lightweight manager for PEP 723 Python scripts - install, run, update, and manage standalone scripts with isolated environments.
Project description
scriptx
A lightweight manager for PEP 723 Python scripts — install, run, update, and manage standalone scripts with isolated environments.
Table of Contents
Installation
pipx install scriptx
uv tool install scriptx
Usage
[flavio@mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ scriptx --help
usage: scriptx [-h] [-v] [-V] {install,reinstall,upgrade,uninstall,list,run,edit,registry-add,registry-remove,registry-list,registry-update} ...
ScriptX v2 - A tool management system.
positional arguments:
{install,reinstall,upgrade,uninstall,list,run,edit,registry-add,registry-remove,registry-list,registry-update}
install Install a tool from a URL or file path.
reinstall Reinstall a previously installed tool.
upgrade Upgrade an installed tool to the latest version.
uninstall Uninstall a previously installed tool.
list List all installed tools.
run Run a specified tool with optional arguments.
edit Open script in editor.
registry-add Add a new registry.
registry-remove Remove a specified registry.
registry-list List all registries.
registry-update Update specified registries or all if none specified.
optional arguments:
-h, --help show this help message and exit
-v, --verbose Increase verbosity level.
-V, --version show program's version number and exit
Environment variables:
SCRIPTX_HOME - Directory where ScriptX stores its data (default: ~/opt/scriptx)
SCRIPTX_BIN - Directory where ScriptX stores executable tools (default: ~/opt/scriptx/bin)
Add the following to your shell profile to include ScriptX tools in your PATH:
export PATH="${HOME}/opt/scriptx/bin:${PATH}"
Install a tool
Tool will:
- Download the publicly avaiable url(in this case a github page url) or a file on disk.
- Create a virtualenv for the script based on the inline script metadata.
- It will copy the script into the ~/opt/scriptx/bin directory.
- Update the
#!shebangof the script to allow for faster execution. - NOTE: You can pass in a alternative name for the script, by default it will use the basename of the SRC.
[flavio@mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ scriptx install --help
usage: scriptx install [-h] [--name NAME] [--link {symlink,copy,hardlink}] url_or_path
Install a tool from a URL or file path.
positional arguments:
url_or_path URL or file path of the tool to install.
optional arguments:
-h, --help show this help message and exit
--name NAME Optional name for the tool. If not provided, it will be derived from the URL or file path.
--link {symlink,copy,hardlink}
Method to link the tool in the inventory when is a local file (default: copy).
Example:
scriptx install ./file.py
scriptx install https://example.com/tools/mytool.py
scriptx install https://example.com/tools/mytool.py --name toolname
[flavio@mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ scriptx install https://flavioamurriocs.github.io/uv-to-pipfile/src/uv_to_pipfile/uv_to_pipfile.py
Tool 'uv_to_pipfile' installed successfully in /Users/flavio/opt/scriptx/bin/uv_to_pipfile.
Warning: /Users/flavio/opt/scriptx/bin is not in your PATH. ie (export PATH="${HOME}/opt/scriptx/bin:${PATH}")
[flavio@mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ head -n2 /Users/flavio/opt/scriptx/bin/uv_to_pipfile
#!/Users/flavio/opt/scriptx/installed_tools/uv_to_pipfile/venv/bin/python
# /// script
Display installed scripts
[flavio@mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ scriptx list
{
"uv_to_pipfile": {
"source": "https://flavioamurriocs.github.io/uv-to-pipfile/src/uv_to_pipfile/uv_to_pipfile.py",
"venv": "/Users/flavio/opt/scriptx/installed_tools/uv_to_pipfile/venv",
"path": "/Users/flavio/opt/scriptx/installed_tools/uv_to_pipfile/script.py"
}
}
Execute the script via the tool
[flavio@mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ scriptx run uv_to_pipfile --help
usage: script.py [-h] [--uv-lock UV_LOCK] [--pipfile-lock PIPFILE_LOCK]
Convert uv.lock to Pipfile.lock
optional arguments:
-h, --help show this help message and exit
--uv-lock UV_LOCK Path to the uv.lock file (default: ./uv.lock)
--pipfile-lock PIPFILE_LOCK
Path to the Pipfile.lock file (default: ./Pipfile.lock)
Execute script directly
NOTE: You must update your PATH
[flavio@Mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ export PATH="${HOME}/opt/scriptx/bin:${PATH}"
[flavio@Mac ~/dev/github.com/FlavioAmurrioCS/scriptx]
$ uv_to_pipfile --help
usage: uv_to_pipfile [-h] [--uv-lock UV_LOCK] [--pipfile-lock PIPFILE_LOCK]
Convert uv.lock to Pipfile.lock
options:
-h, --help show this help message and exit
--uv-lock UV_LOCK Path to the uv.lock file (default: ./uv.lock)
--pipfile-lock PIPFILE_LOCK
Path to the Pipfile.lock file (default: ./Pipfile.lock)
License
scriptx is distributed under the terms of the MIT license.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scriptx-0.1.6.tar.gz.
File metadata
- Download URL: scriptx-0.1.6.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb43a320a1727531d56806a28faedc0a271d1b85274cc235da1eb4bbfb7d573b
|
|
| MD5 |
c488287cc1ecc85b5c7dd3a642d2ea40
|
|
| BLAKE2b-256 |
3b993f773c992f61f1cf5f50834697e8f8659b1de91dc2a125bc8ce7e4074e69
|
Provenance
The following attestation bundles were made for scriptx-0.1.6.tar.gz:
Publisher:
main.yaml on FlavioAmurrioCS/scriptx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scriptx-0.1.6.tar.gz -
Subject digest:
eb43a320a1727531d56806a28faedc0a271d1b85274cc235da1eb4bbfb7d573b - Sigstore transparency entry: 760806645
- Sigstore integration time:
-
Permalink:
FlavioAmurrioCS/scriptx@18c483996a6b8dcafec6af95c408f7d2a09be7cb -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/FlavioAmurrioCS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@18c483996a6b8dcafec6af95c408f7d2a09be7cb -
Trigger Event:
push
-
Statement type:
File details
Details for the file scriptx-0.1.6-py3-none-any.whl.
File metadata
- Download URL: scriptx-0.1.6-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfaf74f69a0fdedd81749c86341ea4469c5ba935470ab6fd75ca7b9fa21f5eae
|
|
| MD5 |
3cf113f2260f1b655f9f10a2a480b5f3
|
|
| BLAKE2b-256 |
0adf61837bc435c3327328aeea9dcad9600505a5af7208132b9ff4463a632bfa
|
Provenance
The following attestation bundles were made for scriptx-0.1.6-py3-none-any.whl:
Publisher:
main.yaml on FlavioAmurrioCS/scriptx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scriptx-0.1.6-py3-none-any.whl -
Subject digest:
bfaf74f69a0fdedd81749c86341ea4469c5ba935470ab6fd75ca7b9fa21f5eae - Sigstore transparency entry: 760806647
- Sigstore integration time:
-
Permalink:
FlavioAmurrioCS/scriptx@18c483996a6b8dcafec6af95c408f7d2a09be7cb -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/FlavioAmurrioCS
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
main.yaml@18c483996a6b8dcafec6af95c408f7d2a09be7cb -
Trigger Event:
push
-
Statement type: