@cfoundry/cli 0.0.0-stage → 2026.1201.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 +9 -0
- package/README.md +173 -2
- package/dist/cli.js +98 -0
- package/package.json +103 -4
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
CHANGED
|
@@ -1,3 +1,174 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @cfoundry/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command-line interface for Crewfoundry — unified people platform & workforce control plane 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 Crewfoundry 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 @cfoundry/cli
|
|
17
|
+
# or
|
|
18
|
+
bun add -g @cfoundry/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
|
+
crewfoundry auth login
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Production:** The CLI auto-uses `https://graphql.burdenoff.com/global` as the OIDC issuer and
|
|
36
|
+
`burdenoff_cli_crewfoundry` as the client id. Override per-config or via env vars
|
|
37
|
+
(`CREWFOUNDRY_OIDC_ISSUER`, `CREWFOUNDRY_WORKSPACE_ENDPOINT`, `CREWFOUNDRY_GLOBAL_ENDPOINT`).
|
|
38
|
+
|
|
39
|
+
### Common Auth Commands
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
crewfoundry auth status # Check current auth state
|
|
43
|
+
crewfoundry auth token # Print platform access token
|
|
44
|
+
crewfoundry auth token --workspace # Print workspace token
|
|
45
|
+
crewfoundry auth refresh # Force token refresh
|
|
46
|
+
crewfoundry auth logout # Clear stored tokens
|
|
47
|
+
|
|
48
|
+
crewfoundry workspace list # List available workspaces
|
|
49
|
+
crewfoundry workspace current # Show current workspace
|
|
50
|
+
crewfoundry workspace set <id> # Switch workspace (re-issues token)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Token storage: `~/.config/crewfoundry-cli/auth.json` (mode 0600).
|
|
54
|
+
|
|
55
|
+
## Commands
|
|
56
|
+
|
|
57
|
+
The CLI mounts the following `@burdenoff/cli-sdk` module groups:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
crewfoundry auth Authentication (login, logout, status, token, refresh)
|
|
61
|
+
crewfoundry workspace Workspace context (list, current, set)
|
|
62
|
+
crewfoundry organizations Organization management
|
|
63
|
+
crewfoundry tours Product tours
|
|
64
|
+
crewfoundry rbac Role-based access control
|
|
65
|
+
crewfoundry crewfoundry Crewfoundry people platform (employees, hiring,
|
|
66
|
+
onboarding, resourcing, skills, learning, performance)
|
|
67
|
+
crewfoundry sandbox Sandbox script execution
|
|
68
|
+
crewfoundry tags Tags
|
|
69
|
+
crewfoundry files Files
|
|
70
|
+
crewfoundry groups Groups
|
|
71
|
+
crewfoundry conversations Conversations
|
|
72
|
+
crewfoundry security Security
|
|
73
|
+
crewfoundry integrations Integrations
|
|
74
|
+
crewfoundry channels Channels
|
|
75
|
+
crewfoundry scheduler Scheduler
|
|
76
|
+
crewfoundry export Data export
|
|
77
|
+
crewfoundry notifications Notifications
|
|
78
|
+
crewfoundry support Support
|
|
79
|
+
crewfoundry products Products / feature flags
|
|
80
|
+
crewfoundry billing Billing
|
|
81
|
+
crewfoundry store Store
|
|
82
|
+
crewfoundry devportal Developer portal
|
|
83
|
+
crewfoundry health Health checks
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Run `crewfoundry <command> --help` for subcommand details.
|
|
87
|
+
|
|
88
|
+
### Quick Examples
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
crewfoundry auth login
|
|
92
|
+
crewfoundry workspace set <id>
|
|
93
|
+
crewfoundry crewfoundry employees list
|
|
94
|
+
crewfoundry crewfoundry employees get <id>
|
|
95
|
+
crewfoundry tags create --key bug --label Bug
|
|
96
|
+
crewfoundry rbac check <user> read project
|
|
97
|
+
crewfoundry billing subscriptions list
|
|
98
|
+
crewfoundry devportal apps list --status PUBLISHED
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Configuration
|
|
102
|
+
|
|
103
|
+
CLI settings are stored in `~/.config/crewfoundry-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: `CREWFOUNDRY_WORKSPACE_ENDPOINT`,
|
|
110
|
+
`CREWFOUNDRY_GLOBAL_ENDPOINT`, `CREWFOUNDRY_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/crewfoundry-cli.git
|
|
128
|
+
cd crewfoundry-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 # Crewfoundry 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/crewfoundry-cli
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/cli.ts
|
|
4
|
+
import { readFileSync } from "fs";
|
|
5
|
+
import { join, dirname } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import { buildContext, createProgram } from "@burdenoff/cli-sdk/core";
|
|
8
|
+
import authModule from "@burdenoff/cli-sdk/modules/auth";
|
|
9
|
+
import workspacesModule from "@burdenoff/cli-sdk/modules/workspaces";
|
|
10
|
+
import organizationsModule from "@burdenoff/cli-sdk/modules/organizations";
|
|
11
|
+
import toursModule from "@burdenoff/cli-sdk/modules/tours";
|
|
12
|
+
import rbacModule from "@burdenoff/cli-sdk/modules/rbac";
|
|
13
|
+
import crewfoundryModule from "@burdenoff/cli-sdk/modules/crewfoundry";
|
|
14
|
+
import sandboxModule from "@burdenoff/cli-sdk/modules/sandbox";
|
|
15
|
+
import tagsModule from "@burdenoff/cli-sdk/modules/tags";
|
|
16
|
+
import filesModule from "@burdenoff/cli-sdk/modules/files";
|
|
17
|
+
import groupsModule from "@burdenoff/cli-sdk/modules/groups";
|
|
18
|
+
import conversationsModule from "@burdenoff/cli-sdk/modules/conversations";
|
|
19
|
+
import securityModule from "@burdenoff/cli-sdk/modules/security";
|
|
20
|
+
import integrationsModule from "@burdenoff/cli-sdk/modules/integrations";
|
|
21
|
+
import channelsModule from "@burdenoff/cli-sdk/modules/channels";
|
|
22
|
+
import schedulerModule from "@burdenoff/cli-sdk/modules/scheduler";
|
|
23
|
+
import exportModule from "@burdenoff/cli-sdk/modules/export";
|
|
24
|
+
import notificationsModule from "@burdenoff/cli-sdk/modules/notifications";
|
|
25
|
+
import supportModule from "@burdenoff/cli-sdk/modules/support";
|
|
26
|
+
import productsModule from "@burdenoff/cli-sdk/modules/products";
|
|
27
|
+
import billingModule from "@burdenoff/cli-sdk/modules/billing";
|
|
28
|
+
import storeModule from "@burdenoff/cli-sdk/modules/store";
|
|
29
|
+
import devportalModule from "@burdenoff/cli-sdk/modules/devportal";
|
|
30
|
+
import healthModule from "@burdenoff/cli-sdk/modules/health";
|
|
31
|
+
|
|
32
|
+
// src/product-defaults.ts
|
|
33
|
+
var productDefaults = {
|
|
34
|
+
configDirName: "crewfoundry-cli",
|
|
35
|
+
oidcClientId: "burdenoff_cli_crewfoundry",
|
|
36
|
+
oidcIssuerProd: "https://graphql.burdenoff.com/global",
|
|
37
|
+
workspaceEndpointDefault: "https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
|
|
38
|
+
globalEndpointDefault: "https://graphql.burdenoff.com/global/graphql",
|
|
39
|
+
envPrefix: "CREWFOUNDRY"
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/cli.ts
|
|
43
|
+
var __filename2 = fileURLToPath(import.meta.url);
|
|
44
|
+
var __dirname2 = dirname(__filename2);
|
|
45
|
+
var version = "0.0.0-dev";
|
|
46
|
+
try {
|
|
47
|
+
const packageJson = JSON.parse(readFileSync(join(__dirname2, "../package.json"), "utf8"));
|
|
48
|
+
if (packageJson.version)
|
|
49
|
+
version = packageJson.version;
|
|
50
|
+
} catch {}
|
|
51
|
+
var ctx = buildContext({
|
|
52
|
+
productName: "crewfoundry",
|
|
53
|
+
productVersion: version,
|
|
54
|
+
defaults: productDefaults
|
|
55
|
+
});
|
|
56
|
+
var { run } = createProgram(ctx, [
|
|
57
|
+
authModule,
|
|
58
|
+
workspacesModule,
|
|
59
|
+
organizationsModule,
|
|
60
|
+
toursModule,
|
|
61
|
+
rbacModule,
|
|
62
|
+
crewfoundryModule,
|
|
63
|
+
sandboxModule,
|
|
64
|
+
tagsModule,
|
|
65
|
+
filesModule,
|
|
66
|
+
groupsModule,
|
|
67
|
+
conversationsModule,
|
|
68
|
+
securityModule,
|
|
69
|
+
integrationsModule,
|
|
70
|
+
channelsModule,
|
|
71
|
+
schedulerModule,
|
|
72
|
+
exportModule,
|
|
73
|
+
notificationsModule,
|
|
74
|
+
supportModule,
|
|
75
|
+
productsModule,
|
|
76
|
+
billingModule,
|
|
77
|
+
storeModule,
|
|
78
|
+
devportalModule,
|
|
79
|
+
healthModule
|
|
80
|
+
], {
|
|
81
|
+
name: "crewfoundry",
|
|
82
|
+
description: "Crewfoundry CLI — full crewfoundry-app surface",
|
|
83
|
+
version,
|
|
84
|
+
helpExamples: [
|
|
85
|
+
"$ crewfoundry auth login # OAuth2 Device Code login",
|
|
86
|
+
"$ crewfoundry workspace set <id> # Pick workspace",
|
|
87
|
+
"$ crewfoundry crewfoundry employees list # Crewfoundry people platform",
|
|
88
|
+
"$ crewfoundry tags create --key bug --label Bug # Tags",
|
|
89
|
+
"$ crewfoundry rbac check <user> read project # RBAC",
|
|
90
|
+
"$ crewfoundry products feature-flags list # Feature flags",
|
|
91
|
+
"$ crewfoundry billing subscriptions list # Billing",
|
|
92
|
+
"$ crewfoundry devportal apps list --status PUBLISHED",
|
|
93
|
+
"",
|
|
94
|
+
"Configuration: ~/.config/crewfoundry-cli/",
|
|
95
|
+
"Documentation: https://crewfoundry.com/docs/cli"
|
|
96
|
+
]
|
|
97
|
+
});
|
|
98
|
+
run();
|
package/package.json
CHANGED
|
@@ -1,6 +1,105 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cfoundry/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "2026.1201.1",
|
|
4
|
+
"description": "CLI tool for Crewfoundry — unified people platform & workforce control plane",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"private": false,
|
|
7
|
+
"bin": {
|
|
8
|
+
"crewfoundry": "dist/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "bun build src/cli.ts --outdir dist --target node --packages external",
|
|
16
|
+
"dev": "bun --watch src/cli.ts",
|
|
17
|
+
"test": "bun test",
|
|
18
|
+
"test:coverage": "bun test --coverage",
|
|
19
|
+
"lint": "eslint .",
|
|
20
|
+
"format": "bun fmt",
|
|
21
|
+
"format:check": "bun fmt --check",
|
|
22
|
+
"clean": "rm -rf dist coverage junit.xml",
|
|
23
|
+
"sanity": "boff sanity",
|
|
24
|
+
"prepublishOnly": "bun run clean && bun run build",
|
|
25
|
+
"start": "bun dist/cli.js",
|
|
26
|
+
"type:check": "boff gate -- bun check --no-pretty",
|
|
27
|
+
"sanity:force": "boff sanity --force",
|
|
28
|
+
"audit": "bun audit --audit-level=high",
|
|
29
|
+
"lint:fix": "eslint . --fix"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"crewfoundry",
|
|
33
|
+
"cli",
|
|
34
|
+
"graphql",
|
|
35
|
+
"typescript",
|
|
36
|
+
"people-platform",
|
|
37
|
+
"workforce"
|
|
38
|
+
],
|
|
39
|
+
"author": {
|
|
40
|
+
"name": "Vignesh T.V",
|
|
41
|
+
"url": "https://github.com/tvvignesh"
|
|
42
|
+
},
|
|
43
|
+
"license": "UNLICENSED",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/Algoshred/crewfoundry-cli.git"
|
|
47
|
+
},
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/Algoshred/crewfoundry-cli/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/Algoshred/crewfoundry-cli#readme",
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public",
|
|
54
|
+
"registry": "https://registry.npmjs.org/"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@burdenoff/cli-sdk": "2026.1107.1",
|
|
58
|
+
"commander": "^15.0.0",
|
|
59
|
+
"graphql": "^17.0.2",
|
|
60
|
+
"graphql-request": "^7.4.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@burdenoff/toolchain": "2026.1107.14",
|
|
64
|
+
"@types/bun": "^1.4.4",
|
|
65
|
+
"eslint": "^9.39.4",
|
|
66
|
+
"knip": "^6.44.1",
|
|
67
|
+
"typescript": "6.0.3"
|
|
68
|
+
},
|
|
69
|
+
"engines": {
|
|
70
|
+
"node": ">=24.11.0",
|
|
71
|
+
"bun": ">=1.4.4"
|
|
72
|
+
},
|
|
73
|
+
"overrides": {
|
|
74
|
+
"lodash": ">=4.17.21",
|
|
75
|
+
"lodash-es": ">=4.17.21",
|
|
76
|
+
"dompurify": ">=3.3.4",
|
|
77
|
+
"fast-xml-parser": ">=4.5.5",
|
|
78
|
+
"@xmldom/xmldom": ">=0.8.12",
|
|
79
|
+
"swiper": ">=12.1.2",
|
|
80
|
+
"brace-expansion": ">=1.1.13",
|
|
81
|
+
"follow-redirects": ">=1.15.12",
|
|
82
|
+
"smol-toml": ">=1.6.1",
|
|
83
|
+
"axios": ">=1.15.0",
|
|
84
|
+
"flatted": ">=3.4.1",
|
|
85
|
+
"yaml": ">=2.8.3",
|
|
86
|
+
"picomatch": ">=2.3.2",
|
|
87
|
+
"immutable": ">=3.8.3",
|
|
88
|
+
"minimatch": ">=3.1.3"
|
|
89
|
+
},
|
|
90
|
+
"packageManager": "bun@1.4.4",
|
|
91
|
+
"trustedDependencies": [],
|
|
92
|
+
"boff": {
|
|
93
|
+
"type": "cli",
|
|
94
|
+
"sanity": {
|
|
95
|
+
"steps": [
|
|
96
|
+
"format",
|
|
97
|
+
"lint",
|
|
98
|
+
"typecheck",
|
|
99
|
+
"build",
|
|
100
|
+
"test",
|
|
101
|
+
"knip"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|