@diagrammo/dgmo 0.0.1 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -6,12 +6,53 @@ Write simple, readable `.dgmo` text files and render them as charts, diagrams, a
6
6
 
7
7
  ## Install
8
8
 
9
+ ### As a library
10
+
9
11
  ```bash
10
12
  npm install @diagrammo/dgmo
11
13
  # or
12
14
  pnpm add @diagrammo/dgmo
13
15
  ```
14
16
 
17
+ ### As a CLI
18
+
19
+ ```bash
20
+ # via Homebrew (macOS)
21
+ brew tap diagrammo/dgmo
22
+ brew install dgmo
23
+
24
+ # or run directly via npx
25
+ npx @diagrammo/dgmo diagram.dgmo
26
+ ```
27
+
28
+ ## CLI usage
29
+
30
+ ```bash
31
+ # First time with no args? Creates a sample.dgmo to get you started
32
+ dgmo
33
+
34
+ # Render to PNG (default)
35
+ dgmo diagram.dgmo # → diagram.png
36
+
37
+ # Render to SVG
38
+ dgmo diagram.dgmo -o output.svg
39
+
40
+ # Explicit PNG
41
+ dgmo diagram.dgmo -o output.png
42
+
43
+ # Pipe from stdin
44
+ cat diagram.dgmo | dgmo -o out.png
45
+ cat diagram.dgmo | dgmo > out.png # PNG to stdout
46
+
47
+ # With theme and palette options
48
+ dgmo diagram.dgmo --theme dark --palette catppuccin
49
+ ```
50
+
51
+ | Option | Values | Default |
52
+ |---|---|---|
53
+ | `--theme` | `light`, `dark`, `transparent` | `light` |
54
+ | `--palette` | `nord`, `solarized`, `catppuccin`, `rose-pine`, `gruvbox`, `tokyo-night`, `one-dark`, `bold` | `nord` |
55
+
15
56
  ## How it works
16
57
 
17
58
  Every `.dgmo` file is plain text with a `chart: <type>` header followed by metadata and data. The library routes each chart type to the right framework and gives you either: