@burdenoff/bigconsole-cli 2026.1029.1 → 2026.1110.1

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
@@ -1,263 +1,147 @@
1
- # Bigconsole Cli
1
+ # bigconsole-cli
2
2
 
3
- A powerful command-line interface for managing bigconsole operations with GraphQL backend integration.
3
+ Command-line client for the BigConsole platform (`@burdenoff/bigconsole-cli`, binary `bigconsole`).
4
+ It manages dashboards, widgets, DataSinks, parsers, pipelines and workflows through the
5
+ BigConsole GraphQL gateways.
4
6
 
5
- ## Features
6
-
7
- - 🔐 **Authentication Management** - Login, logout, and status checking
8
- - 👥 **User Management** - CRUD operations for user accounts
9
- - ⚙️ **Configuration Management** - Easy setup and configuration
10
- - 📊 **Multiple Output Formats** - JSON, table, and YAML output
11
- - 🛡️ **Type Safety** - Built with TypeScript for reliability
12
- - 🎨 **Rich CLI Experience** - Colorful output and interactive prompts
13
-
14
- ## Installation
15
-
16
- ### Global Installation (Production)
7
+ ## Install
17
8
 
18
9
  ```bash
19
- npm install -g @burdenoff/bigconsole-cli
20
- ```
21
-
22
- ### Local Installation
10
+ npm install -g @burdenoff/bigconsole-cli # Node >= 24.11
11
+ # or
12
+ bun install -g @burdenoff/bigconsole-cli
23
13
 
24
- ```bash
25
- npm install @burdenoff/bigconsole-cli
14
+ bigconsole --version
26
15
  ```
27
16
 
28
17
  ## Configuration
29
18
 
30
- Configure the API endpoint:
19
+ The CLI targets **production** by default:
31
20
 
32
- ```bash
33
- bigconsole config set apiEndpoint http://localhost:8000/graphql
34
- ```
21
+ | Setting | Default |
22
+ |---|---|
23
+ | `workspaceEndpoint` | `https://graphqlworkspaces.burdenoff.com/workspaces/graphql` |
24
+ | `globalEndpoint` | `https://graphql.burdenoff.com/global/graphql` |
35
25
 
36
- ## Authentication
26
+ Override with environment variables (`BIGCONSOLE_WORKSPACE_ENDPOINT`,
27
+ `BIGCONSOLE_GLOBAL_ENDPOINT`, `BIGCONSOLE_OIDC_ISSUER`, `BIGCONSOLE_CLIENT_ID`) or persist values
28
+ in `~/.config/bigconsole-cli/config.json`. Values in the file win over environment variables.
37
29
 
38
- ### Login with credentials
39
30
  ```bash
40
- bigconsole auth login
31
+ bigconsole cli-config show
32
+ bigconsole cli-config set workspaceEndpoint http://localhost:4003/workspaces/graphql
33
+ bigconsole cli-config path
34
+ bigconsole cli-config reset
41
35
  ```
42
36
 
43
- ### Login with token
44
- ```bash
45
- bigconsole auth login --token <your-access-token>
46
- ```
47
-
48
- ### Check authentication status
49
- ```bash
50
- bigconsole auth status
51
- ```
52
-
53
- ### Logout
54
- ```bash
55
- bigconsole auth logout
56
- ```
37
+ Local stack example:
57
38
 
58
- ### Change password
59
39
  ```bash
60
- bigconsole auth change-password
40
+ export BIGCONSOLE_WORKSPACE_ENDPOINT=http://localhost:4003/workspaces/graphql
41
+ export BIGCONSOLE_GLOBAL_ENDPOINT=http://localhost:4000/global/graphql
42
+ export BIGCONSOLE_OIDC_ISSUER=http://localhost:4000/global
61
43
  ```
62
44
 
63
- ## User Management
64
-
65
- ### List users
66
- ```bash
67
- bigconsole users list
68
- bigconsole users list --page 2 --limit 20
69
- ```
70
-
71
- ### Get user details
72
- ```bash
73
- bigconsole users get <user-id>
74
- ```
75
-
76
- ### Create a user
77
- ```bash
78
- bigconsole users create
79
- bigconsole users create --email user@example.com --password password123 --fullName "John Doe"
80
- ```
81
-
82
- ### Update a user
83
- ```bash
84
- bigconsole users update <user-id> --email newemail@example.com
85
- bigconsole users update <user-id> --active
86
- bigconsole users update <user-id> --superuser
87
- ```
88
-
89
- ### Delete a user
90
- ```bash
91
- bigconsole users delete <user-id>
92
- bigconsole users delete <user-id> --force
93
- ```
94
-
95
- ## Configuration Management
96
-
97
- ### View all configuration
98
- ```bash
99
- bigconsole config get
100
- ```
45
+ ## Authentication
101
46
 
102
- ### Get specific configuration
103
47
  ```bash
104
- bigconsole config get apiEndpoint
48
+ bigconsole auth login # OAuth2 device-code flow (opens a browser)
49
+ bigconsole auth login --client-credentials --workspace-id <id> # app login (prompts for client id/secret)
50
+ bigconsole auth status
51
+ bigconsole auth token [--workspace] # print a token to stdout
52
+ bigconsole auth refresh
53
+ bigconsole auth logout
105
54
  ```
106
55
 
107
- ### Set configuration
108
- ```bash
109
- bigconsole config set apiEndpoint http://localhost:8000/graphql
110
- bigconsole config set outputFormat table
111
- ```
56
+ Device-code login lists your workspaces and asks which one to use. Switch later with
57
+ `bigconsole workspace set <workspace-uuid>`.
112
58
 
113
- ### Delete configuration
114
- ```bash
115
- bigconsole config delete accessToken
116
- ```
59
+ ## Commands
117
60
 
118
- ### Clear all configuration
119
- ```bash
120
- bigconsole config clear
121
- ```
61
+ | Group | Subcommands |
62
+ |---|---|
63
+ | `auth` | `login`, `logout`, `status`, `token`, `refresh` |
64
+ | `cli-config` | `show`, `path`, `get`, `set`, `reset` |
65
+ | `workspace` | `list`, `current`, `set` |
66
+ | `dashboard` | `list`, `get`, `create`, `update`, `archive`, `delete`, `import`, `export` |
67
+ | `widget` | `list`, `get`, `create`, `update`, `delete` |
68
+ | `datasink` | `list`, `get`, `data`, `create`, `update`, `delete` |
69
+ | `parser` | `list`, `get`, `create`, `update`, `delete` |
70
+ | `pipeline` | `list`, `get`, `create`, `update`, `delete` |
71
+ | `workflow` | `list`, `get` |
72
+ | `drilldown` | `list`, `delete` |
73
+ | `share` | `list` |
74
+ | `template` | `list`, `get` |
75
+ | `prompt` | `generate`, `list`, `get`, `cancel` |
122
76
 
123
- ### Show config file path
124
- ```bash
125
- bigconsole config path
126
- ```
77
+ Run `bigconsole <group> <command> --help` for the exact options. Notes:
127
78
 
128
- ## Output Formats
79
+ - `get`, `update`, `delete` take the id as a positional argument. `datasink get`/`datasink data`
80
+ take `--id` or `--key`.
81
+ - `widget`, `parser`, `pipeline` and `share` list commands need their parent:
82
+ `widget list --page <pageId>`, `parser list --console <dashboardId>`,
83
+ `pipeline list --console <dashboardId>`, `share list --dashboard <id>`.
84
+ - `parser update` and `pipeline update` require `--version <n>` (the current version, for
85
+ optimistic locking). `datasink update` reads it for you unless you pass `--version`.
86
+ - Enum values: dashboard `--category` is `CUSTOM | EXECUTIVE | FINANCIAL | HR | MARKETING |
87
+ OPERATIONS | SALES`; `--layout` is `GRID | FLEX | TABS`; `--visibility` is
88
+ `PRIVATE | WORKSPACE | PUBLIC`; parser `--type` is `jq | jsonata`; parser and pipeline
89
+ statuses are lowercase.
90
+ - `widget create` needs `--position-json '{"x":0,"y":0,"width":4,"height":2}'`.
129
91
 
130
- All commands support different output formats:
92
+ Example workflow:
131
93
 
132
94
  ```bash
133
- bigconsole users list --format json
134
- bigconsole users list --format table
135
- bigconsole users list --format yaml # `yml` is accepted as an alias
95
+ bigconsole datasink create --key sales --name "Sales" --data-json '{"items":[{"value":1}]}'
96
+ bigconsole dashboard create --name "Q4 Overview" --category EXECUTIVE
97
+ bigconsole parser create --name total --console <dashboardId> --input-key sales \
98
+ --output-key total --type jsonata --expression 'items[0].value'
136
99
  ```
137
100
 
138
- - **stdout carries only command data.** Status lines (`✓`, `ℹ`, `!`, `✗`) are
139
- written to stderr, so `--format json|yaml` output can be piped straight into
140
- `jq` / `yq`.
141
- - **JSON** is standard `JSON.stringify` output; C1 control characters, line and
142
- paragraph separators and bidirectional formatting characters are written as
143
- `\uXXXX` escapes (the parsed data is unchanged).
144
- - **YAML** is produced by js-yaml with the YAML 1.2 JSON schema. Strings that a
145
- YAML 1.1 or 1.2 parser could read as another type (`yes`, `~`, `0x1F`,
146
- `2026-01-01`, ...) are quoted, so the output parses back to the same data.
147
- - **Tables** are for people: control sequences are removed, line breaks and tabs
148
- are shown as spaces, and bidirectional formatting characters are shown as
149
- `\uXXXX`.
150
- - **Errors** are a single bounded line. Failed requests report the HTTP status,
151
- the server's first GraphQL error and its code; request variables, headers and
152
- response bodies are never printed, and credential-shaped values are masked.
153
-
154
- ## Global Options
155
-
156
- - `--endpoint <endpoint>`: Override the API endpoint for a single command
157
- - `--token <token>`: Override the access token for a single command
158
- - `--format <format>`: Set output format (json, table, yaml)
159
- - `--verbose`: Enable verbose logging
160
-
161
- ## Examples
162
-
163
- ```bash
164
- # Set up the CLI
165
- bigconsole config set apiEndpoint http://localhost:8000/graphql
101
+ ## Output formats
166
102
 
167
- # Login
168
- bigconsole auth login
169
-
170
- # List all users in table format
171
- bigconsole users list --format table
172
-
173
- # Create a new user
174
- bigconsole users create --email admin@example.com --password admin123 --superuser
175
-
176
- # Check authentication status
177
- bigconsole auth status
103
+ `-f, --format json|table|yaml` (`yml` is accepted). Data goes to stdout; status lines go to
104
+ stderr, so JSON and YAML pipe cleanly into `jq` / `yq`. Other global options: `--verbose`,
105
+ `--no-color`, `-v, --version`.
178
106
 
179
- # Get help for any command
180
- bigconsole auth --help
181
- bigconsole users --help
182
- ```
107
+ Errors are a single bounded line. Request variables, headers and response bodies are never
108
+ printed, and credential-shaped values are masked.
183
109
 
184
110
  ## Development
185
111
 
186
- ```bash
187
- # Install dependencies
188
- npm install
189
-
190
- # Build the project
191
- npm run build
192
-
193
- # Run in development mode
194
- npm run dev
195
-
196
- # Run tests
197
- npm test
112
+ Requires Bun `>= 1.4.4` (see `.bun-version`; older Bun cannot read `bun.lock`) and Node `>= 24.11`.
198
113
 
199
- # Lint code
200
- npm run lint
114
+ ```bash
115
+ bun install --frozen-lockfile
116
+ bun run dev # run from source with watch
117
+ bun run build
118
+ bun run test # builds first, then bun test
119
+ bun run lint
120
+ bun run sanity # format, lint, typecheck, build, test, knip
201
121
  ```
202
122
 
203
- ## Configuration File
204
-
205
- The CLI stores configuration in `~/.config/bigconsole-cli/config.json`. This includes:
206
-
207
- - `apiEndpoint`: The GraphQL API endpoint
208
- - `outputFormat`: Default output format (json, table, yaml)
209
- - `accessToken`: Authentication token
210
- - `refreshToken`: Refresh token for authentication
211
-
212
- ## Releasing
213
-
214
- `main` is the only branch. The **Publish Production** workflow
215
- (`.github/workflows/publish-production.yml`) publishes it to npmjs:
216
-
217
- 1. Bump `version` in `package.json` (CalVer `YYYY.MDD.PATCH`, e.g. `2026.1029.1`)
218
- and add a `CHANGELOG.md` entry.
219
- 2. Push to `main`. The `build` job lints, type-checks, tests, builds and packs
220
- the CLI; the `publish` job (environment `Production`, org secret `NPM_TOKEN`)
221
- publishes the tarball with dist-tags `latest` and `dev`.
222
- 3. A version that is already on the registry is skipped, so a push without a
223
- version bump publishes nothing. The workflow can be re-run from `main`
224
- (workflow_dispatch).
225
-
226
- The former `@burdenoff/alpha-bigconsole-cli` channel and its `alpha` branch are
227
- retired.
123
+ See [docs/TESTING.md](./docs/TESTING.md) for end-to-end testing.
228
124
 
229
125
  ### Schema contract
230
126
 
231
- `tests/unit/graphql/schema-contract.test.ts` validates every workspace operation
232
- in `src/graphql/operations.ts` against `graphql/bigconsole-subgraph.graphql`,
233
- the SDL that wspace-bigconsole-svc publishes to Hive. When the service schema
234
- changes, run `bun run schema:pull` (needs `gh` with read access to the service
235
- repo) and fix any operation the test rejects.
127
+ `tests/unit/graphql/schema-contract.test.ts` validates every workspace operation in
128
+ `src/graphql/operations.ts` against `graphql/bigconsole-subgraph.graphql`, the SDL that
129
+ wspace-bigconsole-svc publishes to Hive. When the service schema changes, run
130
+ `bun run schema:pull` (needs `gh` with read access to the service repo) and fix any operation the
131
+ test rejects.
236
132
 
237
- ## Testing
133
+ ## Releasing
238
134
 
239
- See [TESTING.md](./TESTING.md) for comprehensive testing instructions before publishing.
135
+ Releases go through `.github/workflows/release.yml` only. Run it from the Actions tab (empty
136
+ version = next free CalVer patch; `dry-run` runs every gate and publishes nothing) or push a
137
+ CalVer tag (`git tag 2026.1107.1 && git push origin 2026.1107.1`). A plain push to `main` does not
138
+ publish.
240
139
 
241
140
  ## Security
242
141
 
243
- - Tokens are stored securely in user configuration directory
244
- - No sensitive information is logged in verbose mode
245
- - All API communication uses HTTPS
246
- - Input validation prevents injection attacks
247
-
248
- ## Contributing
249
-
250
- 1. Fork the repository
251
- 2. Create a feature branch
252
- 3. Make your changes
253
- 4. Add tests for new functionality
254
- 5. Ensure all tests pass
255
- 6. Submit a pull request
142
+ - Tokens live in `~/.config/bigconsole-cli/` (files mode 0600).
143
+ - Production and alpha endpoints use HTTPS. Local development endpoints may use plain HTTP.
256
144
 
257
145
  ## License
258
146
 
259
- UNLICENSED - Private package for internal use
260
-
261
- ---
262
-
263
- Built with ❤️ by [Vignesh T.V](https://github.com/tvvignesh)
147
+ UNLICENSED - Burdenoff Consultancy Services Pvt. Ltd.
@@ -36,10 +36,6 @@ export declare function isTokenExpired(auth: StoredAuth): boolean;
36
36
  * Check if the stored token is expiring within the next 5 minutes.
37
37
  */
38
38
  export declare function isTokenExpiringSoon(auth: StoredAuth): boolean;
39
- /**
40
- * Check if the workspace token has expired.
41
- */
42
- export declare function isWorkspaceTokenExpired(auth: StoredAuth): boolean;
43
39
  /**
44
40
  * Check if the workspace token is expiring within the next 5 minutes.
45
41
  */