agy-family 0.5.0 → 0.6.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 +22 -9
- package/README.zh-CN.md +22 -9
- package/package.json +1 -1
- package/packages/cli/bin/agy-family.mjs +541 -156
- package/packages/cli/src/hook.mjs +114 -18
- package/packages/cli/src/host.mjs +241 -14
- package/packages/core/src/pricing-node.mjs +4 -24
- package/packages/core/src/pricing.mjs +2 -2
- package/packages/core/src/quota.mjs +337 -161
- package/packages/core/src/sync.mjs +2 -2
- package/packages/server-core/src/index.mjs +1 -1
- package/packages/server-core/src/ui.mjs +3 -3
package/README.md
CHANGED
|
@@ -40,28 +40,41 @@ packages/
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
## 1. One CLI for
|
|
43
|
+
## 1. One Standalone CLI for Hosting, Master Quota & Joining (Zero External Dependencies)
|
|
44
44
|
|
|
45
|
-
Install `agy-family` once — the same CLI handles **
|
|
45
|
+
Install `agy-family` once — the same self-contained CLI handles **hosting**, **live master subscription quota sync**, **passwordless browser access**, and **joining a family board** (zero `git clone`, zero external tools required):
|
|
46
46
|
|
|
47
47
|
```sh
|
|
48
48
|
npm i -g agy-family
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
- **
|
|
51
|
+
- **Host your own board on Cloudflare Workers + D1 (free tier, 1 command)** — auto-provisions D1, applies migrations, enables `cli-only` private mode by default, generates `AGY_FAMILY_ADMIN_KEY`, syncs live `models.dev` 3-tier pricing, and with `--self` joins you automatically:
|
|
52
52
|
```sh
|
|
53
|
-
agy-family
|
|
53
|
+
agy-family deploy --self --member "Owner" --email "master@gmail.com" --daemon
|
|
54
|
+
```
|
|
55
|
+
- **Bind the Master Account for live 5h / weekly subscription quota sync** (built-in official `statusLine` passive tap — zero external tools, zero OAuth secrets, transparently chains any existing status line):
|
|
56
|
+
```sh
|
|
57
|
+
agy-family master bind --daemon
|
|
54
58
|
```
|
|
55
|
-
- **
|
|
59
|
+
- **Open the web board passwordlessly** (60s one-time ticket -> 7-day `HttpOnly` cookie; manager machines auto-unlock Admin Console):
|
|
56
60
|
```sh
|
|
57
|
-
agy-family
|
|
61
|
+
agy-family open # Open active hosted or joined board
|
|
62
|
+
agy-family open <car-name|index> # Open a specific hosted board when managing multiple cars
|
|
63
|
+
agy-family open --joined # Open your joined board explicitly
|
|
64
|
+
agy-family open --link # Print a 5-minute single-use link for mobile
|
|
58
65
|
```
|
|
59
|
-
- **
|
|
66
|
+
- **Overview all cars, accounts & switch hosts**:
|
|
60
67
|
```sh
|
|
61
|
-
agy-family
|
|
62
|
-
agy-family host
|
|
68
|
+
agy-family ls # List all hosted cars, URLs, members, joined board & active account (also `/family ls`)
|
|
69
|
+
agy-family host use <car-name|index> # Switch active hosted board
|
|
70
|
+
agy-family invite "Alice" --email "alice@gmail.com" --quota 20 # Prints ready-to-paste join command (optional `--car <name>`)
|
|
63
71
|
npm i -g agy-family@latest && agy-family deploy # Idempotent zero-downtime upgrade
|
|
64
72
|
```
|
|
73
|
+
- **Join someone's family board & view dashboard** (works for both Antigravity Desktop IDE & `agy` CLI):
|
|
74
|
+
```sh
|
|
75
|
+
agy-family join "agyfam://join?d=..." --daemon
|
|
76
|
+
agy-family open
|
|
77
|
+
```
|
|
65
78
|
- **Self-host locally or on any VPS (built-in Node SQLite)**:
|
|
66
79
|
```sh
|
|
67
80
|
agy-family serve --port 8787
|
package/README.zh-CN.md
CHANGED
|
@@ -40,28 +40,41 @@ packages/
|
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
|
|
43
|
-
## 一、一个 CLI
|
|
43
|
+
## 一、一个 CLI:既能「上车」也能「自己开车」(零外部依赖、零密码)
|
|
44
44
|
|
|
45
|
-
只需全局安装一次 `agy-family
|
|
45
|
+
只需全局安装一次 `agy-family`,**成员上车**、**主号订阅余量同步**、**免密打开网页看板**和**车主部署/发邀请/自托管**全部由这一个包独立完成(免 `git clone`、不依赖任何其他工具):
|
|
46
46
|
|
|
47
47
|
```sh
|
|
48
48
|
npm i -g agy-family
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
-
|
|
51
|
+
- **🚗 车主免费云端开车**(Cloudflare Workers + D1 永久免费层,自动创建 D1、跑迁移、默认开启 `cli-only` 隐私保护、生成 Admin Key、同步 `models.dev` 三级定价,加 `--self` 顺便把自己也接上车):
|
|
52
52
|
```sh
|
|
53
|
-
agy-family
|
|
53
|
+
agy-family deploy --self --member "你的名字" --email "主号@gmail.com" --daemon
|
|
54
54
|
```
|
|
55
|
-
-
|
|
55
|
+
- **⚡ 绑定主号实时订阅额度**(内置 `statusLine` 官方被动采集钩子,零外部工具依赖、零 Google 凭据、自动透明串联保留你原有的终端状态栏):
|
|
56
56
|
```sh
|
|
57
|
-
agy-family
|
|
57
|
+
agy-family master bind --daemon # 绑定主号并自动捕获同步 5h / 周订阅余量
|
|
58
58
|
```
|
|
59
|
-
-
|
|
59
|
+
- **🔐 零密码打开网页看板**(一次性 60s 票据换取 7 天 `HttpOnly` 会话,主号电脑自动免密解锁「家庭组管理」后台):
|
|
60
60
|
```sh
|
|
61
|
-
agy-family
|
|
62
|
-
agy-family
|
|
61
|
+
agy-family open # 自动打开当前默认看板
|
|
62
|
+
agy-family open <车名或序号> # 多车场景下指定打开某一辆自建车
|
|
63
|
+
agy-family open --joined # 打开当前「我上的车」
|
|
64
|
+
agy-family open --link # 生成 5 分钟单次有效链接(方便手机临时看)
|
|
65
|
+
```
|
|
66
|
+
- **📋 一览全部开车 / 上车 / 账号信息 & 多车切换**:
|
|
67
|
+
```sh
|
|
68
|
+
agy-family ls # 一条命令列出所有开过的车、网址、主号、成员与当前上的车(对话内也可发 /family ls)
|
|
69
|
+
agy-family host use <车名或序号> # 切换当前默认操作的自建车
|
|
70
|
+
agy-family invite "成员名" --email "member@gmail.com" --quota 20 # 生成一行上车命令(可加 --car <车名>)
|
|
63
71
|
npm i -g agy-family@latest && agy-family deploy # 一键平滑升级云端看板(保留数据与密钥)
|
|
64
72
|
```
|
|
73
|
+
- **🚌 成员上车 & 查看面板**(桌面 IDE 和 `agy` CLI 通用):
|
|
74
|
+
```sh
|
|
75
|
+
agy-family join "agyfam://join?d=..." --daemon # 加入家庭组并开启后台同步
|
|
76
|
+
agy-family open # 零密码打开网页看板
|
|
77
|
+
```
|
|
65
78
|
- **🏠 本地 / VPS 自托管开车**(零依赖内置 SQLite):
|
|
66
79
|
```sh
|
|
67
80
|
agy-family serve --port 8787
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agy-family",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Zero-privacy-leak transparent usage dashboard, /family slash command, and fair-use budget guardrail for Google One / Antigravity family groups.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|