reallink-cli 0.1.0

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 ADDED
@@ -0,0 +1,25 @@
1
+ # reallink-cli
2
+
3
+ Rust-based CLI for Reallink authentication and API token workflows.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g reallink-cli
9
+ ```
10
+
11
+ ## Commands
12
+
13
+ ```bash
14
+ reallink login --base-url https://api.real-agent.link
15
+ reallink whoami
16
+ reallink logout
17
+
18
+ reallink token list
19
+ reallink token create --name "ci-token" --scope trace:read --scope trace:write
20
+ reallink token revoke --token-id tok_xxx
21
+ ```
22
+
23
+ ## Requirements
24
+
25
+ - Rust toolchain (`cargo`) must be installed.
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ const { spawnSync } = require("node:child_process");
3
+ const path = require("node:path");
4
+
5
+ const packageRoot = path.resolve(__dirname, "..");
6
+ const manifestPath = path.join(packageRoot, "rust", "Cargo.toml");
7
+ const cargoArgs = ["run", "--quiet", "--manifest-path", manifestPath, "--", ...process.argv.slice(2)];
8
+
9
+ const result = spawnSync("cargo", cargoArgs, {
10
+ stdio: "inherit",
11
+ shell: process.platform === "win32"
12
+ });
13
+
14
+ if (result.error) {
15
+ console.error(`Failed to run cargo: ${result.error.message}`);
16
+ process.exit(1);
17
+ }
18
+
19
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "reallink-cli",
3
+ "version": "0.1.0",
4
+ "description": "Rust-based CLI for Reallink auth and API operations",
5
+ "bin": {
6
+ "reallink": "bin/reallink.cjs"
7
+ },
8
+ "files": [
9
+ "bin/reallink.cjs",
10
+ "rust/Cargo.toml",
11
+ "rust/Cargo.lock",
12
+ "rust/src",
13
+ "README.md"
14
+ ],
15
+ "scripts": {
16
+ "build": "cargo build --manifest-path ./rust/Cargo.toml --release",
17
+ "dev": "node ./bin/reallink.cjs --help",
18
+ "pack:local": "npm pack --json"
19
+ },
20
+ "keywords": [
21
+ "reallink",
22
+ "cli",
23
+ "rust",
24
+ "oauth"
25
+ ],
26
+ "license": "MIT",
27
+ "publishConfig": {
28
+ "access": "public"
29
+ }
30
+ }