daedalus 0.1.0: scriptman spec update ported - categories, new listing format with colors, run_python_script child entry, daedalus_logging, daedalus.<folder> namespace imports; SPEC rewritten with stable item numbers

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
nvaldez
2026-11-18 21:13:57 +01:00
parent 792beca2c5
commit b71a513c36
19 changed files with 1606 additions and 202 deletions
+32 -7
View File
@@ -88,16 +88,36 @@ pipx uninstall daedalus
## Usage
```bash
daedalus --help # usage
daedalus --list # list the available scripts
daedalus NAME [args...] # run a script; every argument after NAME goes to it
daedalus --path NAME # print where the script file is
daedalus --version # print the installed version
daedalus --help # usage
daedalus [--list] # list the available scripts
daedalus <name> [args...] # run a script; every argument after the name goes to it
daedalus <category> [category...] # list scripts that have every category
daedalus <category> <name> [args...] # run when the script has every category
daedalus --path <name> # print where the script file is
daedalus --version # print the installed version
```
- `daedalus NAME --help` shows the help of the script, not of daedalus.
- The exit code is the script's exit code. daedalus's own errors, such as
an unknown name, exit with 2 and suggest close matches.
- Listings print `Daedalus Version:`, a table of `script`, `type`, and
`categories`, and the wrapped description under each row. Colors follow
`NO_COLOR` / `FORCE_COLOR` and the terminal.
Environment variables:
| Variable | Effect |
| --- | --- |
| `DAEDALUS_PYTHON` | Interpreter for `.py` scripts (default: the interpreter running daedalus) |
| `DAEDALUS_BASH` | Override the bash used for `.sh` scripts |
| `DAEDALUS_LOGLEVEL` | Console log level for Python scripts (default `INFO`) |
| `DAEDALUS_NO_LOGGING` | Non-empty: Python scripts start without the daedalus logging setup |
| `NO_COLOR` / `FORCE_COLOR` | Colors on listings and console logs |
Python scripts run through `daedalus/run_python_script.py`: they get
`REPO_ROOT` on `PYTHONPATH` (so `import daedalus.<folder>` works for
shared code), file and console logging to `~/.daedalus/debug.log`, and
their `sys.argv` and exit code passed through unchanged.
## Add a script
@@ -108,11 +128,16 @@ an unknown name, exit with 2 and suggest close matches.
| bash | `bash/<name>.sh` |
| PowerShell | `powershell/<name>.ps1` |
| Batch | `batch/<name>.bat` (CRLF line endings, Windows only) |
- Register it in `SCRIPTS` in `daedalus/registry.py`.
- Register it in `SCRIPTS` in `daedalus/registry.py` (set `categories`
when it belongs to a group such as `media` or `linux`; the default is
`general`).
- Add a row to the [Available scripts](./README.md#available-scripts)
table in `README.md`. A test fails when a registered script is missing
from that table.
- Add tests under `python/tests/` or `bash/tests/`.
- Add tests under `python/tests/` or `bash/tests/`. Python tests import
the script with `from daedalus.<name> import <name>`; a new
`python/src/<folder>/` also needs a matching `daedalus.<folder>`
entry in `pyproject.toml` (SPEC section 9).
- Bump `version` in `pyproject.toml`, then run `daedalus_pipx_install`
(or `pipx install --force` from the Git URL) so pipx picks up the change.
- Run `python autotest.py`.