You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/apply-md.md
+10-65Lines changed: 10 additions & 65 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Overview
4
4
5
-
The `apply-md` tool extracts code blocks from markdown (typically LLM responses) and applies them to your filesystem. It supports both relative and absolute paths, with absolute paths resolved relative to the git repository root when run within a git repository.
5
+
The `apply-md` tool extracts code blocks from markdown (typically LLM responses) and applies them to your filesystem. This simplified version focuses on core functionality without the complexity of advanced features.
@@ -97,32 +64,10 @@ The script expects code blocks in these formats:
97
64
```
98
65
```
99
66
100
-
### Absolute Path (from git root)
101
-
```markdown
102
-
```bash /scripts/deploy.sh
103
-
#!/bin/bash
104
-
echo "Deploying..."
105
-
```
106
-
```
107
-
108
-
The language specification is optional, but the filename is required. Absolute paths (starting with /) will be resolved relative to the git repository root when run within a git repository.
67
+
The language specification is optional, but the filename is required.
109
68
110
69
## Tips
111
70
112
71
- Always use `--dry-run` first to preview changes
113
-
- Use `--verbose` to see the detected git root and normalized paths
114
-
- Consider using `--backup` for important changes
115
-
- Use `--confirm` to review each change individually
116
-
- When using absolute paths, ensure you're running from within a git repository
117
-
- If not in a git repository, absolute paths will be treated as system paths
118
-
119
-
## Git Integration
120
-
121
-
When run within a git repository:
122
-
- Detects the repository root automatically
123
-
- Converts absolute paths (e.g., `/src/main.js`) to relative paths from the git root
124
-
- Shows the detected git root in verbose mode
125
-
126
-
If not in a git repository:
127
-
- Absolute paths are treated as system absolute paths
128
-
- A warning is shown in verbose mode
72
+
- Use `--verbose` to see detailed information about changes
73
+
- When creating new files, ensure the `--create-missing` flag is set
0 commit comments