Summary
Introduce a top-level atd command that dispatches to existing tools (atdgen, atdpy, atdml, …) via the atd <subcommand> pattern.
This change will:
- Provide a modern and discoverable CLI entry point.
- Allow gradual migration to a consistent CLI based on Cmdliner.
- Preserve compatibility with existing scripts and users.
The full CLI cleanup (consistent options, help output, etc.) would happen in ATD 5.0.0.
Goals
- Introduce a unified entry point:
- Preserve backward compatibility:
continue to work.
-
Avoid large refactors in the short term.
-
Enable gradual migration of all tools to Cmdliner.
Proposed design
Dispatcher model
atd is a small executable that runs:
Example:
atd gen → exec atd-gen
atd py → exec atd-py
This follows the common CLI pattern used by tools such as git.
Advantages:
- Minimal implementation complexity
- No need to merge all programs into one binary
- Supports future plugins/extensions
- Compatible with opam packaging
Naming plan
Move toward this naming convention:
atd-gen
atd-py
atd-ml
...
Compatibility names will be preserved:
atdgen → symlink to atd-gen
atdpy → symlink to atd-py
atdml → symlink to atd-ml
This ensures:
- No breakage for existing scripts
- Cleaner subcommand dispatch
Behavior
Help
should display available commands:
Each command forwards arguments:
→ runs
Unknown commands
Example:
Behavior:
- attempt to execute
atd-foo
- if not found, display an error:
Unknown command: foo
Tried to execute: atd-foo
Packaging and distribution
Binary distributions will include:
bin/
atd
atd-gen
atd-py
atd-ml
atdgen
atdpy
atdml
Where:
atdgen, atdpy, etc. are symlinks for compatibility.
This layout works well for:
- GitHub release binaries
- package managers later (Homebrew, Scoop, etc.)
Implementation plan
Phase 1 — Introduce dispatcher (ATD 4.x)
Tasks:
No CLI behavior changes in individual tools yet.
Phase 2 — CLI unification (ATD 5.0.0)
Migrate all tools to Cmdliner and clean up interfaces.
Goals:
- Consistent
--help format
- Consistent option naming
- Consistent error handling
- Consistent version output
Example:
instead of tool-specific flags.
Tasks:
Compatibility policy
The following will continue to work indefinitely:
These may eventually become thin wrappers calling:
but should remain available for scripts and CI systems.
Open questions
- Should we fully rename binaries to
atd-* immediately, or introduce them gradually?
- Should
atd support command aliases?
- Should we add plugin support later (
atd-foo from PATH)?
- Should we expose a machine-readable command list?
Expected benefits
- Cleaner user experience
- Easier discoverability
- Simpler installation story
- Better long-term CLI consistency
- Smooth migration path
Summary
Introduce a top-level
atdcommand that dispatches to existing tools (atdgen,atdpy,atdml, …) via theatd <subcommand>pattern.This change will:
The full CLI cleanup (consistent options, help output, etc.) would happen in ATD 5.0.0.
Goals
continue to work.
Avoid large refactors in the short term.
Enable gradual migration of all tools to Cmdliner.
Proposed design
Dispatcher model
atdis a small executable that runs:Example:
This follows the common CLI pattern used by tools such as
git.Advantages:
Naming plan
Move toward this naming convention:
Compatibility names will be preserved:
This ensures:
Behavior
Help
should display available commands:
Each command forwards arguments:
→ runs
Unknown commands
Example:
Behavior:
atd-fooPackaging and distribution
Binary distributions will include:
Where:
atdgen,atdpy, etc. are symlinks for compatibility.This layout works well for:
Implementation plan
Phase 1 — Introduce dispatcher (ATD 4.x)
Tasks:
atddispatcher executableatd --helpatd-*No CLI behavior changes in individual tools yet.
Phase 2 — CLI unification (ATD 5.0.0)
Migrate all tools to Cmdliner and clean up interfaces.
Goals:
--helpformatExample:
instead of tool-specific flags.
Tasks:
Compatibility policy
The following will continue to work indefinitely:
These may eventually become thin wrappers calling:
but should remain available for scripts and CI systems.
Open questions
atd-*immediately, or introduce them gradually?atdsupport command aliases?atd-foofrom PATH)?Expected benefits