Skip to content

Commit e8dd943

Browse files
committed
refactor: rename markdown-agent to mdflow
- Package name: markdown-agent → mdflow - CLI commands: ma → md (and mdflow) - Config directory: ~/.markdown-agent → ~/.mdflow - Project config files: ma.config.yaml → mdflow.config.yaml - Agent directories: .ma/ → .mdflow/, ~/.ma/ → ~/.mdflow/ - Log directory: ~/.mdflow/logs - Known hosts: ~/.mdflow/known_hosts - Updated all tests to use new naming
1 parent 2258091 commit e8dd943

24 files changed

+228
-243
lines changed

.cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
2626
.eslintcache
2727
.cache
2828
*.tsbuildinfo
29-
.markdown-agent
29+
.mdflow
3030

3131
# IntelliJ based IDEs
3232
.idea
3333

34+
# Cursor
35+
.cursor/
36+
3437
# Finder (MacOS) folder config
3538
.DS_Store
3639
PRESENTATION.md

.vscode/settings.json

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,6 @@
1313
"editor.findMatchHighlightBorder": "#ffffff",
1414
"editor.findMatchHighlightBackground": "#000000ee",
1515
"editor.findMatchHighlightForeground": "#ffffffee",
16-
"activityBar.background": "#211C7F",
17-
"activityBar.activeBackground": "#211C7F",
18-
"activityBar.activeBorder": "#797F1C",
19-
"activityBar.foreground": "#FCFCFE",
20-
"activityBar.inactiveForeground": "#FCFCFE99",
21-
"activityBarBadge.background": "#797F1C",
22-
"activityBarBadge.foreground": "#FCFCFE",
23-
"titleBar.activeBackground": "#2E27B1",
24-
"titleBar.activeForeground": "#FCFCFE",
25-
"titleBar.inactiveBackground": "#2E27B199",
26-
"titleBar.inactiveForeground": "#FCFCFE99",
27-
"sash.hoverBorder": "#211C7F",
28-
"commandCenter.border": "#FCFCFE99",
29-
"statusBar.background": "#2E27B1",
30-
"statusBar.foreground": "#FCFCFE",
31-
"statusBarItem.hoverBackground": "#2A23A0",
32-
"statusBarItem.remoteBackground": "#2E27B1",
33-
"statusBarItem.remoteForeground": "#FCFCFE"
16+
"activityBar.activeBorder": "#797F1C"
3417
}
3518
}

CLAUDE.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Overview
66

7-
**markdown-agent** (`ma`) is a CLI tool that executes AI agents defined as markdown files. It parses YAML frontmatter for configuration and passes keys directly as CLI flags to the specified command (claude, codex, gemini, copilot, or any other CLI tool).
7+
**mdflow** (`md`) is a CLI tool that executes AI agents defined as markdown files. It parses YAML frontmatter for configuration and passes keys directly as CLI flags to the specified command (claude, codex, gemini, copilot, or any other CLI tool).
88

99
## CLI Subcommands
1010

1111
```bash
12-
ma <file.md> [flags] # Run an agent
13-
ma create [name] # Create a new agent file
14-
ma setup # Configure shell (PATH, aliases)
15-
ma logs # Show agent log directory
16-
ma help # Show help
12+
md <file.md> [flags] # Run an agent
13+
md create [name] # Create a new agent file
14+
md setup # Configure shell (PATH, aliases)
15+
md logs # Show agent log directory
16+
md help # Show help
1717
```
1818

1919
## Development Commands
@@ -32,7 +32,7 @@ bun test --test-name-pattern "parses command"
3232
bun run src/index.ts task.claude.md
3333

3434
# Or using the alias
35-
bun run ma task.claude.md
35+
bun run md task.claude.md
3636
```
3737

3838
## Architecture
@@ -56,7 +56,7 @@ bun run ma task.claude.md
5656
- `runCommand()`: Spawns the command with positional args
5757

5858
- **`config.ts`** - Global configuration
59-
- Loads defaults from `~/.markdown-agent/config.yaml`
59+
- Loads defaults from `~/.mdflow/config.yaml`
6060
- Built-in defaults: All commands default to print mode
6161
- `getCommandDefaults()`: Get defaults for a command
6262
- `applyDefaults()`: Merge defaults with frontmatter
@@ -80,7 +80,7 @@ bun run ma task.claude.md
8080

8181
- **`template.ts`** - LiquidJS-powered template engine for variable substitution
8282

83-
- **`logger.ts`** - Structured logging with pino (logs to `~/.markdown-agent/logs/<agent>/`)
83+
- **`logger.ts`** - Structured logging with pino (logs to `~/.mdflow/logs/<agent>/`)
8484

8585
### Command Resolution
8686

@@ -90,7 +90,7 @@ Commands are resolved in priority order:
9090

9191
### Frontmatter Keys
9292

93-
**System keys** (consumed by ma, not passed to command):
93+
**System keys** (consumed by md, not passed to command):
9494
- `args`: Named positional arguments for template vars
9595
- `env` (object form): Sets process.env before execution
9696
- `$1`, `$2`, etc.: Map positional args to flags
@@ -137,7 +137,7 @@ task.gemini.md # Print mode: gemini "..." (one-shot)
137137
task.i.gemini.md # Interactive: gemini --prompt-interactive "..."
138138
```
139139

140-
### Global Config (`~/.markdown-agent/config.yaml`)
140+
### Global Config (`~/.mdflow/config.yaml`)
141141

142142
Set default frontmatter per command:
143143

README.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# markdown-agent
1+
# mdflow
22

33
```bash
44
review.claude.md # Run with Claude
@@ -67,7 +67,7 @@ The markdown body is passed as the final argument to the command.
6767

6868
## Unix Philosophy
6969

70-
markdown-agent embraces the Unix philosophy:
70+
mdflow embraces the Unix philosophy:
7171

7272
- **No magic mapping** - Frontmatter keys pass directly to the command
7373
- **Stdin/stdout** - Pipe data in and out
@@ -76,18 +76,18 @@ markdown-agent embraces the Unix philosophy:
7676

7777
```bash
7878
# Pipe input
79-
git diff | ma review.claude.md
79+
git diff | mdflow review.claude.md
8080

8181
# Chain agents
82-
ma plan.claude.md | ma implement.codex.md
82+
mdflow plan.claude.md | mdflow implement.codex.md
8383
```
8484

8585
---
8686

8787
## Installation
8888

8989
```bash
90-
npm install -g markdown-agent
90+
npm install -g mdflow
9191
# or
9292
bun install && bun link
9393
```
@@ -96,18 +96,18 @@ bun install && bun link
9696

9797
```bash
9898
# Run with filename-inferred command
99-
ma task.claude.md
100-
ma task.gemini.md
99+
mdflow task.claude.md
100+
mdflow task.gemini.md
101101

102102
# Override command via --command flag
103-
ma task.md --command claude
104-
ma task.md -c gemini
103+
mdflow task.md --command claude
104+
mdflow task.md -c gemini
105105

106106
# Pass additional flags to the command
107-
ma task.claude.md --verbose --debug
107+
mdflow task.claude.md --verbose --debug
108108
```
109109

110-
> **Note:** Both `ma` and `markdown-agent` commands are available.
110+
> **Note:** Both `mdflow` and `md` commands are available.
111111
112112
---
113113

@@ -124,19 +124,19 @@ If no command can be resolved, you'll get an error with instructions.
124124

125125
## Flag Hijacking
126126

127-
Some CLI flags are "hijacked" by markdown-agent—they're consumed and never passed to the underlying command. This allows generic markdown files without command names to be executed.
127+
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

129129
### `--command` / `-c`
130130

131131
Override the command for any markdown file:
132132

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

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

142142
### `$varname` Fields
@@ -153,19 +153,19 @@ Build {{ feature_name }} in {{ target_dir }}.
153153

154154
```bash
155155
# Use defaults
156-
ma create.claude.md
156+
mdflow create.claude.md
157157

158158
# Override with CLI flags (hijacked, not passed to command)
159-
ma create.claude.md --feature_name "Payments" --target_dir "src/billing"
159+
mdflow create.claude.md --feature_name "Payments" --target_dir "src/billing"
160160
```
161161

162-
The `--feature_name` and `--target_dir` flags are consumed by markdown-agent for template substitution—they won't be passed to the command.
162+
The `--feature_name` and `--target_dir` flags are consumed by mdflow for template substitution—they won't be passed to the command.
163163

164164
---
165165

166166
## Frontmatter Reference
167167

168-
### System Keys (handled by markdown-agent)
168+
### System Keys (handled by mdflow)
169169

170170
| Field | Type | Description |
171171
|-------|------|-------------|
@@ -234,15 +234,15 @@ Review this code with me interactively.
234234
Or use CLI flags:
235235

236236
```bash
237-
ma task.claude.md --_interactive # Enable interactive mode
238-
ma task.claude.md -_i # Short form
237+
mdflow task.claude.md --_interactive # Enable interactive mode
238+
mdflow task.claude.md -_i # Short form
239239
```
240240

241241
---
242242

243243
## Global Configuration
244244

245-
Set default frontmatter per command in `~/.markdown-agent/config.yaml`:
245+
Set default frontmatter per command in `~/.mdflow/config.yaml`:
246246

247247
```yaml
248248
commands:
@@ -323,7 +323,7 @@ Create a new feature called "{{ feature_name }}" in {{ target_dir }}.
323323
```
324324

325325
```bash
326-
ma create-feature.claude.md "Auth" "src/features"
326+
mdflow create-feature.claude.md "Auth" "src/features"
327327
```
328328

329329
### Environment Variables
@@ -378,7 +378,7 @@ Glob imports:
378378
- Respect `.gitignore` automatically
379379
- Include common exclusions (`node_modules`, `.git`, etc.)
380380
- Are limited to ~100,000 tokens by default
381-
- Set `MA_FORCE_CONTEXT=1` to override the token limit
381+
- Set `MDFLOW_FORCE_CONTEXT=1` to override the token limit
382382

383383
Files are formatted as XML with path attributes:
384384

@@ -443,7 +443,7 @@ Fetch content from URLs (markdown and JSON only):
443443

444444
## Environment Variables
445445

446-
markdown-agent automatically loads `.env` files from the markdown file's directory.
446+
mdflow automatically loads `.env` files from the markdown file's directory.
447447

448448
### Loading Order
449449

@@ -472,43 +472,43 @@ Environment variables are available:
472472
## CLI Options
473473

474474
```
475-
Usage: ma <file.md> [any flags for the command]
476-
ma <file.md> --command <cmd>
477-
ma --setup
478-
ma --logs
479-
ma --help
475+
Usage: mdflow <file.md> [any flags for the command]
476+
mdflow <file.md> --command <cmd>
477+
mdflow --setup
478+
mdflow --logs
479+
mdflow --help
480480
481481
Command resolution:
482-
1. --command flag (e.g., ma task.md --command claude)
482+
1. --command flag (e.g., mdflow task.md --command claude)
483483
2. Filename pattern (e.g., task.claude.md → claude)
484484
485485
All frontmatter keys are passed as CLI flags to the command.
486-
Global defaults can be set in ~/.markdown-agent/config.yaml
486+
Global defaults can be set in ~/.mdflow/config.yaml
487487
488-
ma-specific flags (consumed, not passed to command):
488+
mdflow-specific flags (consumed, not passed to command):
489489
--command, -c Specify command to run
490490
--dry-run Preview without executing
491491
--_interactive, -_i Enable interactive mode
492492
493493
Examples:
494-
ma task.claude.md -p "print mode"
495-
ma task.claude.md --model opus --verbose
496-
ma commit.gemini.md
497-
ma task.md --command claude
498-
ma task.md -c gemini
499-
ma task.claude.md -_i # Run in interactive mode
494+
mdflow task.claude.md -p "print mode"
495+
mdflow task.claude.md --model opus --verbose
496+
mdflow commit.gemini.md
497+
mdflow task.md --command claude
498+
mdflow task.md -c gemini
499+
mdflow task.claude.md -_i # Run in interactive mode
500500
501501
Without a file:
502-
ma --setup Configure shell to run .md files directly
503-
ma --logs Show log directory
504-
ma --help Show this help
502+
mdflow --setup Configure shell to run .md files directly
503+
mdflow --logs Show log directory
504+
mdflow --help Show this help
505505
```
506506

507507
### Environment Variables
508508

509509
| Variable | Description |
510510
|----------|-------------|
511-
| `MA_FORCE_CONTEXT` | Set to `1` to disable the 100k token limit for glob imports |
511+
| `MDFLOW_FORCE_CONTEXT` | Set to `1` to disable the 100k token limit for glob imports |
512512
| `NODE_ENV` | Controls which `.env.[NODE_ENV]` file is loaded (default: `development`) |
513513

514514
---
@@ -518,7 +518,7 @@ Without a file:
518518
Make `.md` files directly executable:
519519

520520
```bash
521-
ma --setup # One-time setup
521+
mdflow --setup # One-time setup
522522
```
523523

524524
Then run agents directly:
@@ -533,7 +533,7 @@ task.claude.md --verbose # With passthrough args
533533
Add to `~/.zshrc`:
534534

535535
```bash
536-
alias -s md='ma'
536+
alias -s md='mdflow'
537537
export PATH="$HOME/agents:$PATH" # Your agent library
538538
```
539539

@@ -570,6 +570,6 @@ git diff | review.claude.md # Review staged changes
570570

571571
- If no frontmatter is present, the file is printed as-is (unless command inferred from filename)
572572
- Template system uses [LiquidJS](https://liquidjs.com/) - supports conditionals, loops, and filters
573-
- Logs are always written to `~/.markdown-agent/logs/<agent-name>/` for debugging
573+
- Logs are always written to `~/.mdflow/logs/<agent-name>/` for debugging
574574
- Use `--logs` to show the log directory
575575
- Stdin is wrapped in `<stdin>` tags and prepended to the prompt

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "markdown-agent",
2+
"name": "mdflow",
33
"version": "2.16.0",
44
"module": "src/index.ts",
55
"type": "module",
@@ -8,12 +8,12 @@
88
"url": "https://github.com/johnlindquist/markdown-agent.git"
99
},
1010
"bin": {
11-
"markdown-agent": "./src/index.ts",
12-
"ma": "./src/index.ts"
11+
"mdflow": "./src/index.ts",
12+
"md": "./src/index.ts"
1313
},
1414
"scripts": {
1515
"test": "bun test --bail=1",
16-
"ma": "bun run src/index.ts"
16+
"md": "bun run src/index.ts"
1717
},
1818
"devDependencies": {
1919
"@semantic-release/changelog": "^6.0.3",

0 commit comments

Comments
 (0)