Skip to content

Commit d6e5cbd

Browse files
committed
docs: fix CLI flag documentation to use underscore prefix
- Change --command/-c to --_command/-_c - Change --dry-run to --_dry-run - Change --no-cache to --_no-cache - Change --trust to --_trust - Change --setup/--logs/--help to subcommands (setup/logs/help) The underscore prefix distinguishes mdflow-consumed flags from passthrough flags that go to the underlying CLI tool.
1 parent 39a6535 commit d6e5cbd

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

README.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ bun install && bun link
9999
mdflow task.claude.md
100100
mdflow task.gemini.md
101101

102-
# Override command via --command flag
103-
mdflow task.md --command claude
104-
mdflow task.md -c gemini
102+
# Override command via --_command flag
103+
mdflow task.md --_command claude
104+
mdflow task.md -_c gemini
105105

106106
# Pass additional flags to the command
107107
mdflow task.claude.md --verbose --debug
@@ -115,7 +115,7 @@ mdflow task.claude.md --verbose --debug
115115

116116
Commands are resolved in this priority order:
117117

118-
1. **CLI flag**: `--command claude` or `-c claude`
118+
1. **CLI flag**: `--_command claude` or `-_c claude`
119119
2. **Filename pattern**: `task.claude.md``claude`
120120

121121
If no command can be resolved, you'll get an error with instructions.
@@ -126,17 +126,17 @@ If no command can be resolved, you'll get an error with instructions.
126126

127127
Some CLI flags are "hijacked" by mdflow—they're consumed and never passed to the underlying command. This allows generic markdown files without command names to be executed.
128128

129-
### `--command` / `-c`
129+
### `--_command` / `-_c`
130130

131131
Override the command for any markdown file:
132132

133133
```bash
134134
# Run a generic .md file with any command
135-
mdflow task.md --command claude
136-
mdflow task.md -c gemini
135+
mdflow task.md --_command claude
136+
mdflow task.md -_c gemini
137137

138138
# Override the filename-inferred command
139-
mdflow task.claude.md --command gemini # Runs gemini, not claude
139+
mdflow task.claude.md --_command gemini # Runs gemini, not claude
140140
```
141141

142142
### `_varname` Template Variables
@@ -512,10 +512,10 @@ Fetch content from URLs (markdown and JSON only):
512512
@https://raw.githubusercontent.com/user/repo/main/README.md
513513
```
514514

515-
**Caching:** Remote URLs are cached locally at `~/.mdflow/cache/` with a 1-hour TTL. Use `--no-cache` to force a fresh fetch:
515+
**Caching:** Remote URLs are cached locally at `~/.mdflow/cache/` with a 1-hour TTL. Use `--_no-cache` to force a fresh fetch:
516516

517517
```bash
518-
mdflow agent.claude.md --no-cache
518+
mdflow agent.claude.md --_no-cache
519519
```
520520

521521
---
@@ -552,37 +552,37 @@ Environment variables are available:
552552

553553
```
554554
Usage: mdflow <file.md> [any flags for the command]
555-
mdflow <file.md> --command <cmd>
556-
mdflow --setup
557-
mdflow --logs
558-
mdflow --help
555+
mdflow <file.md> --_command <cmd>
556+
mdflow setup
557+
mdflow logs
558+
mdflow help
559559
560560
Command resolution:
561-
1. --command flag (e.g., mdflow task.md --command claude)
561+
1. --_command flag (e.g., mdflow task.md --_command claude)
562562
2. Filename pattern (e.g., task.claude.md → claude)
563563
564564
All frontmatter keys are passed as CLI flags to the command.
565565
Global defaults can be set in ~/.mdflow/config.yaml
566566
567567
mdflow-specific flags (consumed, not passed to command):
568-
--command, -c Specify command to run
569-
--dry-run Preview without executing
568+
--_command, -_c Specify command to run
569+
--_dry-run Preview without executing
570570
--_interactive, -_i Enable interactive mode
571-
--no-cache Force fresh fetch for remote URLs (bypass cache)
572-
--trust Bypass TOFU prompts for remote URLs
571+
--_no-cache Force fresh fetch for remote URLs (bypass cache)
572+
--_trust Bypass TOFU prompts for remote URLs
573573
574574
Examples:
575575
mdflow task.claude.md -p "print mode"
576576
mdflow task.claude.md --model opus --verbose
577577
mdflow commit.gemini.md
578-
mdflow task.md --command claude
579-
mdflow task.md -c gemini
578+
mdflow task.md --_command claude
579+
mdflow task.md -_c gemini
580580
mdflow task.claude.md -_i # Run in interactive mode
581581
582582
Without a file:
583-
mdflow --setup Configure shell to run .md files directly
584-
mdflow --logs Show log directory
585-
mdflow --help Show this help
583+
mdflow setup Configure shell to run .md files directly
584+
mdflow logs Show log directory
585+
mdflow help Show this help
586586
```
587587

588588
### Environment Variables
@@ -599,7 +599,7 @@ Without a file:
599599
Make `.md` files directly executable:
600600

601601
```bash
602-
mdflow --setup # One-time setup
602+
mdflow setup # One-time setup
603603
```
604604

605605
Then run agents directly:
@@ -652,8 +652,8 @@ git diff | review.claude.md # Review staged changes
652652
- If no frontmatter is present, the file is printed as-is (unless command inferred from filename)
653653
- Template system uses [LiquidJS](https://liquidjs.com/) - supports conditionals, loops, and filters
654654
- Logs are always written to `~/.mdflow/logs/<agent-name>/` for debugging
655-
- Use `--logs` to show the log directory
655+
- Use `mdflow logs` to show the log directory
656656
- Piped input is available as `{{ _stdin }}` template variable
657657
- Template variables use `_` prefix: `_name` in frontmatter → `{{ _name }}` in body → `--_name` CLI flag
658-
- Remote URLs are cached at `~/.mdflow/cache/` with 1-hour TTL (use `--no-cache` to bypass)
658+
- Remote URLs are cached at `~/.mdflow/cache/` with 1-hour TTL (use `--_no-cache` to bypass)
659659
- Imports inside code blocks (``` or `) are ignored by the parser

0 commit comments

Comments
 (0)