@4yi/cli 0.1.4 → 0.1.5

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 CHANGED
@@ -1,11 +1,26 @@
1
- # @4yi/cli
1
+ # 4YI CLI
2
2
 
3
3
  4YI CLI signs in through the 4YI web app and launches OpenCode with 4YI model routing.
4
4
 
5
- ## Commands
5
+ ## Install
6
+
7
+ Temporary dev environment:
8
+
9
+ ```bash
10
+ npm install -g @4yi/cli
11
+ ```
12
+
13
+ Production environment:
6
14
 
7
15
  ```bash
8
16
  npm install -g @4yi/cli
17
+ ```
18
+
19
+ Both packages install the `4yi` command. The dev package points at `https://xclaw-dev.bieases.com`; the production package points at `https://app.4yi.ai`.
20
+
21
+ ## Commands
22
+
23
+ ```bash
9
24
  4yi login
10
25
  4yi whoami
11
26
  4yi code
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@4yi/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "4YI command-line launcher for OAuth login and OpenCode runtime",
5
5
  "type": "module",
6
6
  "bin": {
@@ -13,7 +13,13 @@
13
13
  ],
14
14
  "scripts": {
15
15
  "test": "node --test",
16
- "pack:dry": "npm pack --dry-run"
16
+ "pack:dry": "npm pack --dry-run",
17
+ "stage:dev": "node scripts/stage-package.mjs dev",
18
+ "stage:prod": "node scripts/stage-package.mjs prod",
19
+ "pack:dev": "node scripts/stage-package.mjs dev --pack",
20
+ "pack:prod": "node scripts/stage-package.mjs prod --pack",
21
+ "publish:dev": "node scripts/stage-package.mjs dev --publish",
22
+ "publish:prod": "node scripts/stage-package.mjs prod --publish"
17
23
  },
18
24
  "engines": {
19
25
  "node": ">=20.0.0"
package/src/config.mjs CHANGED
@@ -2,7 +2,18 @@ import fs from "node:fs";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
4
 
5
- export const DEFAULT_BASE_URL = "https://xclaw-dev.bieases.com";
5
+ export const PACKAGE_NAME = "@4yi/cli";
6
+
7
+ const PACKAGE_BASE_URLS = {
8
+ "@4yi-dev/cli": "https://xclaw-dev.bieases.com",
9
+ "@4yi/cli": "https://app.4yi.ai",
10
+ };
11
+
12
+ export function defaultBaseUrlForPackage(packageName = PACKAGE_NAME) {
13
+ return PACKAGE_BASE_URLS[packageName] || PACKAGE_BASE_URLS["@4yi/cli"];
14
+ }
15
+
16
+ export const DEFAULT_BASE_URL = defaultBaseUrlForPackage(PACKAGE_NAME);
6
17
 
7
18
  export function normalizeBaseUrl(value) {
8
19
  return String(value || DEFAULT_BASE_URL).replace(/\/+$/, "");