@rogatio/cli 1.0.0 → 1.1.0
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 +64 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# @rogatio/cli
|
|
2
|
+
|
|
3
|
+
Local-first browser request & response rules — editor host, file verification, test
|
|
4
|
+
runner, and runtime dispatch for [Rogatio](https://github.com/drmaas/rogatio).
|
|
5
|
+
|
|
6
|
+
Rogatio keeps all rules in a single version-controlled `.rogatio.json` file. The CLI
|
|
7
|
+
launches the visual editor, validates and dry-runs rules offline, and controls the
|
|
8
|
+
optional local runtime used for mocks and response/request body rewriting.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install -g @rogatio/cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires Node.js 24+.
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
rogatio <command> [options]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| Command | Description |
|
|
25
|
+
| --- | --- |
|
|
26
|
+
| `rogatio edit [path]` | Launch the browser editor for `.rogatio.json`. |
|
|
27
|
+
| `rogatio verify [path]` | Validate a `.rogatio.json` file (schema + compiler). |
|
|
28
|
+
| `rogatio test [path] [url...]` | Run offline dry-run tests against `.rogatio.json`. |
|
|
29
|
+
| `rogatio runtime <start\|stop\|status\|install\|trust\|untrust\|uninstall>` | Control the native messaging runtime and request-body trust. |
|
|
30
|
+
| `rogatio runtime [path]` | Start the local mock runtime server. |
|
|
31
|
+
|
|
32
|
+
Global options: `--help, -h` and `--version, -v`. Run `rogatio <command> --help`
|
|
33
|
+
for command-specific usage.
|
|
34
|
+
|
|
35
|
+
### Examples
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
# Open the editor for the project file in the current directory
|
|
39
|
+
rogatio edit
|
|
40
|
+
|
|
41
|
+
# Validate a project file (reads stdin with '-')
|
|
42
|
+
rogatio verify .rogatio.json
|
|
43
|
+
|
|
44
|
+
# Dry-run rules against a set of URLs
|
|
45
|
+
rogatio test .rogatio.json https://example.com/ https://example.com/app.js
|
|
46
|
+
|
|
47
|
+
# Start the local mock runtime on the default port
|
|
48
|
+
rogatio runtime
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Exit codes
|
|
52
|
+
|
|
53
|
+
- `0` — success
|
|
54
|
+
- `1` — invalid project (diagnostics present) or test/validation errors
|
|
55
|
+
- `2` — usage or IO error
|
|
56
|
+
|
|
57
|
+
## Related
|
|
58
|
+
|
|
59
|
+
- [Rogatio repository](https://github.com/drmaas/rogatio)
|
|
60
|
+
- [Chrome extension](https://github.com/drmaas/rogatio/releases) (Manifest V3)
|
|
61
|
+
|
|
62
|
+
## License
|
|
63
|
+
|
|
64
|
+
MIT
|
package/package.json
CHANGED