@glubean/cli 0.1.67 → 0.1.69

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.
Files changed (2) hide show
  1. package/README.md +175 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,175 @@
1
+ # @glubean/cli
2
+
3
+ The Glubean command-line tool. Run tests, sync results to Cloud, scaffold projects, manage environments.
4
+
5
+ ```bash
6
+ npm install -g glubean
7
+ ```
8
+
9
+ Or invoke once without installing:
10
+
11
+ ```bash
12
+ npx glubean <command>
13
+ ```
14
+
15
+ Both `glubean` and the short alias `gb` are installed.
16
+
17
+ ## Quick start
18
+
19
+ ```bash
20
+ glubean init # interactive wizard
21
+ glubean run # run all tests in testDir
22
+ glubean run path/to/file.test.ts
23
+ glubean run --filter checkout --tag smoke
24
+ glubean run --ci --upload # CI mode + push results to Cloud
25
+ ```
26
+
27
+ See the full project README at the [repo root](../../README.md) for the broader Glubean story (SDK, MCP, agent workflow).
28
+
29
+ ## Commands
30
+
31
+ ### `init`
32
+
33
+ Scaffold a new Glubean project. The interactive wizard asks what mode you want and writes the right config.
34
+
35
+ ```bash
36
+ glubean init
37
+ glubean init --contract-first # contracts/ + tests/ layout
38
+ glubean init --ai-tools # also configure MCP server + AI skill
39
+ glubean init --hooks --github-actions # git hooks + CI workflow
40
+ glubean init --no-interactive --base-url https://api.example.com
41
+ ```
42
+
43
+ ### `run [target]`
44
+
45
+ Run tests from a file, a directory, or a glob. Defaults to the project's `testDir`.
46
+
47
+ ```bash
48
+ glubean run # everything in testDir
49
+ glubean run tests/checkout.test.ts # one file
50
+ glubean run tests/checkout # one directory
51
+ glubean run --explore # use exploreDir instead of testDir
52
+ glubean run --filter login # name or id substring
53
+ glubean run --tag smoke,critical # by tag (comma or repeatable)
54
+ glubean run --tag-mode and # all tags must match
55
+ glubean run --pick happyPath # specific test.pick example
56
+ glubean run --fail-fast # stop on first failure
57
+ glubean run --result-json # write .result.json
58
+ glubean run --reporter junit # JUnit XML
59
+ glubean run --ci # shorthand: --fail-fast + JUnit
60
+ glubean run --upload --project <id> # push to Glubean Cloud
61
+ glubean run --inspect-brk # attach a debugger
62
+ ```
63
+
64
+ Useful flags:
65
+
66
+ | Flag | Effect |
67
+ |------|--------|
68
+ | `--env-file <path>` | Load a specific `.env` file |
69
+ | `--config <paths>` | One or more config files (comma-separated or repeatable) |
70
+ | `--verbose` | Show traces and assertions inline |
71
+ | `--log-file` | Write per-test logs to disk |
72
+ | `--emit-full-trace` | Include full headers and bodies in HTTP traces |
73
+ | `--infer-schema` | Infer JSON Schema from response bodies |
74
+ | `--trace-limit <n>` | Cap trace files per test (default 20) |
75
+ | `--meta key=value` | Attach custom metadata to the run (repeatable) |
76
+ | `--no-session` | Skip session setup/teardown |
77
+ | `--no-update-check` | Skip the npm update check |
78
+
79
+ ### `scan`
80
+
81
+ Statically analyze a directory and emit `metadata.json` describing the test suite (used by IDE integrations and Cloud upload). Also extracts contract metadata when `.contract.ts` files are present.
82
+
83
+ ```bash
84
+ glubean scan tests/
85
+ glubean scan --upload --project <id> # push contract metadata without running
86
+ ```
87
+
88
+ ### `validate-metadata`
89
+
90
+ Verify that a previously generated `metadata.json` still matches the local files.
91
+
92
+ ```bash
93
+ glubean validate-metadata metadata.json
94
+ ```
95
+
96
+ ### `login`
97
+
98
+ Authenticate with Glubean Cloud. Stores a token under `~/.glubean/`.
99
+
100
+ ```bash
101
+ glubean login
102
+ ```
103
+
104
+ ### `patch <spec>`
105
+
106
+ Merge an OpenAPI spec with a sibling `.patch.yaml` and write the resolved spec.
107
+
108
+ ```bash
109
+ glubean patch openapi.yaml
110
+ ```
111
+
112
+ ### `spec split <spec>`
113
+
114
+ Dereference all `$ref`s and split a spec into per-endpoint files. Useful for feeding individual endpoints to an agent.
115
+
116
+ ```bash
117
+ glubean spec split openapi.yaml
118
+ ```
119
+
120
+ ### `redact`
121
+
122
+ Preview how the redaction policy would transform a `.result.json` before uploading.
123
+
124
+ ```bash
125
+ glubean redact tests/checkout.result.json
126
+ ```
127
+
128
+ ### `config mcp`
129
+
130
+ Install and configure the Glubean MCP server for your editor (Claude Code, Cursor, Windsurf, and others). Auto-detects installed tools.
131
+
132
+ ```bash
133
+ glubean config mcp
134
+ ```
135
+
136
+ ### `env`
137
+
138
+ Manage which `.env.<name>` file is active for `glubean run`.
139
+
140
+ ```bash
141
+ glubean env list # show available environments
142
+ glubean env use staging # activate .env.staging
143
+ glubean env # print current active env
144
+ glubean env reset # clear active env (use default .env)
145
+ ```
146
+
147
+ ### `upgrade`
148
+
149
+ Self-upgrade to the latest published version.
150
+
151
+ ```bash
152
+ glubean upgrade
153
+ ```
154
+
155
+ ## Environment variables
156
+
157
+ | Variable | Purpose |
158
+ |----------|---------|
159
+ | `GLUBEAN_CWD` | Override the working directory (useful for shell aliases) |
160
+ | `GLUBEAN_PROJECT_ID` | Default Cloud project for `--upload` |
161
+ | `GLUBEAN_TOKEN` | Auth token for Cloud (alternative to `glubean login`) |
162
+ | `GLUBEAN_API_URL` | Override the Cloud API URL |
163
+
164
+ ## Exit codes
165
+
166
+ | Code | Meaning |
167
+ |------|---------|
168
+ | `0` | Success |
169
+ | `1` | Test failure or CLI error |
170
+
171
+ ## Links
172
+
173
+ - [Glubean repo](https://github.com/glubean/glubean) — SDK, runner, scanner, plugins
174
+ - [Docs](https://docs.glubean.com) — full documentation
175
+ - [Cloud](https://app.glubean.com) — hosted run history and analytics
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glubean/cli",
3
- "version": "0.1.67",
3
+ "version": "0.1.69",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "glubean": "./bin/gb.js"
@@ -27,9 +27,9 @@
27
27
  "dotenv": "^16.4.0",
28
28
  "yaml": "^2.7.0",
29
29
  "tsx": "^4.19.0",
30
- "@glubean/sdk": "0.1.28",
31
- "@glubean/runner": "0.1.40",
32
- "@glubean/scanner": "0.1.28",
30
+ "@glubean/sdk": "0.1.30",
31
+ "@glubean/scanner": "0.1.29",
32
+ "@glubean/runner": "0.1.42",
33
33
  "@glubean/redaction": "0.1.27"
34
34
  },
35
35
  "devDependencies": {