@burdenoff/bigconsole-cli 2026.802.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,235 +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
- ### Global Installation (Alpha/Pre-release)
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 -g @burdenoff/alpha-bigconsole-cli
14
+ bigconsole --version
26
15
  ```
27
16
 
28
- ### Local Installation
17
+ ## Configuration
29
18
 
30
- ```bash
31
- npm install @burdenoff/bigconsole-cli
32
- ```
19
+ The CLI targets **production** by default:
33
20
 
34
- ## Configuration
21
+ | Setting | Default |
22
+ |---|---|
23
+ | `workspaceEndpoint` | `https://graphqlworkspaces.burdenoff.com/workspaces/graphql` |
24
+ | `globalEndpoint` | `https://graphql.burdenoff.com/global/graphql` |
35
25
 
36
- Configure the API endpoint:
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
30
  ```bash
39
- bigconsole config set apiEndpoint http://localhost:8000/graphql
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
40
35
  ```
41
36
 
42
- ## Authentication
37
+ Local stack example:
43
38
 
44
- ### Login with credentials
45
39
  ```bash
46
- bigconsole auth login
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
47
43
  ```
48
44
 
49
- ### Login with token
50
- ```bash
51
- bigconsole auth login --token <your-access-token>
52
- ```
45
+ ## Authentication
53
46
 
54
- ### Check authentication status
55
47
  ```bash
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)
56
50
  bigconsole auth status
57
- ```
58
-
59
- ### Logout
60
- ```bash
51
+ bigconsole auth token [--workspace] # print a token to stdout
52
+ bigconsole auth refresh
61
53
  bigconsole auth logout
62
54
  ```
63
55
 
64
- ### Change password
65
- ```bash
66
- bigconsole auth change-password
67
- ```
68
-
69
- ## User Management
70
-
71
- ### List users
72
- ```bash
73
- bigconsole users list
74
- bigconsole users list --page 2 --limit 20
75
- ```
76
-
77
- ### Get user details
78
- ```bash
79
- bigconsole users get <user-id>
80
- ```
81
-
82
- ### Create a user
83
- ```bash
84
- bigconsole users create
85
- bigconsole users create --email user@example.com --password password123 --fullName "John Doe"
86
- ```
87
-
88
- ### Update a user
89
- ```bash
90
- bigconsole users update <user-id> --email newemail@example.com
91
- bigconsole users update <user-id> --active
92
- bigconsole users update <user-id> --superuser
93
- ```
94
-
95
- ### Delete a user
96
- ```bash
97
- bigconsole users delete <user-id>
98
- bigconsole users delete <user-id> --force
99
- ```
100
-
101
- ## Configuration Management
56
+ Device-code login lists your workspaces and asks which one to use. Switch later with
57
+ `bigconsole workspace set <workspace-uuid>`.
102
58
 
103
- ### View all configuration
104
- ```bash
105
- bigconsole config get
106
- ```
107
-
108
- ### Get specific configuration
109
- ```bash
110
- bigconsole config get apiEndpoint
111
- ```
112
-
113
- ### Set configuration
114
- ```bash
115
- bigconsole config set apiEndpoint http://localhost:8000/graphql
116
- bigconsole config set outputFormat table
117
- ```
118
-
119
- ### Delete configuration
120
- ```bash
121
- bigconsole config delete accessToken
122
- ```
59
+ ## Commands
123
60
 
124
- ### Clear all configuration
125
- ```bash
126
- bigconsole config clear
127
- ```
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` |
128
76
 
129
- ### Show config file path
130
- ```bash
131
- bigconsole config path
132
- ```
77
+ Run `bigconsole <group> <command> --help` for the exact options. Notes:
133
78
 
134
- ## 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}'`.
135
91
 
136
- All commands support different output formats:
92
+ Example workflow:
137
93
 
138
94
  ```bash
139
- bigconsole users list --format json
140
- bigconsole users list --format table
141
- bigconsole users list --format yaml
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'
142
99
  ```
143
100
 
144
- ## Global Options
145
-
146
- - `--endpoint <endpoint>`: Override the API endpoint for a single command
147
- - `--token <token>`: Override the access token for a single command
148
- - `--format <format>`: Set output format (json, table, yaml)
149
- - `--verbose`: Enable verbose logging
150
-
151
- ## Examples
152
-
153
- ```bash
154
- # Set up the CLI
155
- bigconsole config set apiEndpoint http://localhost:8000/graphql
156
-
157
- # Login
158
- bigconsole auth login
101
+ ## Output formats
159
102
 
160
- # List all users in table format
161
- bigconsole users list --format table
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`.
162
106
 
163
- # Create a new user
164
- bigconsole users create --email admin@example.com --password admin123 --superuser
165
-
166
- # Check authentication status
167
- bigconsole auth status
168
-
169
- # Get help for any command
170
- bigconsole auth --help
171
- bigconsole users --help
172
- ```
107
+ Errors are a single bounded line. Request variables, headers and response bodies are never
108
+ printed, and credential-shaped values are masked.
173
109
 
174
110
  ## Development
175
111
 
176
- ```bash
177
- # Install dependencies
178
- npm install
179
-
180
- # Build the project
181
- npm run build
182
-
183
- # Run in development mode
184
- npm run dev
112
+ Requires Bun `>= 1.4.4` (see `.bun-version`; older Bun cannot read `bun.lock`) and Node `>= 24.11`.
185
113
 
186
- # Run tests
187
- npm test
188
-
189
- # Lint code
190
- 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
191
121
  ```
192
122
 
193
- ## Configuration File
194
-
195
- The CLI stores configuration in `~/.config/bigconsole-cli/config.json`. This includes:
196
-
197
- - `apiEndpoint`: The GraphQL API endpoint
198
- - `outputFormat`: Default output format (json, table, yaml)
199
- - `accessToken`: Authentication token
200
- - `refreshToken`: Refresh token for authentication
201
-
202
- ## CI/CD
123
+ See [docs/TESTING.md](./docs/TESTING.md) for end-to-end testing.
203
124
 
204
- The project includes automated CI/CD pipelines:
125
+ ### Schema contract
205
126
 
206
- - **Alpha builds** - Published to `@burdenoff/alpha-bigconsole-cli` from `alpha` branch
207
- - **Production builds** - Published to `@burdenoff/bigconsole-cli` from `main` branch
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.
208
132
 
209
- ## Testing
133
+ ## Releasing
210
134
 
211
- 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.
212
139
 
213
140
  ## Security
214
141
 
215
- - Tokens are stored securely in user configuration directory
216
- - No sensitive information is logged in verbose mode
217
- - All API communication uses HTTPS
218
- - Input validation prevents injection attacks
219
-
220
- ## Contributing
221
-
222
- 1. Fork the repository
223
- 2. Create a feature branch
224
- 3. Make your changes
225
- 4. Add tests for new functionality
226
- 5. Ensure all tests pass
227
- 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.
228
144
 
229
145
  ## License
230
146
 
231
- UNLICENSED - Private package for internal use
232
-
233
- ---
234
-
235
- 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
  */