Skip to content

Commit e31241c

Browse files
authored
Merge pull request #78 from jongalloway/docs/dnx-cli-guidance
Prefer dnx for CLI usage
2 parents adf5f6e + 9d00a60 commit e31241c

3 files changed

Lines changed: 21 additions & 17 deletions

File tree

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,14 @@ DiagramForge targets `.NET 10`. For local development and the CLI tool, use SDK/
248248
dotnet add package DiagramForge
249249
```
250250

251-
### CLI (.NET tool)
251+
### CLI (`dnx`)
252252

253253
```sh
254-
dotnet tool install -g DiagramForge.Tool
254+
dnx DiagramForge.Tool --help
255255
```
256256

257+
With `.NET 10`, `dnx` can run the tool package directly without a prior install.
258+
257259
## Library usage
258260

259261
### Basic
@@ -330,7 +332,7 @@ Implement `IDiagramParser`. You get two methods: `CanParse(string)` for sniffing
330332
## CLI usage
331333

332334
```text
333-
diagramforge <input-file> [options]
335+
dnx DiagramForge.Tool <input-file> [options]
334336
```
335337

336338
| Argument | Description |
@@ -349,13 +351,13 @@ CLI precedence mirrors the library API: frontmatter can define theme and styling
349351

350352
```sh
351353
# write to file
352-
diagramforge diagram.mmd -o diagram.svg
354+
dnx DiagramForge.Tool diagram.mmd -o diagram.svg
353355

354356
# render for overlay on an existing page background
355-
diagramforge diagram.mmd --theme dracula --transparent -o overlay.svg
357+
dnx DiagramForge.Tool diagram.mmd --theme dracula --transparent -o overlay.svg
356358

357359
# pipe to something else
358-
diagramforge diagram.txt | rsvg-convert -o diagram.png
360+
dnx DiagramForge.Tool diagram.txt | rsvg-convert -o diagram.png
359361
```
360362

361363
## Supported syntax

doc/PackageReadme.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ DiagramForge targets `.NET 10`.
2626
dotnet add package DiagramForge
2727
```
2828

29-
### CLI tool
29+
### CLI (`dnx`)
3030

3131
```bash
32-
dotnet tool install -g DiagramForge.Tool
32+
dnx DiagramForge.Tool --help
3333
```
3434

35+
With `.NET 10`, `dnx` can run the tool package directly without a prior install.
36+
3537
## Basic usage
3638

3739
```csharp
@@ -48,8 +50,8 @@ flowchart LR
4850
## CLI usage
4951

5052
```bash
51-
diagramforge diagram.mmd -o diagram.svg
52-
diagramforge diagram.mmd --theme dracula --transparent -o overlay.svg
53+
dnx DiagramForge.Tool diagram.mmd -o diagram.svg
54+
dnx DiagramForge.Tool diagram.mmd --theme dracula --transparent -o overlay.svg
5355
```
5456

5557
## Supported today

src/DiagramForge.Cli/Program.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ static void PrintHelp()
165165
"DiagramForge — Diagram text to SVG renderer",
166166
string.Empty,
167167
"Usage:",
168-
" diagramforge <input-file> [options]",
169-
" diagramforge --help",
168+
" dnx DiagramForge.Tool <input-file> [options]",
169+
" dnx DiagramForge.Tool --help",
170170
string.Empty,
171171
"Arguments:",
172172
" <input-file> Path to the diagram source file (Mermaid or Conceptual DSL)",
@@ -185,11 +185,11 @@ static void PrintHelp()
185185
" conceptual Matrix, Pyramid",
186186
string.Empty,
187187
"Examples:",
188-
" diagramforge diagram.mmd --output diagram.svg",
189-
" diagramforge diagram.mmd --theme dark --output diagram.svg",
190-
" diagramforge diagram.mmd --theme dark --palette '[\"#FF6B6B\",\"#4ECDC4\",\"#45B7D1\"]' -o out.svg",
191-
" diagramforge diagram.mmd --theme dracula --transparent -o overlay.svg",
192-
" diagramforge diagram.mmd --theme-file mytheme.json -o out.svg"
188+
" dnx DiagramForge.Tool diagram.mmd --output diagram.svg",
189+
" dnx DiagramForge.Tool diagram.mmd --theme dark --output diagram.svg",
190+
" dnx DiagramForge.Tool diagram.mmd --theme dark --palette '[\"#FF6B6B\",\"#4ECDC4\",\"#45B7D1\"]' -o out.svg",
191+
" dnx DiagramForge.Tool diagram.mmd --theme dracula --transparent -o overlay.svg",
192+
" dnx DiagramForge.Tool diagram.mmd --theme-file mytheme.json -o out.svg"
193193
];
194194

195195
Console.WriteLine(string.Join(Environment.NewLine, lines));

0 commit comments

Comments
 (0)