@burdenoff/adaptercloud-cli 2026.825.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/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ Copyright (c) 2025 Burdenoff Consultancy Services Private Limited, Algoshred Technologies Private Limited and all sister companies.
2
+
3
+ All rights reserved.
4
+
5
+ This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without the express written permission of the copyright holders.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+
9
+ For licensing inquiries, please contact: legal@algoshred.com
package/README.md ADDED
@@ -0,0 +1,174 @@
1
+ # @burdenoff/adaptercloud-cli
2
+
3
+ Command-line interface for AdapterCloud — multi-cloud adapter control plane management from the terminal.
4
+
5
+ A thin shell over [`@burdenoff/cli-sdk`](https://www.npmjs.com/package/@burdenoff/cli-sdk): all
6
+ command logic lives in shared SDK modules. This package builds the product `CLIContext`, mounts
7
+ the modules the AdapterCloud surface needs, and wires the Commander program.
8
+
9
+ Talks to the Burdenoff platform via the public GraphQL gateways (global + workspace) with
10
+ dual-token authentication.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ # From npmjs (public)
16
+ npm install -g @burdenoff/adaptercloud-cli
17
+ # or
18
+ bun add -g @burdenoff/adaptercloud-cli
19
+ ```
20
+
21
+ ## Authentication
22
+
23
+ All workspace operations require dual-token auth (platform token + workspace token). The
24
+ workspace token is issued automatically when you set a workspace.
25
+
26
+ ### User Authentication (OAuth2 Device Code)
27
+
28
+ Interactive browser-based login.
29
+
30
+ ```bash
31
+ # Login — opens browser for approval
32
+ adaptercloud auth login
33
+ ```
34
+
35
+ **Production:** The CLI auto-uses `https://graphql.burdenoff.com/global` as the OIDC issuer and
36
+ `burdenoff_cli_adaptercloud` as the client id. Override per-config or via env vars
37
+ (`ADAPTERCLOUD_OIDC_ISSUER`, `ADAPTERCLOUD_WORKSPACE_ENDPOINT`, `ADAPTERCLOUD_GLOBAL_ENDPOINT`).
38
+
39
+ ### Common Auth Commands
40
+
41
+ ```bash
42
+ adaptercloud auth status # Check current auth state
43
+ adaptercloud auth token # Print platform access token
44
+ adaptercloud auth token --workspace # Print workspace token
45
+ adaptercloud auth refresh # Force token refresh
46
+ adaptercloud auth logout # Clear stored tokens
47
+
48
+ adaptercloud workspace list # List available workspaces
49
+ adaptercloud workspace current # Show current workspace
50
+ adaptercloud workspace set <id> # Switch workspace (re-issues token)
51
+ ```
52
+
53
+ Token storage: `~/.config/adaptercloud-cli/auth.json` (mode 0600).
54
+
55
+ ## Commands
56
+
57
+ The CLI mounts the following `@burdenoff/cli-sdk` module groups:
58
+
59
+ ```
60
+ adaptercloud auth Authentication (login, logout, status, token, refresh)
61
+ adaptercloud workspace Workspace context (list, current, set)
62
+ adaptercloud organizations Organization management
63
+ adaptercloud tours Product tours
64
+ adaptercloud rbac Role-based access control
65
+ adaptercloud adaptercloud AdapterCloud control plane (adapters, connections, resources,
66
+ policies, sync-runs, cost, drift, topology, health)
67
+ adaptercloud sandbox Sandbox script execution
68
+ adaptercloud tags Tags
69
+ adaptercloud files Files
70
+ adaptercloud groups Groups
71
+ adaptercloud conversations Conversations
72
+ adaptercloud security Security
73
+ adaptercloud integrations Integrations
74
+ adaptercloud channels Channels
75
+ adaptercloud scheduler Scheduler
76
+ adaptercloud export Data export
77
+ adaptercloud notifications Notifications
78
+ adaptercloud support Support
79
+ adaptercloud products Products / feature flags
80
+ adaptercloud billing Billing
81
+ adaptercloud store Store
82
+ adaptercloud devportal Developer portal
83
+ adaptercloud health Health checks
84
+ ```
85
+
86
+ Run `adaptercloud <command> --help` for subcommand details.
87
+
88
+ ### Quick Examples
89
+
90
+ ```bash
91
+ adaptercloud auth login
92
+ adaptercloud workspace set <id>
93
+ adaptercloud adaptercloud adapters list
94
+ adaptercloud adaptercloud connections list
95
+ adaptercloud tags create --key bug --label Bug
96
+ adaptercloud rbac check <user> read project
97
+ adaptercloud billing subscriptions list
98
+ adaptercloud devportal apps list --status PUBLISHED
99
+ ```
100
+
101
+ ## Configuration
102
+
103
+ CLI settings are stored in `~/.config/adaptercloud-cli/`.
104
+
105
+ **Default endpoints (production):**
106
+ - Workspace gateway: `https://graphqlworkspaces.burdenoff.com/workspaces/graphql`
107
+ - Global gateway: `https://graphql.burdenoff.com/global/graphql`
108
+
109
+ Override per-config or via env vars: `ADAPTERCLOUD_WORKSPACE_ENDPOINT`,
110
+ `ADAPTERCLOUD_GLOBAL_ENDPOINT`, `ADAPTERCLOUD_OIDC_ISSUER`.
111
+
112
+ ## Output Formats
113
+
114
+ All list/get commands support `--format` (`-f`): `json`, `table`, `yaml`.
115
+
116
+ ## Development
117
+
118
+ ### Prerequisites
119
+
120
+ - Bun 1.3.14+
121
+ - Node.js 24.11.0+
122
+ - TypeScript 5.9+
123
+
124
+ ### Setup
125
+
126
+ ```bash
127
+ git clone https://github.com/Algoshred/adaptercloud-cli.git
128
+ cd adaptercloud-cli
129
+ bun install
130
+ ```
131
+
132
+ ### Commands
133
+
134
+ ```bash
135
+ bun run dev # Run CLI in dev mode (tsx)
136
+ bun run dev -- --help # Dev mode with args
137
+ bun run build # Compile TypeScript (tsc + tsc-alias)
138
+ bun run type-check # Type checking
139
+ bun run lint # ESLint
140
+ bun run format # Prettier
141
+ bun run sanity # All checks (format + lint + type-check + build)
142
+ bun run start # Run compiled CLI
143
+ ```
144
+
145
+ ### Project Structure
146
+
147
+ ```
148
+ src/
149
+ cli.ts # Entry point — builds CLIContext, mounts SDK modules, runs program
150
+ product-defaults.ts # AdapterCloud endpoints, OIDC client id, env prefix
151
+ ```
152
+
153
+ All command logic lives in `@burdenoff/cli-sdk` modules. To change behaviour shared across
154
+ product CLIs, edit the SDK (`~/products/cli-sdk/`) and bump the dependency here.
155
+
156
+ ## CI/CD
157
+
158
+ **Every push to main / PRs (CI):** Lint -> Type check -> Build -> CLI smoke (`--help`,
159
+ `--version`). No publish — the gate is green-only.
160
+
161
+ **Release (manual `workflow_dispatch` or CalVer git tag):** Lint -> Type check -> Build ->
162
+ Publish to npmjs (public) -> GitHub Release.
163
+
164
+ Publishing is deliberately gated to the Release workflow; pushes to main do **not**
165
+ auto-publish.
166
+
167
+ CalVer format: `YYYY.MDD.PATCH` (e.g., `2026.626.1`).
168
+
169
+ ## License
170
+
171
+ Proprietary — Burdenoff Consultancy Services Pvt. Ltd.
172
+
173
+ **Author:** Vignesh T.V. (vignesh@burdenoff.com)
174
+ **Repository:** https://github.com/Algoshred/adaptercloud-cli
package/dist/cli.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * AdapterCloud CLI — thin shell over @burdenoff/cli-sdk.
4
+ *
5
+ * All command logic lives in @burdenoff/cli-sdk modules. This file only:
6
+ * 1. Builds a CLIContext with product-specific defaults.
7
+ * 2. Picks which SDK modules to mount.
8
+ * 3. Wires Commander program + central error handler.
9
+ */
10
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,96 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * AdapterCloud CLI — thin shell over @burdenoff/cli-sdk.
4
+ *
5
+ * All command logic lives in @burdenoff/cli-sdk modules. This file only:
6
+ * 1. Builds a CLIContext with product-specific defaults.
7
+ * 2. Picks which SDK modules to mount.
8
+ * 3. Wires Commander program + central error handler.
9
+ */
10
+ import { readFileSync } from 'fs';
11
+ import { join, dirname } from 'path';
12
+ import { fileURLToPath } from 'url';
13
+ import { buildContext, createProgram } from '@burdenoff/cli-sdk/core';
14
+ import authModule from '@burdenoff/cli-sdk/modules/auth';
15
+ import workspacesModule from '@burdenoff/cli-sdk/modules/workspaces';
16
+ import organizationsModule from '@burdenoff/cli-sdk/modules/organizations';
17
+ import toursModule from '@burdenoff/cli-sdk/modules/tours';
18
+ import rbacModule from '@burdenoff/cli-sdk/modules/rbac';
19
+ import adaptercloudModule from '@burdenoff/cli-sdk/modules/adaptercloud';
20
+ import sandboxModule from '@burdenoff/cli-sdk/modules/sandbox';
21
+ import tagsModule from '@burdenoff/cli-sdk/modules/tags';
22
+ import filesModule from '@burdenoff/cli-sdk/modules/files';
23
+ import groupsModule from '@burdenoff/cli-sdk/modules/groups';
24
+ import conversationsModule from '@burdenoff/cli-sdk/modules/conversations';
25
+ import securityModule from '@burdenoff/cli-sdk/modules/security';
26
+ import integrationsModule from '@burdenoff/cli-sdk/modules/integrations';
27
+ import channelsModule from '@burdenoff/cli-sdk/modules/channels';
28
+ import schedulerModule from '@burdenoff/cli-sdk/modules/scheduler';
29
+ import exportModule from '@burdenoff/cli-sdk/modules/export';
30
+ import notificationsModule from '@burdenoff/cli-sdk/modules/notifications';
31
+ import supportModule from '@burdenoff/cli-sdk/modules/support';
32
+ import productsModule from '@burdenoff/cli-sdk/modules/products';
33
+ import billingModule from '@burdenoff/cli-sdk/modules/billing';
34
+ import storeModule from '@burdenoff/cli-sdk/modules/store';
35
+ import devportalModule from '@burdenoff/cli-sdk/modules/devportal';
36
+ import healthModule from '@burdenoff/cli-sdk/modules/health';
37
+ import { productDefaults } from './product-defaults.js';
38
+ const __filename = fileURLToPath(import.meta.url);
39
+ const __dirname = dirname(__filename);
40
+ let version = '0.0.0-dev';
41
+ try {
42
+ const packageJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'));
43
+ if (packageJson.version)
44
+ version = packageJson.version;
45
+ }
46
+ catch {
47
+ // package.json not found in dev mode — use default version
48
+ }
49
+ const ctx = buildContext({
50
+ productName: 'adaptercloud',
51
+ productVersion: version,
52
+ defaults: productDefaults,
53
+ });
54
+ const { run } = createProgram(ctx, [
55
+ authModule,
56
+ workspacesModule,
57
+ organizationsModule,
58
+ toursModule,
59
+ rbacModule,
60
+ adaptercloudModule,
61
+ sandboxModule,
62
+ tagsModule,
63
+ filesModule,
64
+ groupsModule,
65
+ conversationsModule,
66
+ securityModule,
67
+ integrationsModule,
68
+ channelsModule,
69
+ schedulerModule,
70
+ exportModule,
71
+ notificationsModule,
72
+ supportModule,
73
+ productsModule,
74
+ billingModule,
75
+ storeModule,
76
+ devportalModule,
77
+ healthModule,
78
+ ], {
79
+ name: 'adaptercloud',
80
+ description: 'AdapterCloud CLI — full adaptercloud-app surface',
81
+ version,
82
+ helpExamples: [
83
+ '$ adaptercloud auth login # OAuth2 Device Code login',
84
+ '$ adaptercloud workspace set <id> # Pick workspace',
85
+ '$ adaptercloud adaptercloud adapters list # AdapterCloud adapters',
86
+ '$ adaptercloud tags create --key bug --label Bug # Tags',
87
+ '$ adaptercloud rbac check <user> read project # RBAC',
88
+ '$ adaptercloud products feature-flags list # Feature flags',
89
+ '$ adaptercloud billing subscriptions list # Billing',
90
+ '$ adaptercloud devportal apps list --status PUBLISHED',
91
+ '',
92
+ 'Configuration: ~/.config/adaptercloud-cli/',
93
+ 'Documentation: https://adaptercloud.com/docs/cli',
94
+ ],
95
+ });
96
+ run();
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Product-specific defaults injected into CLIContext via buildContext().
3
+ * Anything specific to "adaptercloud" (vs other product CLIs) lives here.
4
+ *
5
+ * Defaults point at PROD. Dev users override per-config or via env vars:
6
+ * ADAPTERCLOUD_WORKSPACE_ENDPOINT, ADAPTERCLOUD_GLOBAL_ENDPOINT, ADAPTERCLOUD_OIDC_ISSUER.
7
+ */
8
+ import type { ProductDefaults } from '@burdenoff/cli-sdk/core';
9
+ export declare const productDefaults: ProductDefaults;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Product-specific defaults injected into CLIContext via buildContext().
3
+ * Anything specific to "adaptercloud" (vs other product CLIs) lives here.
4
+ *
5
+ * Defaults point at PROD. Dev users override per-config or via env vars:
6
+ * ADAPTERCLOUD_WORKSPACE_ENDPOINT, ADAPTERCLOUD_GLOBAL_ENDPOINT, ADAPTERCLOUD_OIDC_ISSUER.
7
+ */
8
+ export const productDefaults = {
9
+ configDirName: 'adaptercloud-cli',
10
+ oidcClientId: 'burdenoff_cli_adaptercloud',
11
+ oidcIssuerProd: 'https://graphql.burdenoff.com/global',
12
+ workspaceEndpointDefault: 'https://graphqlworkspaces.burdenoff.com/workspaces/graphql',
13
+ globalEndpointDefault: 'https://graphql.burdenoff.com/global/graphql',
14
+ envPrefix: 'ADAPTERCLOUD',
15
+ };
package/package.json ADDED
@@ -0,0 +1,103 @@
1
+ {
2
+ "name": "@burdenoff/adaptercloud-cli",
3
+ "version": "2026.825.1",
4
+ "description": "CLI tool for AdapterCloud — multi-cloud adapter control plane management",
5
+ "type": "module",
6
+ "private": false,
7
+ "main": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "bin": {
10
+ "adaptercloud": "dist/cli.js"
11
+ },
12
+ "files": [
13
+ "dist",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc && tsc-alias",
18
+ "build:watch": "tsc -w",
19
+ "dev": "tsx src/cli.ts",
20
+ "test": "vitest",
21
+ "test:coverage": "vitest --coverage",
22
+ "test:ui": "vitest --ui",
23
+ "lint": "eslint src --fix",
24
+ "lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
25
+ "lint:check": "eslint src",
26
+ "format": "prettier --write \"src/**/*.{ts,js,json,md}\"",
27
+ "format:check": "prettier --check \"src/**/*.{ts,js,json,md}\"",
28
+ "type-check": "bash scripts/build-limits.sh tsc --noEmit",
29
+ "clean": "rimraf dist",
30
+ "sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run format && bun run lint:sanity && bun run type-check && bun run test && bun run build'",
31
+ "prepublishOnly": "bun run clean && bun run build",
32
+ "start": "bun dist/cli.js",
33
+ "publish:npm": "bun run build && bunx npm@latest publish --registry https://registry.npmjs.org/ --access public"
34
+ },
35
+ "keywords": [
36
+ "adaptercloud",
37
+ "cli",
38
+ "graphql",
39
+ "typescript",
40
+ "multi-cloud-control-plane"
41
+ ],
42
+ "author": {
43
+ "name": "Vignesh T.V",
44
+ "url": "https://github.com/tvvignesh"
45
+ },
46
+ "license": "UNLICENSED",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/Algoshred/adaptercloud-cli.git"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/Algoshred/adaptercloud-cli/issues"
53
+ },
54
+ "homepage": "https://github.com/Algoshred/adaptercloud-cli#readme",
55
+ "publishConfig": {
56
+ "access": "public",
57
+ "registry": "https://registry.npmjs.org/"
58
+ },
59
+ "dependencies": {
60
+ "@burdenoff/cli-sdk": "2026.825.2",
61
+ "commander": "^14.0.3",
62
+ "graphql": "^16.13.2",
63
+ "graphql-request": "^7.4.0"
64
+ },
65
+ "devDependencies": {
66
+ "@types/node": "^24.12.2",
67
+ "@typescript-eslint/eslint-plugin": "^8.58.0",
68
+ "@typescript-eslint/parser": "^8.58.0",
69
+ "@vitest/coverage-v8": "^3.2.4",
70
+ "@vitest/ui": "^3.2.4",
71
+ "eslint": "^9.39.4",
72
+ "eslint-config-prettier": "^10.1.8",
73
+ "eslint-plugin-prettier": "^5.5.5",
74
+ "globals": "^16.5.0",
75
+ "prettier": "^3.8.1",
76
+ "rimraf": "^6.1.3",
77
+ "tsc-alias": "^1.8.16",
78
+ "tsx": "^4.21.0",
79
+ "typescript": "^5.9.3",
80
+ "vitest": "^3.2.4"
81
+ },
82
+ "engines": {
83
+ "node": ">=24.11.0",
84
+ "bun": ">=1.3.14"
85
+ },
86
+ "overrides": {
87
+ "lodash": ">=4.17.21",
88
+ "lodash-es": ">=4.17.21",
89
+ "dompurify": ">=3.3.4",
90
+ "fast-xml-parser": ">=4.5.5",
91
+ "@xmldom/xmldom": ">=0.8.12",
92
+ "swiper": ">=12.1.2",
93
+ "brace-expansion": ">=1.1.13",
94
+ "follow-redirects": ">=1.15.12",
95
+ "smol-toml": ">=1.6.1",
96
+ "axios": ">=1.15.0",
97
+ "flatted": ">=3.4.1",
98
+ "yaml": ">=2.8.3",
99
+ "picomatch": ">=2.3.2",
100
+ "immutable": ">=3.8.3",
101
+ "minimatch": ">=3.1.3"
102
+ }
103
+ }