@emit-vision/cli 0.2.4 โ 0.2.5
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 +103 -0
- package/dist/index.js +1 -1
- package/package.json +21 -3
package/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# @emit-vision/cli
|
|
2
|
+
|
|
3
|
+
Command-line interface for [Emit Vision](https://emitvision.com) โ the self-hostable analytics, error tracking, and feature-flag stack.
|
|
4
|
+
|
|
5
|
+
Query telemetry, manage projects and ingest keys, and control feature flags from your terminal, a deploy script, or a coding agent.
|
|
6
|
+
|
|
7
|
+
๐ **[Full CLI reference โ](https://app.emitvision.com/docs/cli)**
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @emit-vision/cli
|
|
13
|
+
# or: pnpm add -g @emit-vision/cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Authentication
|
|
17
|
+
|
|
18
|
+
Log in once โ credentials are stored locally and reused by every command.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
emit-vision login --browser # browser OAuth
|
|
22
|
+
emit-vision login --token <pat> # non-interactive (or set EMIT_VISION_PAT)
|
|
23
|
+
emit-vision status # verify the stored token
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Point at a self-hosted instance with `--api-url`:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
emit-vision login --token <pat> --api-url https://api.your-host.com
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Feature flags
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
emit-vision flags list <projectId>
|
|
36
|
+
emit-vision flags enable <projectId> compare-pages
|
|
37
|
+
emit-vision flags rollout <projectId> new-checkout 25
|
|
38
|
+
emit-vision flags create <projectId> dark-mode --name "Dark Mode"
|
|
39
|
+
emit-vision flags evaluate <projectId> --environment production
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Flags are referenced by their **key**, not an internal id. Creating, updating,
|
|
43
|
+
enabling, disabling, and archiving require a token with the admin role;
|
|
44
|
+
listing and evaluating do not.
|
|
45
|
+
|
|
46
|
+
For multivariate flags, pipe a full definition in:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cat flag.json | emit-vision flags create <projectId> --from-json -
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Querying telemetry
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
emit-vision overview <projectId>
|
|
56
|
+
emit-vision events recent <projectId> --limit 20
|
|
57
|
+
emit-vision errors grouped <projectId> --environment production
|
|
58
|
+
emit-vision logs <projectId> --severity error
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Most commands accept `--from`/`--to` (ISO timestamps), `--environment`, `--limit`, and `--json`.
|
|
62
|
+
|
|
63
|
+
## Projects and keys
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
emit-vision project list
|
|
67
|
+
emit-vision project create "My App"
|
|
68
|
+
emit-vision key get <projectId>
|
|
69
|
+
emit-vision key rotate <projectId> --yes
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Scripting and agents
|
|
73
|
+
|
|
74
|
+
Every read command supports `--json`, so output pipes cleanly into `jq` or an agent's tool loop:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Top error groups as JSON
|
|
78
|
+
emit-vision errors grouped <projectId> --json | jq '.[0:5]'
|
|
79
|
+
|
|
80
|
+
# Gate a deploy step on a flag
|
|
81
|
+
if [ "$(emit-vision flags evaluate <projectId> --environment production --flag safe-deploy --json | jq -r '."safe-deploy".variantValue')" = "true" ]; then
|
|
82
|
+
./deploy.sh
|
|
83
|
+
fi
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Destructive commands (`key rotate`, `flags archive`) prompt for confirmation and
|
|
87
|
+
require `--yes` to run non-interactively โ they fail rather than prompt when
|
|
88
|
+
stdin isn't a TTY, so a script can't hang waiting on input.
|
|
89
|
+
|
|
90
|
+
Run `emit-vision --help` for the complete command list, or `emit-vision --version`.
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
- [CLI reference](https://app.emitvision.com/docs/cli) โ every command, flag, and example
|
|
95
|
+
- [Getting started](https://app.emitvision.com/docs/introduction)
|
|
96
|
+
- [Installation & configuration](https://app.emitvision.com/docs/installation)
|
|
97
|
+
- [Browser SDK](https://app.emitvision.com/docs/sdk-js) ยท [Node SDK](https://app.emitvision.com/docs/sdk-node)
|
|
98
|
+
- [Changelog](https://app.emitvision.com/docs/changelog)
|
|
99
|
+
- [Troubleshooting](https://app.emitvision.com/docs/troubleshooting)
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
MIT
|
package/dist/index.js
CHANGED
|
@@ -1461,7 +1461,7 @@ At least one of --name, --description, --environments, --default-variant is requ
|
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
1463
|
// src/index.ts
|
|
1464
|
-
var VERSION = "0.2.
|
|
1464
|
+
var VERSION = "0.2.5";
|
|
1465
1465
|
var [cmd, subcmd, ...rest] = process.argv.slice(2);
|
|
1466
1466
|
async function main() {
|
|
1467
1467
|
if (cmd === "--version" || cmd === "-v") {
|
package/package.json
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emit-vision/cli",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "CLI for
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"description": "CLI for Emit Vision โ query telemetry, manage projects and ingest keys, and control feature flags from the terminal.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"emit-vision",
|
|
10
|
+
"analytics",
|
|
11
|
+
"error-tracking",
|
|
12
|
+
"feature-flags",
|
|
13
|
+
"observability",
|
|
14
|
+
"cli"
|
|
15
|
+
],
|
|
16
|
+
"homepage": "https://github.com/develemit/emit-vision/tree/main/packages/cli#readme",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/develemit/emit-vision.git",
|
|
20
|
+
"directory": "packages/cli"
|
|
21
|
+
},
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/develemit/emit-vision/issues"
|
|
24
|
+
},
|
|
8
25
|
"bin": {
|
|
9
26
|
"emit-vision": "dist/index.js"
|
|
10
27
|
},
|
|
11
28
|
"files": [
|
|
12
29
|
"dist",
|
|
13
|
-
"LICENSE"
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"README.md"
|
|
14
32
|
],
|
|
15
33
|
"scripts": {
|
|
16
34
|
"build": "tsup --config tsup.config.ts",
|