Feature Request: Default Command in Configuration
Summary
Add support for specifying a default command in the mdflow configuration file that would be used when neither the --_command flag nor filename pattern provides a command.
Current Behavior
Command resolution currently only supports two methods:
- CLI flag:
--_command or -_c
- Filename pattern:
task.COMMAND.md
If neither provides a command, mdflow throws an error.
Proposed Changes
1. Configuration Schema Update
Add a new defaultCommand field to the global configuration:
# ~/.mdflow/config.yaml
defaultCommand: opencode # New field
commands:
claude:
model: sonnet
copilot:
silent: true
2. Command Resolution Priority Update
Update command resolution to three levels:
Command resolution:
1. --_command flag (e.g., md task.md --_command claude)
2. Filename pattern (e.g., task.claude.md → claude)
3. Default command from config (e.g., defaultCommand: opencode)
Benefits
- Improved UX: Users can set their preferred command once and use generic filenames
- Consistency: Aligns with mdflow's configuration-first approach
- Backward Compatible: No breaking changes to existing workflows
- Flexible: Can be overridden per-project or per-file
Usage Examples
# With defaultCommand: opencode in config
md task.md # Uses opencode
md review.md # Uses opencode
md task.claude.md # Still uses claude (filename takes priority)
md task.md --_command gemini # Still uses gemini (flag takes priority)
Notes
The default command would be loaded from the global config (~/.mdflow/config.yaml) and could be overridden by project-level configs, maintaining the existing precedence cascade.
Feature Request: Default Command in Configuration
Summary
Add support for specifying a default command in the mdflow configuration file that would be used when neither the
--_commandflag nor filename pattern provides a command.Current Behavior
Command resolution currently only supports two methods:
--_commandor-_ctask.COMMAND.mdIf neither provides a command, mdflow throws an error.
Proposed Changes
1. Configuration Schema Update
Add a new
defaultCommandfield to the global configuration:2. Command Resolution Priority Update
Update command resolution to three levels:
Benefits
Usage Examples
Notes
The default command would be loaded from the global config (
~/.mdflow/config.yaml) and could be overridden by project-level configs, maintaining the existing precedence cascade.