@intechstudio/grid-protocol 1.20260302.1321 → 1.20260305.801

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
@@ -2,4 +2,43 @@
2
2
 
3
3
  Decoder path should be
4
4
 
5
- ```~/.local/share/libsigrokdecode/decoders```
5
+ `~/.local/share/libsigrokdecode/decoders`
6
+
7
+ ## CLI Tools
8
+
9
+ ### Setup
10
+
11
+ After pulling the repository, install dependencies and build:
12
+
13
+ ```bash
14
+ npm install
15
+ npm run build
16
+ ```
17
+
18
+ ### Minify (human-readable → device format)
19
+
20
+ ```bash
21
+ node minify.mjs "midi_send(ch, 176, cc, val)" 2>/dev/null
22
+ # gms(ch,176,cc,val)
23
+ ```
24
+
25
+ ### Humanize (device format → human-readable)
26
+
27
+ ```bash
28
+ node humanize.mjs "gms(ch,176,cc,val)" 2>/dev/null
29
+ # midi_send(ch, 176, cc, val)
30
+ ```
31
+
32
+ > Note: Invalid Lua syntax will throw a parse error with the token and position.
33
+
34
+ > Note: When passing scripts with special characters as shell arguments, use single quotes to avoid shell interpretation: `node minify.mjs 'self:midi_send(-1, -1, -1, -1)'`
35
+
36
+ > Note: JSON output from the inspect scripts will have special characters escaped (e.g. `"` → `\"`, newline → `\n`). This is expected — parse the JSON before using the strings.
37
+
38
+ ### Inspect protocol data
39
+
40
+ ```bash
41
+ node list-modules.mjs 2>/dev/null # module types and their elements
42
+ node list-elements.mjs 2>/dev/null # element types, events and default configs
43
+ node list-functions.mjs 2>/dev/null # Lua functions grouped by element type
44
+ ```