uplink-cli 0.1.8 → 0.1.9
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/cli/src/index.ts +9 -1
- package/package.json +1 -1
package/cli/src/index.ts
CHANGED
|
@@ -6,13 +6,21 @@ import { adminCommand } from "./subcommands/admin";
|
|
|
6
6
|
import { menuCommand } from "./subcommands/menu";
|
|
7
7
|
import { tunnelCommand } from "./subcommands/tunnel";
|
|
8
8
|
import { signupCommand } from "./subcommands/signup";
|
|
9
|
+
import { readFileSync } from "fs";
|
|
10
|
+
import { join, dirname } from "path";
|
|
11
|
+
import { fileURLToPath } from "url";
|
|
12
|
+
|
|
13
|
+
// Get version from package.json
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const pkgPath = join(__dirname, "../../package.json");
|
|
16
|
+
const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
|
|
9
17
|
|
|
10
18
|
const program = new Command();
|
|
11
19
|
|
|
12
20
|
program
|
|
13
21
|
.name("uplink")
|
|
14
22
|
.description("Agent-friendly cloud CLI")
|
|
15
|
-
.version(
|
|
23
|
+
.version(pkg.version)
|
|
16
24
|
.option("--api-base <url>", "Override API base URL (default env AGENTCLOUD_API_BASE)")
|
|
17
25
|
.option("--token-stdin", "Read AGENTCLOUD_TOKEN from stdin once");
|
|
18
26
|
|
package/package.json
CHANGED