nvaldez c210e17661 daedalus 0.3.0: argparse CLI + argcomplete shell completion, script-arg delegation
- cli.py rewritten on argparse (build_parser, REMAINDER pass-through: everything
  after the script name still belongs to the script); help/errors are
  argparse-rendered, exit code 2 kept for all daedalus errors
- completions.py (new): category-aware candidates for argcomplete - script names
  + unused labels narrowed by typed labels (daedalus test h<TAB> -> hello);
  --path completes scripts; after a completed script name daedalus offers
  nothing of its own and delegates .py scripts to their own parser via the
  run_python_script child with a rewritten COMP_LINE (daedalus hello -<TAB> ->
  hello's -h --help); SPEC 6.9 documents the autocomplete(parser) opt-in
- SPEC: item 1.5 reuse-first third-party policy, 3.8/3.10/3.11 argparse texts,
  3.13 completion catalog, 6.9 script opt-in, 9.6 argcomplete dependency
- argcomplete>=3.3 as runtime dep (guarded import: CLI runs without it);
  register-python-argcomplete line for ~/.bashrc; PYTHON_ARGCOMPLETE_OK marker
  in bin/daedalus; README/INSTALL/CHANGELOG updated; hello opts in
- tests: argparse CLI suites, completer units, end-to-end argcomplete probes
  through the bash fd-8 protocol and the delegation exec chain (autotest green,
  coverage 97%)

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-11-18 22:09:04 +01:00

daedalus (template)

Starter repository for daedalus: one CLI, many small scripts, each with tests.

daedalus <name> [args...]        # run a script
daedalus <category> [category...]  # list scripts in the categories (AND)
daedalus --list                  # list everything

Install, usage, and development · SPEC (how the repo is maintained) · CHANGELOG

Available scripts

Script Type Categories What it does
hello Python test Prints a hello line and the daedalus version

Run the sample script:

daedalus hello          # hello from daedalus 0.3.0
daedalus test hello     # same, through the category prefix
daedalus test           # list the scripts in the 'test' category

daedalus --list prints the version, a script / type / categories table, and each description wrapped under each row.

Shell completion

Bash (and other shells argcomplete supports) completes script names and category labels: daedalus hel + TAB completes hello, daedalus test h + TAB completes hello inside the category, and options complete after -. See INSTALL.

Getting started

  1. Clone or copy this template and name the Git remote for your team.
  2. Add a script under python/src/, bash/, powershell/, or batch/ (see SPEC layout).
  3. Register it in daedalus/registry.py, add a row to the table above, write tests, bump version in pyproject.toml, and run python autotest.py.

hello is the sample script: copy its file, registry entry, README row, and tests to add your own. Unknown names exit with code 2 and suggest close matches.

S
Description
No description provided
Readme 522 KiB
Languages
Python 99.2%
Shell 0.7%