metergraph-cli 0.2.0-preview.6 → 0.2.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 +14 -15
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# metergraph-cli
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/metergraph-cli)
|
|
4
4
|
[](https://github.com/metergraph/cli/actions/workflows/ci.yml)
|
|
5
5
|
[](https://github.com/metergraph/cli/blob/main/LICENSE)
|
|
6
6
|
|
|
@@ -13,11 +13,10 @@ token and route metadata back. Every command has stable `--json` output and exit
|
|
|
13
13
|
so agents can run it as well as people.
|
|
14
14
|
|
|
15
15
|
```sh
|
|
16
|
-
npx --yes metergraph-cli
|
|
16
|
+
npx --yes metergraph-cli --help
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
only `doctor` and `skill`. See the [changelog](https://github.com/metergraph/cli/blob/main/CHANGELOG.md).
|
|
19
|
+
Published on npm as `latest`. See the [changelog](https://github.com/metergraph/cli/blob/main/CHANGELOG.md).
|
|
21
20
|
|
|
22
21
|
## Quickstart
|
|
23
22
|
|
|
@@ -27,7 +26,7 @@ writes `METERGRAPH_APP_TOKEN` and `METERGRAPH_INGEST_URL` to a private `.env`, a
|
|
|
27
26
|
installs the skill for your coding agent.
|
|
28
27
|
|
|
29
28
|
```sh
|
|
30
|
-
npx --yes metergraph-cli
|
|
29
|
+
npx --yes metergraph-cli setup --runtime local --client claude
|
|
31
30
|
```
|
|
32
31
|
|
|
33
32
|
Use `--client codex` or `--client cursor` for the other agents.
|
|
@@ -40,20 +39,20 @@ ID or request ID and when the call started and ended.
|
|
|
40
39
|
exact trace is visible in your workspace.
|
|
41
40
|
|
|
42
41
|
```sh
|
|
43
|
-
npx --yes metergraph-cli
|
|
42
|
+
npx --yes metergraph-cli verify --trace-id TRACE_ID \
|
|
44
43
|
--since 2026-01-08T12:00:00Z --until 2026-01-08T12:00:05Z
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
Then read what Metergraph has recorded:
|
|
48
47
|
|
|
49
48
|
```sh
|
|
50
|
-
npx --yes metergraph-cli
|
|
51
|
-
npx --yes metergraph-cli
|
|
49
|
+
npx --yes metergraph-cli usage --days 7 # calls, errors, cost and tokens per route per day
|
|
50
|
+
npx --yes metergraph-cli traces --limit 20 # one page of trace metadata
|
|
52
51
|
```
|
|
53
52
|
|
|
54
|
-
To install it globally instead, run `npm install -g metergraph-cli
|
|
55
|
-
`metergraph`. Pin an exact version, such as `metergraph-cli@0.2.0
|
|
56
|
-
script must not change with the `next` tag.
|
|
53
|
+
To install it globally instead, run `npm install -g metergraph-cli`. The command is
|
|
54
|
+
`metergraph`. Pin an exact version, such as `metergraph-cli@0.2.0`, when a
|
|
55
|
+
script must not change with the `latest` tag. Previews use the `next` tag.
|
|
57
56
|
|
|
58
57
|
## Requirements
|
|
59
58
|
|
|
@@ -80,7 +79,7 @@ The CLI is built to be run by Codex, Claude Code and Cursor as well as by people
|
|
|
80
79
|
network access:
|
|
81
80
|
|
|
82
81
|
```sh
|
|
83
|
-
npx --yes metergraph-cli
|
|
82
|
+
npx --yes metergraph-cli skill install --client codex
|
|
84
83
|
```
|
|
85
84
|
|
|
86
85
|
Python users can run `pip install metergraph-skills` and
|
|
@@ -94,7 +93,7 @@ The CLI is built to be run by Codex, Claude Code and Cursor as well as by people
|
|
|
94
93
|
the `metergraph/skills` plugin marketplace instead.
|
|
95
94
|
|
|
96
95
|
```sh
|
|
97
|
-
npx --yes metergraph-cli
|
|
96
|
+
npx --yes metergraph-cli skills install --client claude
|
|
98
97
|
```
|
|
99
98
|
|
|
100
99
|
`--runtime` defaults to `local`. Pass `--runtime cloud` when the client runs in a
|
|
@@ -121,7 +120,7 @@ The CLI is built to be run by Codex, Claude Code and Cursor as well as by people
|
|
|
121
120
|
Suggested `AGENTS.md` or `CLAUDE.md` lines for a project that uses Metergraph:
|
|
122
121
|
|
|
123
122
|
```md
|
|
124
|
-
- Metergraph CLI: `npx --yes metergraph-cli
|
|
123
|
+
- Metergraph CLI: `npx --yes metergraph-cli <command> --json`. Check exit codes;
|
|
125
124
|
follow `data.next_action` on failure.
|
|
126
125
|
- After changing instrumented code, run the app once and confirm the trace with
|
|
127
126
|
`metergraph verify` before reporting that tracing works.
|
|
@@ -155,7 +154,7 @@ Exit codes are stable. Changing one is a breaking change. Codes 10 to 18 are not
|
|
|
155
154
|
|
|
156
155
|
| Code | Outcome | Meaning |
|
|
157
156
|
| --- | --- | --- |
|
|
158
|
-
| 0 | `ok` | Command succeeded. `doctor` does not return this in this
|
|
157
|
+
| 0 | `ok` | Command succeeded. `doctor` does not return this in this release. For `skill`, the file is in place; discovery is still pending. |
|
|
159
158
|
| 1 | `internal_error` | Unexpected failure inside the CLI. |
|
|
160
159
|
| 2 | `invalid_input` | Unknown command or argument, or an invalid option value. No request was made. |
|
|
161
160
|
| 3 | `authentication_required` | Service is reachable, healthy and supported, and requires authentication. No workspace is connected. |
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "metergraph-cli",
|
|
3
|
-
"version": "0.2.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Metergraph command line tool with a read-only connection probe, a project skill installer, Metadata-only sign in and bounded workspace Metadata reads",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"metergraph": "bin/metergraph.js"
|