qds (Quick Dirty Scripts) is a CLI tool that lets you create and run quick Python scripts from the command line with minimal setup.
Install via pip:
pip install qds-runWhen you first run any qds command, it initializes a directory in your home folder:
~/.qds/qds.tomlA TOML file containing metadata about your scripts.~/.qds/<script>.pyPython files where each script’s code lives.
You can then add, edit, list, rename, run, and delete these scripts directly from your terminal.
Initialize your workspace The first time you invoke any command,
~/.qds/qds.tomland the~/.qds/folder will be created automatically.Create a new script skeleton
qds add <script_name>
For example:
qds add base64conv
You’ll be prompted to enter a description; after confirming, a file named
~/.qds/base64conv.pyis created.Edit your script Open
~/.qds/base64conv.pyin your editor. By default, it will contain a template like this:fromqdsimportqds@qds(args=[("text", str, "Sample text to be provided")],)defrun(text: str) ->str: pass
@qdsdecoratorargs: a list of(name, type, description)tuples defining the arguments your script accepts.
runfunction- The entry point; return a string to be printed.
Run your script
You will be prompted to fill in the arguments.
qds run base64conv
Add the script:
qds add base64conv
Edit
~/.qds/base64conv.pyso thatrunlooks like this:importbase64fromqdsimportqds@qds(args=[("text", str, "Text to encode to Base64")],)defrun(text: str) ->str: encoded=base64.b64encode(text.encode("utf-8")).decode("utf-8") returnencoded
Use it:
$ qds run base64
| Command | Description |
|---|---|
qds add | Create a new script skeleton |
qds delete | Delete an existing script |
qds list | List all available scripts |
qds rename | Rename a script |
qds run | Run a script with the given arguments |
qds update | Update the description of a script |
qds view | Show the source code of a script |
qds --help | Display help message |
qds --version | Display application version |