@chandrashekharchoudha/bifrost-cli 0.1.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 +45 -0
- package/bin/bifrost.js +41 -0
- package/dist/darwin-amd64/bifrost +0 -0
- package/dist/darwin-arm64/bifrost +0 -0
- package/dist/linux-amd64/bifrost +0 -0
- package/dist/linux-arm64/bifrost +0 -0
- package/package.json +39 -0
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# @chandrashekharchoudha/bifrost-cli
|
|
2
|
+
|
|
3
|
+
Agent-native CLI for Bifrost.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @chandrashekharchoudha/bifrost-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Verify
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
bifrost version --json
|
|
15
|
+
bifrost doctor --json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Configure API
|
|
19
|
+
|
|
20
|
+
The CLI defaults to `http://localhost:8080` for local development. To use a deployed backend, set:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
export BIFROST_API_BASE_URL=https://api.bifrost.saastack.site
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
or persist it:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
bifrost config set api_base_url https://api.bifrost.saastack.site
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Auth
|
|
33
|
+
|
|
34
|
+
Headless login:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
bifrost auth login --headless
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
PAT login:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bifrost auth login --token <bf_pat_...>
|
|
44
|
+
bifrost auth whoami --json
|
|
45
|
+
```
|
package/bin/bifrost.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawnSync } = require('node:child_process');
|
|
3
|
+
const fs = require('node:fs');
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
|
|
6
|
+
const platformMap = {
|
|
7
|
+
darwin: 'darwin',
|
|
8
|
+
linux: 'linux',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const archMap = {
|
|
12
|
+
x64: 'amd64',
|
|
13
|
+
arm64: 'arm64',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const platform = platformMap[process.platform];
|
|
17
|
+
const arch = archMap[process.arch];
|
|
18
|
+
|
|
19
|
+
if (!platform || !arch) {
|
|
20
|
+
console.error(`Unsupported platform: ${process.platform}/${process.arch}`);
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const binaryPath = path.join(__dirname, '..', 'dist', `${platform}-${arch}`, 'bifrost');
|
|
25
|
+
|
|
26
|
+
if (!fs.existsSync(binaryPath)) {
|
|
27
|
+
console.error(`Missing packaged bifrost binary: ${binaryPath}`);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const result = spawnSync(binaryPath, process.argv.slice(2), {
|
|
32
|
+
stdio: 'inherit',
|
|
33
|
+
env: process.env,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
if (result.error) {
|
|
37
|
+
console.error(result.error.message);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
process.exit(result.status === null ? 1 : result.status);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chandrashekharchoudha/bifrost-cli",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Agent-native CLI for Bifrost",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"bin": {
|
|
7
|
+
"bifrost": "bin/bifrost.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
14
|
+
"os": [
|
|
15
|
+
"darwin",
|
|
16
|
+
"linux"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=18"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/chandrashekharchoudha/bifrost-idp.git"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/chandrashekharchoudha/bifrost-idp",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/chandrashekharchoudha/bifrost-idp/issues"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"bifrost",
|
|
31
|
+
"cli",
|
|
32
|
+
"platform",
|
|
33
|
+
"deployments",
|
|
34
|
+
"idp"
|
|
35
|
+
],
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
}
|
|
39
|
+
}
|