sideby 0.19.1 → 0.20.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 +7 -4
- package/ai-tasks.json +28 -0
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +22 -1
- package/dist/src/cli/commands.js +815 -21
- package/dist/src/cli/format.d.ts +4 -0
- package/dist/src/cli/format.js +42 -4
- package/dist/src/cli/json-schemas.js +334 -4
- package/dist/src/cli/main.js +159 -13
- package/dist/src/core/accounts.d.ts +6 -0
- package/dist/src/core/accounts.js +12 -0
- package/dist/src/core/autostart.d.ts +11 -0
- package/dist/src/core/autostart.js +32 -5
- package/dist/src/core/browser-profiles.d.ts +23 -2
- package/dist/src/core/browser-profiles.js +148 -37
- package/dist/src/core/claude-settings-file.d.ts +18 -0
- package/dist/src/core/claude-settings-file.js +52 -3
- package/dist/src/core/config.d.ts +5 -0
- package/dist/src/core/config.js +12 -1
- package/dist/src/core/edit-settings.d.ts +7 -0
- package/dist/src/core/edit-settings.js +10 -5
- package/dist/src/core/history-group.d.ts +28 -0
- package/dist/src/core/history-group.js +47 -0
- package/dist/src/core/history-index.d.ts +145 -0
- package/dist/src/core/history-index.js +447 -0
- package/dist/src/core/history-project.d.ts +13 -0
- package/dist/src/core/history-project.js +87 -0
- package/dist/src/core/history.d.ts +210 -0
- package/dist/src/core/history.js +952 -0
- package/dist/src/core/inbound.d.ts +62 -0
- package/dist/src/core/inbound.js +215 -0
- package/dist/src/core/launch.d.ts +9 -1
- package/dist/src/core/launch.js +58 -24
- package/dist/src/core/live-sessions-copy.d.ts +5 -0
- package/dist/src/core/live-sessions-copy.js +46 -0
- package/dist/src/core/live-sessions-procs.d.ts +89 -0
- package/dist/src/core/live-sessions-procs.js +296 -0
- package/dist/src/core/live-sessions-title.d.ts +28 -0
- package/dist/src/core/live-sessions-title.js +80 -0
- package/dist/src/core/live-sessions.d.ts +68 -0
- package/dist/src/core/live-sessions.js +163 -0
- package/dist/src/core/login-check.d.ts +15 -0
- package/dist/src/core/login-check.js +32 -0
- package/dist/src/core/messages.d.ts +83 -0
- package/dist/src/core/messages.js +433 -0
- package/dist/src/core/project-categories.d.ts +14 -0
- package/dist/src/core/project-categories.js +48 -0
- package/dist/src/core/quota-fetch.d.ts +3 -3
- package/dist/src/core/quota-fetch.js +5 -5
- package/dist/src/core/quota-levels.d.ts +5 -0
- package/dist/src/core/quota-levels.js +5 -0
- package/dist/src/core/remote-control.d.ts +2 -0
- package/dist/src/core/remote-control.js +34 -59
- package/dist/src/core/run-link.d.ts +76 -0
- package/dist/src/core/run-link.js +245 -0
- package/dist/src/core/same-login.d.ts +4 -3
- package/dist/src/core/same-login.js +10 -7
- package/dist/src/core/session-select.d.ts +31 -0
- package/dist/src/core/session-select.js +44 -0
- package/dist/src/families/browser.d.ts +7 -18
- package/dist/src/families/browser.js +19 -8
- package/dist/src/families/claude/deliver.d.ts +2 -0
- package/dist/src/families/claude/deliver.js +43 -0
- package/dist/src/families/claude/history.d.ts +2 -0
- package/dist/src/families/claude/history.js +192 -0
- package/dist/src/families/claude/live-sessions.d.ts +13 -0
- package/dist/src/families/claude/live-sessions.js +117 -0
- package/dist/src/families/claude/messaging.d.ts +69 -0
- package/dist/src/families/claude/messaging.js +165 -0
- package/dist/src/families/claude/mod.d.ts +26 -0
- package/dist/src/families/claude/mod.js +105 -0
- package/dist/src/families/claude/session-files.d.ts +21 -0
- package/dist/src/families/claude/session-files.js +54 -0
- package/dist/src/families/codex/deliver.d.ts +5 -0
- package/dist/src/families/codex/deliver.js +76 -0
- package/dist/src/families/codex/history.d.ts +7 -0
- package/dist/src/families/codex/history.js +174 -0
- package/dist/src/families/codex/index.js +2 -0
- package/dist/src/families/codex/live-sessions.d.ts +12 -0
- package/dist/src/families/codex/live-sessions.js +193 -0
- package/dist/src/families/codex/quota.d.ts +3 -0
- package/dist/src/families/codex/quota.js +123 -0
- package/dist/src/families/codex/rate-limits.js +2 -0
- package/dist/src/families/codex/rollout.js +1 -1
- package/dist/src/families/grok/browser.d.ts +3 -0
- package/dist/src/families/grok/browser.js +5 -0
- package/dist/src/families/grok/history.d.ts +2 -0
- package/dist/src/families/grok/history.js +157 -0
- package/dist/src/families/grok/live-sessions.d.ts +4 -0
- package/dist/src/families/grok/live-sessions.js +80 -0
- package/dist/src/families/grok/login-key.d.ts +14 -0
- package/dist/src/families/grok/login-key.js +37 -0
- package/dist/src/families/history.d.ts +20 -0
- package/dist/src/families/history.js +81 -0
- package/dist/src/families/live-sessions.d.ts +26 -0
- package/dist/src/families/live-sessions.js +9 -0
- package/dist/src/families/login-keys.js +5 -1
- package/dist/src/families/messaging.d.ts +27 -0
- package/dist/src/families/messaging.js +6 -0
- package/dist/src/families/pi/history.d.ts +2 -0
- package/dist/src/families/pi/history.js +124 -0
- package/dist/src/families/pi/live-sessions.d.ts +2 -0
- package/dist/src/families/pi/live-sessions.js +70 -0
- package/dist/src/families/shared/history-text.d.ts +65 -0
- package/dist/src/families/shared/history-text.js +261 -0
- package/dist/src/menubar/hotkey.d.ts +86 -0
- package/dist/src/menubar/hotkey.js +159 -0
- package/dist/src/menubar/script.d.ts +2 -0
- package/dist/src/menubar/script.js +118 -22
- package/dist/src/menubar/snapshot.d.ts +8 -4
- package/dist/src/menubar/snapshot.js +45 -13
- package/dist/src/menubar/strings.d.ts +24 -6
- package/dist/src/menubar/strings.js +24 -6
- package/dist/src/panel/handler.d.ts +69 -0
- package/dist/src/panel/handler.js +686 -15
- package/dist/src/panel/i18n.d.ts +304 -3
- package/dist/src/panel/i18n.js +620 -18
- package/dist/src/panel/orca.d.ts +48 -0
- package/dist/src/panel/orca.js +153 -0
- package/dist/src/panel/page-logic.d.ts +255 -13
- package/dist/src/panel/page-logic.js +483 -1
- package/dist/src/panel/page-script.js +2260 -204
- package/dist/src/panel/page-styles.js +404 -32
- package/dist/src/panel/page.js +1 -0
- package/dist/src/plugins/check.js +16 -4
- package/dist/src/plugins/loader.d.ts +8 -1
- package/dist/src/plugins/loader.js +72 -7
- package/dist/src/runtime.d.ts +5 -0
- package/dist/src/runtime.js +27 -5
- package/dist/src/types.d.ts +116 -1
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.js +5 -0
- package/mods/claude/.claude-plugin/plugin.json +7 -0
- package/mods/claude/hooks/hooks.json +1 -0
- package/mods/claude/hooks/register.js +261 -0
- package/package.json +5 -2
- package/schemas/autostart.json +74 -1
- package/schemas/browser-set.json +110 -0
- package/schemas/browser.json +22 -2
- package/schemas/config.json +26 -1
- package/schemas/history-index.json +209 -0
- package/schemas/history-projects.json +133 -0
- package/schemas/history-show.json +275 -0
- package/schemas/history.json +410 -0
- package/schemas/menubar-hotkey.json +139 -0
- package/schemas/menubar-snapshot.json +36 -2
- package/schemas/menubar.json +74 -1
- package/schemas/messages-inbound.json +258 -0
- package/schemas/messages.json +164 -0
- package/schemas/send.json +165 -0
- package/schemas/sessions-copy.json +113 -0
- package/schemas/sessions-open-run.json +97 -0
- package/schemas/sessions.json +237 -0
- package/skills/sideby/SKILL.md +10 -5
- package/skills/sideby/references/accounts.md +11 -0
- package/skills/sideby/references/ai-tasks.md +17 -1
- package/skills/sideby/references/panel.md +6 -4
- package/skills/sideby/references/quota.md +2 -2
- package/skills/sideby/references/sessions.md +79 -0
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// sideby's Claude Code mod (spec §3.32 step 3, ADR-0039). `sideby run` loads it with `--plugin-dir` on Claude Code
|
|
2
|
+
// 2.1.287 or later. It only shows things and reads `sideby sessions --json`: a band above the prompt with this
|
|
3
|
+
// session's Session Label, a toast when a sideby Message arrives, and a `/sessions` pane of every running session
|
|
4
|
+
// with buttons that copy one for another AI. It changes no prompt, tool call or file.
|
|
5
|
+
|
|
6
|
+
const PANE = 'sideby-sessions'
|
|
7
|
+
/** The first line `sideby send` gives every Message it delivers (spec §3.32 step 2). */
|
|
8
|
+
const MESSAGE_LINE = /^sideby message (\S+) from (.+)$/
|
|
9
|
+
/** How often the band looks for the session's title, which Claude Code sets after the first turns. */
|
|
10
|
+
const LABEL_EVERY_MS = 30_000
|
|
11
|
+
/** Once the label stopped changing, only a rename is left to notice, so the band looks far less often. */
|
|
12
|
+
const LABEL_SETTLED_MS = 5 * 60_000
|
|
13
|
+
/** How many looks in a row must bring the same label before it counts as settled. */
|
|
14
|
+
const LABEL_SAME_LOOKS = 2
|
|
15
|
+
const PANE_EVERY_MS = 5_000
|
|
16
|
+
|
|
17
|
+
const TEXT = {
|
|
18
|
+
en: {
|
|
19
|
+
command: 'Show your running sessions across accounts (sideby)',
|
|
20
|
+
title: 'Sessions',
|
|
21
|
+
opened: 'Sessions pane opened.',
|
|
22
|
+
loading: 'Reading your sessions…',
|
|
23
|
+
empty: 'No running sessions. Start an account with sideby and it shows here.',
|
|
24
|
+
noSideby: 'sideby did not answer. Check that `sideby` runs in a terminal, then reopen /sessions.',
|
|
25
|
+
arrived: (from) => `Message from ${from}`,
|
|
26
|
+
copied: 'Copied',
|
|
27
|
+
copyRef: 'Copy for AI',
|
|
28
|
+
copyId: 'Copy session id',
|
|
29
|
+
thisOne: ' (this session)',
|
|
30
|
+
guessed: 'newest session (guessed)',
|
|
31
|
+
run: 'task: ',
|
|
32
|
+
status: { 'needs-you': 'needs you', busy: 'working', idle: 'idle', unknown: 'running' },
|
|
33
|
+
ago: (m) => (m < 1 ? 'just now' : m < 60 ? `${m} min ago` : `${Math.floor(m / 60)} h ago`),
|
|
34
|
+
hint: 'Click "Copy for AI" and paste it into another session, so that session can read this one.',
|
|
35
|
+
},
|
|
36
|
+
zh: {
|
|
37
|
+
command: '查看各账号正在运行的会话(sideby)',
|
|
38
|
+
title: '会话',
|
|
39
|
+
opened: '已打开会话面板。',
|
|
40
|
+
loading: '正在读取会话…',
|
|
41
|
+
empty: '还没有运行中的会话。用 sideby 启动账号后会显示在这里。',
|
|
42
|
+
noSideby: '连不上 sideby。先在终端确认 `sideby` 能运行,再重开 /sessions。',
|
|
43
|
+
arrived: (from) => `${from} 发来一条消息`,
|
|
44
|
+
copied: '已复制',
|
|
45
|
+
copyRef: '复制给 AI',
|
|
46
|
+
copyId: '复制会话 id',
|
|
47
|
+
thisOne: '(本会话)',
|
|
48
|
+
guessed: '最新会话(推测)',
|
|
49
|
+
run: '任务:',
|
|
50
|
+
status: { 'needs-you': '需要你处理', busy: '运行中', idle: '空闲', unknown: '在运行' },
|
|
51
|
+
ago: (m) => (m < 1 ? '刚刚' : m < 60 ? `${m} 分钟前` : `${Math.floor(m / 60)} 小时前`),
|
|
52
|
+
hint: '点「复制给 AI」,贴到另一个会话,对方就能读到这个会话。',
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
const DOT = { 'needs-you': '!', busy: '●', idle: '○', unknown: '·' }
|
|
56
|
+
|
|
57
|
+
let text = TEXT.en
|
|
58
|
+
let home = ''
|
|
59
|
+
/** This Launch's Account (`SIDEBY_ACCOUNT`); unset when Claude Code was not started by sideby. */
|
|
60
|
+
let account
|
|
61
|
+
let label
|
|
62
|
+
/** The label sideby gave on the last look, and how many looks in a row brought it. A title can stand in for the one
|
|
63
|
+
* Claude Code gives after the first turns (the folder name), so a label counts as settled only once it stops changing. */
|
|
64
|
+
let lastLook
|
|
65
|
+
let sameLooks = 0
|
|
66
|
+
let lastLabelLook = 0
|
|
67
|
+
let list = { loaded: false, sessions: [] }
|
|
68
|
+
let reading = false
|
|
69
|
+
let tick
|
|
70
|
+
|
|
71
|
+
/** Runs `sideby <args> --json` and returns its answer; throws with sideby's own message when it fails. */
|
|
72
|
+
async function sideby($, args) {
|
|
73
|
+
let ran
|
|
74
|
+
try {
|
|
75
|
+
ran = await $.process.run(['sideby', ...args, '--json'], { timeoutMs: 20_000 })
|
|
76
|
+
} catch {
|
|
77
|
+
throw new Error(text.noSideby)
|
|
78
|
+
}
|
|
79
|
+
let out
|
|
80
|
+
try {
|
|
81
|
+
out = JSON.parse(ran.stdout)
|
|
82
|
+
} catch {
|
|
83
|
+
throw new Error(text.noSideby)
|
|
84
|
+
}
|
|
85
|
+
if (ran.exitCode !== 0) throw new Error(typeof out?.error === 'string' ? out.error : text.noSideby)
|
|
86
|
+
return out
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** Grows the band from `cc002 · 61230c3d` into the full Session Label once Claude Code has titled the session. */
|
|
90
|
+
async function lookLabel($, force = false) {
|
|
91
|
+
if (!account) return
|
|
92
|
+
const now = await $.clock.now()
|
|
93
|
+
const every = sameLooks >= LABEL_SAME_LOOKS ? LABEL_SETTLED_MS : LABEL_EVERY_MS
|
|
94
|
+
if (!force && now - lastLabelLook < every) return
|
|
95
|
+
lastLabelLook = now
|
|
96
|
+
try {
|
|
97
|
+
const id = await $.session.id()
|
|
98
|
+
const out = await sideby($, ['sessions', account])
|
|
99
|
+
const row = (out.sessions ?? []).find((s) => s.sessionId === id)
|
|
100
|
+
if (row?.label) {
|
|
101
|
+
sameLooks = row.label === lastLook ? sameLooks + 1 : 1
|
|
102
|
+
lastLook = row.label
|
|
103
|
+
}
|
|
104
|
+
if (row?.label && row.label !== label) {
|
|
105
|
+
label = row.label
|
|
106
|
+
$.ui.invalidate('ui.render')
|
|
107
|
+
}
|
|
108
|
+
} catch {
|
|
109
|
+
// The short label stays; the next turn tries again.
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
async function paneIsOpen($) {
|
|
114
|
+
return (await $.ui.panes()).some((pane) => pane.id === PANE)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/** Reads every Live Session for the pane, and redraws only when the answer changed. */
|
|
118
|
+
async function readSessions($) {
|
|
119
|
+
if (reading) return
|
|
120
|
+
reading = true
|
|
121
|
+
try {
|
|
122
|
+
let next
|
|
123
|
+
try {
|
|
124
|
+
const out = await sideby($, ['sessions'])
|
|
125
|
+
next = { loaded: true, sessions: out.sessions ?? [] }
|
|
126
|
+
} catch (err) {
|
|
127
|
+
next = { loaded: true, sessions: list.sessions, error: err.message }
|
|
128
|
+
}
|
|
129
|
+
if (JSON.stringify(next) !== JSON.stringify(list)) {
|
|
130
|
+
list = next
|
|
131
|
+
$.ui.invalidate('ui.render')
|
|
132
|
+
}
|
|
133
|
+
} finally {
|
|
134
|
+
reading = false
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** Keeps the pane fresh while it is open, and stops once it is closed. */
|
|
139
|
+
function watchPane($) {
|
|
140
|
+
if (tick) return
|
|
141
|
+
tick = $.clock.every(PANE_EVERY_MS, () => {
|
|
142
|
+
void paneIsOpen($).then((open) => {
|
|
143
|
+
if (open) return readSessions($)
|
|
144
|
+
tick?.cancel()
|
|
145
|
+
tick = undefined
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
async function openPane($) {
|
|
151
|
+
await $.ui.open({ id: PANE, title: text.title })
|
|
152
|
+
void readSessions($)
|
|
153
|
+
watchPane($)
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function where(cwd) {
|
|
157
|
+
return home && (cwd === home || cwd?.startsWith(`${home}/`)) ? `~${cwd.slice(home.length)}` : (cwd ?? '')
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
async function copy($, press, value) {
|
|
161
|
+
await $.ui.copy({ text: value, surface: press?.surface })
|
|
162
|
+
$.ui.toast(text.copied)
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function register(on) {
|
|
166
|
+
on('session.start', async ($, e, next) => {
|
|
167
|
+
const locale =
|
|
168
|
+
(await $.env.get('LC_ALL')) || (await $.env.get('LC_MESSAGES')) || (await $.env.get('LANG')) || ''
|
|
169
|
+
text = /^zh/i.test(locale) ? TEXT.zh : TEXT.en
|
|
170
|
+
home = (await $.env.get('HOME')) ?? ''
|
|
171
|
+
account = await $.env.get('SIDEBY_ACCOUNT')
|
|
172
|
+
if (account) {
|
|
173
|
+
const short = (await $.env.get('SIDEBY_LABEL')) || account
|
|
174
|
+
label = `${short} · ${(await $.session.id()).slice(0, 8)}`
|
|
175
|
+
void lookLabel($, true)
|
|
176
|
+
}
|
|
177
|
+
await $.command.register({ name: 'sessions', description: text.command })
|
|
178
|
+
// A reload keeps an open pane but starts the module over: pick its refresh up again.
|
|
179
|
+
if (await paneIsOpen($)) {
|
|
180
|
+
void readSessions($)
|
|
181
|
+
watchPane($)
|
|
182
|
+
}
|
|
183
|
+
return next(e)
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
on('turn.complete', async ($, e, next) => {
|
|
187
|
+
void lookLabel($)
|
|
188
|
+
return next(e)
|
|
189
|
+
})
|
|
190
|
+
|
|
191
|
+
// Only watches: every delivery goes on unchanged, also when the toast fails. `sideby send` arrives through the
|
|
192
|
+
// session's message socket, which Claude Code marks as a peer's message; a relay quoting the line raises nothing.
|
|
193
|
+
on('session.receive', async ($, e, next) => {
|
|
194
|
+
const first = e.origin?.kind === 'peer' ? MESSAGE_LINE.exec(e.text.split('\n', 1)[0] ?? '') : null
|
|
195
|
+
if (first) {
|
|
196
|
+
$.ui.toast(text.arrived(first[2].trim()))
|
|
197
|
+
void paneIsOpen($).then((open) => open && readSessions($))
|
|
198
|
+
}
|
|
199
|
+
return next(e)
|
|
200
|
+
}).catch((_$, e, next) => next(e))
|
|
201
|
+
|
|
202
|
+
on('command.run', { command: 'sessions' }, async ($) => {
|
|
203
|
+
await openPane($)
|
|
204
|
+
return { text: text.opened }
|
|
205
|
+
})
|
|
206
|
+
|
|
207
|
+
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
|
|
208
|
+
if (!label || e.props.hasSurvey) return next(e)
|
|
209
|
+
const { Box, Text } = $.ui.resolve(e)
|
|
210
|
+
return h(Box, null, h(Text, { dimColor: true }, label))
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
|
|
214
|
+
const { Box, Text, Button } = $.ui.resolve(e)
|
|
215
|
+
if (!list.loaded) return h(Text, { dimColor: true }, text.loading)
|
|
216
|
+
const now = await $.clock.now()
|
|
217
|
+
const self = account ? await $.session.id() : undefined
|
|
218
|
+
const rows = list.sessions.map((s) => {
|
|
219
|
+
const minutes = Math.max(0, Math.floor((now - Date.parse(s.updatedAt ?? s.startedAt)) / 60_000))
|
|
220
|
+
const details = [
|
|
221
|
+
text.status[s.status] ?? s.status,
|
|
222
|
+
where(s.cwd),
|
|
223
|
+
Number.isFinite(minutes) ? text.ago(minutes) : '',
|
|
224
|
+
s.guessed ? text.guessed : '',
|
|
225
|
+
s.run?.title ? `${text.run}${s.run.title}` : '',
|
|
226
|
+
].filter(Boolean)
|
|
227
|
+
return h(
|
|
228
|
+
Box,
|
|
229
|
+
{ key: s.sessionId, flexDirection: 'column' },
|
|
230
|
+
h(
|
|
231
|
+
Text,
|
|
232
|
+
{ bold: s.sessionId === self },
|
|
233
|
+
`${DOT[s.status] ?? '·'} ${s.label}${s.sessionId === self ? text.thisOne : ''}`,
|
|
234
|
+
),
|
|
235
|
+
h(Text, { dimColor: true }, ` ${details.join(' · ')}`),
|
|
236
|
+
h(
|
|
237
|
+
Box,
|
|
238
|
+
{ gap: 1 },
|
|
239
|
+
h(Button, {
|
|
240
|
+
key: `ref-${s.sessionId}`,
|
|
241
|
+
label: text.copyRef,
|
|
242
|
+
onPress: (p) => copy($, p, s.reference),
|
|
243
|
+
}),
|
|
244
|
+
h(Button, {
|
|
245
|
+
key: `id-${s.sessionId}`,
|
|
246
|
+
label: text.copyId,
|
|
247
|
+
onPress: (p) => copy($, p, s.sessionId),
|
|
248
|
+
}),
|
|
249
|
+
),
|
|
250
|
+
)
|
|
251
|
+
})
|
|
252
|
+
return h(
|
|
253
|
+
Box,
|
|
254
|
+
{ flexDirection: 'column', gap: 1 },
|
|
255
|
+
list.error ? h(Text, { color: 'error' }, list.error) : null,
|
|
256
|
+
rows.length === 0 && !list.error ? h(Text, { dimColor: true }, text.empty) : null,
|
|
257
|
+
...rows,
|
|
258
|
+
rows.length ? h(Text, { dimColor: true }, text.hint) : null,
|
|
259
|
+
)
|
|
260
|
+
})
|
|
261
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sideby",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Run work, personal and API-key accounts at the same time, without their configs drifting apart.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Adonis0123 (https://github.com/Adonis0123)",
|
|
@@ -49,6 +49,9 @@
|
|
|
49
49
|
"dist",
|
|
50
50
|
"schemas",
|
|
51
51
|
"skills",
|
|
52
|
+
"mods/claude/.claude-plugin",
|
|
53
|
+
"mods/claude/hooks/hooks.json",
|
|
54
|
+
"mods/claude/hooks/register.js",
|
|
52
55
|
"ai-tasks.json",
|
|
53
56
|
"README.md",
|
|
54
57
|
"README.zh-CN.md",
|
|
@@ -81,5 +84,5 @@
|
|
|
81
84
|
},
|
|
82
85
|
"packageManager": "pnpm@10.15.0",
|
|
83
86
|
"readmeFilename": "README.md",
|
|
84
|
-
"readme": "<p align=\"center\">\n <img alt=\"sideby: work, personal and API-key accounts, one terminal each, one shared config\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/banner.jpg\" width=\"880\">\n</p>\n\n<p align=\"center\">\n <b>Run work, personal and API-key accounts at the same time, without their configs drifting apart.</b><br>\n Each account is its own directory and its own terminal. Skills, hooks and settings stay linked to your main account. Claude Code, Codex, Grok Build and pi.\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/sideby\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/sideby\"></a>\n <a href=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml/badge.svg\"></a>\n <img alt=\"Node 22.18+\" src=\"https://img.shields.io/badge/node-%E2%89%A522.18-339933\">\n <a href=\"LICENSE\"><img alt=\"MIT\" src=\"https://img.shields.io/badge/license-MIT-blue\"></a>\n</p>\n\n<p align=\"center\">English | <a href=\"README.zh-CN.md\">中文</a></p>\n\n## Quick start\n\nRequires Node 22.18+ and at least one Host CLI (Claude Code, Codex, Grok Build or pi) installed. AI agents: follow the setup steps in [`llms.txt`](llms.txt) (\"Set up sideby for a user\") instead.\n\n```sh\nnpm i -g sideby\nsideby new claude work # create ~/.claude-work, sharing ~/.claude's skills and hooks\nsideby login claude:work # sign in once\nsideby run work # Claude Code on the work account\nsideby quota setup claude --yes # Claude quota in the panel; undo: sideby quota teardown claude\nsideby ui --background # every account's quota at http://127.0.0.1:17420, still there after you close the terminal\n```\n\n`sideby app install` adds a Dock icon that opens the panel, and `sideby autostart on` has it ready each time you log in. `sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.\n\n## Set up with your AI agent\n\nPaste this into Claude Code, Codex or any coding agent:\n\n```text\nInstall the sideby CLI (npm package `sideby`) and its agent skill, then set up a second Claude Code account for me.\nFollow \"Set up sideby for a user\" in https://raw.githubusercontent.com/Adonis0123/sideby/main/llms.txt\n```\n\nThe agent checks Node and your Host CLIs, installs sideby and the skill, creates the account, tells you what it shares with your main one and makes its short command work. You sign in once in your browser; the agent gives you that one command. Once the skill is installed, short requests work too: \"add another Claude account, cc008\", \"what do my Codex accounts share?\", \"which account still has quota?\".\n\n## What it looks like\n\nThe 25-second story: one account buried in tasks, then accounts side by side sharing one setup, and a task moving on when one runs out.\n\nhttps://github.com/user-attachments/assets/d1d7e8dd-1df1-4881-ac88-e468c2dd4a1d\n\n<img alt=\"Two terminals: the personal account and the work account running at the same time, both linked to the main account's skills and settings, then the local quota panel, and at 95% Auto Handoff moving work's session to the next account\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/demo.gif\" width=\"1280\">\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\">\n <img alt=\"sideby panel: every account's 5h and 7d quota, 7-day token usage and health in one page\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\" width=\"1280\">\n</picture>\n\nOn macOS, the same quota sits in the menu bar (`sideby menubar on`): click or press `⌥⌘S` to open it, and click an account to start it in the terminal.\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\">\n <img alt=\"sideby macOS menu bar dropdown: a status card, each tool with 5-hour and weekly quota bars, reset times, and the suggested account marked\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\" width=\"468\">\n</picture>\n\n## Why not just an alias?\n\n`CLAUDE_CONFIG_DIR` plus a shell alias already starts a second account. It does not keep skills and settings in one place, and it does not show quota for every account. [Does this break a provider's terms?](docs/guide/faq.md#terms)\n\n| | At the same time | Skills, hooks, settings | Quota and usage | Setup |\n|---|---|---|---|---|\n| `CLAUDE_CONFIG_DIR` and an alias | Yes. Each terminal exports the variable. | Each directory is its own copy. They drift unless you symlink by hand. | That session's status line | One alias per account |\n| [cc-switch](https://github.com/farion1231/cc-switch) | Enabling a provider writes the host's live config, so open sessions share that switch. | Plugin settings are copied across providers as a separate step. | The active provider, from its quota endpoint | Install the desktop app |\n| sideby | Yes. `sideby run` selects the directory for that process and leaves your shell alone. | Linked to the main account. `sideby doctor --fix` repairs copies. Sign-in and sessions stay separate. | Every account, from local files. Claude needs `quota setup`. | `npm i -g sideby`, then `sideby new` and sign in |\n\ncc-switch's docs describe that switch: it writes the live settings file ([README](https://github.com/farion1231/cc-switch#readme)). [#1105](https://github.com/farion1231/cc-switch/issues/1105) and [#2908](https://github.com/farion1231/cc-switch/issues/2908) ask for several sessions at once. [#1106](https://github.com/farion1231/cc-switch/issues/1106) is closed; the maintainer says Claude Code's \"open terminal\" can start one provider without changing the global config.\n\n## What else it does\n\n| You want to | Run | Guide |\n|---|---|---|\n| Hand a task to your own AI from the panel: set up an account, fix a problem, support a new tool | **Let AI do it** in the panel, or `sideby ask` | [Let AI do it](docs/guide/panel.md#let-ai-do-it) |\n| See quota at a glance in the macOS menu bar | **Settings › Startup** in the panel, or `sideby menubar on` | [Quota in the menu bar](docs/guide/usage.md#quota-in-the-menu-bar) |\n| Have the panel ready in the background whenever you log in | **Settings › Startup** in the panel, or `sideby autostart on` | [Start at login](docs/guide/usage.md#start-at-login) |\n| Add an API key account (DeepSeek, a gateway, …) | `sideby new claude deepseek --api` | [API accounts](docs/guide/usage.md#api-accounts) |\n| Find and fix config drift between accounts | `sideby doctor --fix` | [Doctor](docs/guide/usage.md#doctor) |\n| See Claude quota (Codex needs no setup) | `sideby quota setup claude --yes` | [Claude quota](docs/guide/usage.md#claude-quota) |\n| Find the cheapest auto-compact size from your own sessions, and use it in one click | `sideby tune` (or the panel's Context tuning tab) | [Context tuning](docs/guide/usage.md#context-tuning) |\n| See each account's model and effort, and set them per account | `sideby model <account>` (or click the model in the panel) | [Model and effort](docs/guide/usage.md#model-and-effort) |\n| Choose whether Claude sessions connect to claude.ai by themselves (Remote Control), for every account at once | `sideby remote-control off` or `on` (or the panel's Settings) | [Remote Control](docs/guide/usage.md#remote-control) |\n| Pin the accounts you use most and put tools and accounts in your own order | `sideby pin claude:work`, `sideby order` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Move on when an account hits its limit | `sideby next claude` | [Handoff](docs/guide/usage.md#when-an-account-hits-its-limit) |\n| Let a running task move to the next account by itself when quota runs low (off by default; see the risk) | `sideby handoff enable` (or the panel) | [Auto Handoff](docs/guide/usage.md#auto-handoff) |\n| Short commands such as `ccw` | `sideby alias add ccw claude:work` | [Shell functions](docs/guide/configuration.md#shell-functions) |\n| Reopen a session from Orca and the like in the account that holds it | `\"resumeRouting\": true` in config | [Resuming from other tools](docs/guide/configuration.md#resuming-from-other-tools) |\n| Open Claude Desktop or the Codex app as one account, several side by side (macOS) | `sideby desktop claude:work` (or the panel) | [Desktop apps](docs/guide/usage.md#desktop-apps) |\n| Keep several Grok Bot windows open, each signed in to its own account (macOS) | `sideby desktop grok-bot:002` (or the panel) | [Grok Bot windows](docs/guide/usage.md#grok-bot-windows) |\n| Open the panel from the Dock or app menu | `sideby app install` | [Panel app](docs/guide/panel.md#panel-app) |\n| Show the panel inside your own local page | `createPanelHandler()` | [Embed the panel](docs/guide/panel.md#embed-the-panel) |\n| Add a Host or a pre-launch check | a local plugin | [Plugins](docs/guide/plugins.md) |\n\n## Supported hosts\n\n| Host | Account directories | Sign-in | Quota | Usage (7 days) |\n|---|---|---|---|---|\n| Claude Code | `~/.claude`, `~/.claude-<name>` | `claude auth login` | ✓ after `quota setup claude` | ✓ |\n| Codex CLI | `~/.codex`, `~/.codex-<name>` | `codex login` | ✓ | ✓ |\n| Grok Build | `~/.grok`, `~/.grok-<name>` | `grok login` | weekly, asked from the `grok` CLI | no public source |\n| pi | `~/.pi/agent`, `~/.pi-<name>/agent` | `/login` inside pi | no public source | no public source |\n\nsideby starts the official binary on your `PATH` and never patches it. Tested versions and per-Host notes are in the [guide](docs/guide/usage.md#host-notes).\n\n## Platforms\n\nmacOS and Linux. CI runs the suite on `ubuntu-latest` and `macos-latest`, Node 22 and 24. **Windows is untested.** `sideby app` only installs a launcher on macOS and Linux. Linked items are symlinks, `sideby shell-init` prints bash and zsh functions, and the Claude quota wrapper runs `/bin/sh`.\n\n## Roadmap\n\n**Gemini CLI.** Gemini can point at another config directory with `GEMINI_CONFIG_DIR`. Older docs use `GEMINI_CLI_HOME`; current builds treat that name as deprecated, and exit on startup if it is set together with an exact directory override. A sideby family still needs a tested Gemini version, a login check that does not read tokens, and a list of which files to link or copy. That is more than a small patch, so it is not in this version.\n\n## Safe by design\n\n- It never edits a Host's global config to switch accounts. It moves a task to another account only when you turn on Auto Handoff, and never proxies requests or pools logins.\n- It never reads, prints or sends a credential value. Nothing about your accounts leaves your machine: the only request sideby makes on its own is a daily check of the npm registry for its newest version (off with `NO_UPDATE_NOTIFIER=1`; see [Updates](docs/guide/configuration.md#updates)).\n- `doctor --fix` never replaces a real file and never changes where a link points.\n- The panel answers only on `127.0.0.1` and refuses web pages from other sites, but it trusts every user of this computer. On a shared Mac, do not leave it running in the background ([details](docs/guide/panel.md#who-can-reach-the-panel)).\n\nDetails and the terms-of-service question are in the [FAQ](docs/guide/faq.md).\n\nUsage questions and ideas go in [Discussions](https://github.com/Adonis0123/sideby/discussions).\n\n## Docs\n\n- [Using sideby](docs/guide/usage.md): accounts, API accounts, Doctor, quota, Handoff, Host notes\n- [Commands](docs/guide/commands.md): every command, exit codes and `--json`\n- [Configuration](docs/guide/configuration.md): `config.json`, aliases, shell functions\n- [Panel](docs/guide/panel.md): the panel, panel app and embedding\n- [Plugins](docs/guide/plugins.md): write your own Family or launch hook\n- [FAQ](docs/guide/faq.md): terms of service, data locations, alternatives, uninstall\n- [Changelog](https://github.com/Adonis0123/sideby/releases)\n\n## For AI agents\n\n- [`llms.txt`](llms.txt): setup steps, commands, JSON contract and plugin API in one index. `sideby families --json` states what each Host's accounts share.\n- [`skills/sideby/SKILL.md`](skills/sideby/SKILL.md): one Agent Skill for seeing, repairing and creating accounts and for moving on when one hits its limit. Install with `npx skills add Adonis0123/sideby -g`; `sideby doctor` warns when the installed copy is for another sideby version.\n- [`AGENTS.md`](AGENTS.md): rules for agents working on this repository.\n\n## License\n\n[MIT](LICENSE)\n"
|
|
87
|
+
"readme": "<p align=\"center\">\n <img alt=\"sideby: work, personal and API-key accounts, one terminal each, one shared config\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/banner.jpg\" width=\"880\">\n</p>\n\n<p align=\"center\">\n <b>Run work, personal and API-key accounts at the same time, without their configs drifting apart.</b><br>\n Each account is its own directory and its own terminal. Skills, hooks and settings stay linked to your main account. Claude Code, Codex, Grok Build and pi.\n</p>\n\n<p align=\"center\">\n <a href=\"https://www.npmjs.com/package/sideby\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/sideby\"></a>\n <a href=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml\"><img alt=\"CI\" src=\"https://github.com/Adonis0123/sideby/actions/workflows/ci.yml/badge.svg\"></a>\n <img alt=\"Node 22.18+\" src=\"https://img.shields.io/badge/node-%E2%89%A522.18-339933\">\n <a href=\"LICENSE\"><img alt=\"MIT\" src=\"https://img.shields.io/badge/license-MIT-blue\"></a>\n</p>\n\n<p align=\"center\">English | <a href=\"README.zh-CN.md\">中文</a></p>\n\n## Quick start\n\nRequires Node 22.18+ and at least one Host CLI (Claude Code, Codex, Grok Build or pi) installed. AI agents: follow the setup steps in [`llms.txt`](llms.txt) (\"Set up sideby for a user\") instead.\n\n```sh\nnpm i -g sideby\nsideby new claude work # create ~/.claude-work, sharing ~/.claude's skills and hooks\nsideby login claude:work # sign in once\nsideby run work # Claude Code on the work account\nsideby quota setup claude --yes # Claude quota in the panel; undo: sideby quota teardown claude\nsideby ui --background # every account's quota at http://127.0.0.1:17420, still there after you close the terminal\n```\n\n`sideby app install` adds a Dock icon that opens the panel, and `sideby autostart on` has it ready each time you log in. `sideby update` installs a newer sideby when there is one; sideby says so after a command and in the panel. `sideby run claude:main` keeps using `~/.claude` in another terminal at the same time. Arguments after `--` go to the Host: `sideby run work -- --resume`. To try it without installing, run `npx sideby`.\n\n## Set up with your AI agent\n\nPaste this into Claude Code, Codex or any coding agent:\n\n```text\nInstall the sideby CLI (npm package `sideby`) and its agent skill, then set up a second Claude Code account for me.\nFollow \"Set up sideby for a user\" in https://raw.githubusercontent.com/Adonis0123/sideby/main/llms.txt\n```\n\nThe agent checks Node and your Host CLIs, installs sideby and the skill, creates the account, tells you what it shares with your main one and makes its short command work. You sign in once in your browser; the agent gives you that one command. Once the skill is installed, short requests work too: \"add another Claude account, cc008\", \"what do my Codex accounts share?\", \"which account still has quota?\".\n\n## What it looks like\n\nThe 25-second story: one account buried in tasks, then accounts side by side sharing one setup, and a task moving on when one runs out.\n\nhttps://github.com/user-attachments/assets/d1d7e8dd-1df1-4881-ac88-e468c2dd4a1d\n\n<img alt=\"Two terminals: the personal account and the work account running at the same time, both linked to the main account's skills and settings, then the local quota panel, and at 95% Auto Handoff moving work's session to the next account\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/demo.gif\" width=\"1280\">\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\">\n <img alt=\"sideby panel: every account's 5h and 7d quota, 7-day token usage and health in one page\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/panel.png\" width=\"1280\">\n</picture>\n\nOn macOS, the same quota sits in the menu bar (`sideby menubar on`): click or press `⌥X` to open it, and click an account to start it in the terminal.\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar-dark.png\">\n <source media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\">\n <img alt=\"sideby macOS menu bar dropdown: a status card, each tool with 5-hour and weekly quota bars, reset times, and the suggested account marked\" src=\"https://raw.githubusercontent.com/Adonis0123/sideby/main/docs/assets/menubar.png\" width=\"468\">\n</picture>\n\n## Why not just an alias?\n\n`CLAUDE_CONFIG_DIR` plus a shell alias already starts a second account. It does not keep skills and settings in one place, and it does not show quota for every account. [Does this break a provider's terms?](docs/guide/faq.md#terms)\n\n| | At the same time | Skills, hooks, settings | Quota and usage | Setup |\n|---|---|---|---|---|\n| `CLAUDE_CONFIG_DIR` and an alias | Yes. Each terminal exports the variable. | Each directory is its own copy. They drift unless you symlink by hand. | That session's status line | One alias per account |\n| [cc-switch](https://github.com/farion1231/cc-switch) | Enabling a provider writes the host's live config, so open sessions share that switch. | Plugin settings are copied across providers as a separate step. | The active provider, from its quota endpoint | Install the desktop app |\n| sideby | Yes. `sideby run` selects the directory for that process and leaves your shell alone. | Linked to the main account. `sideby doctor --fix` repairs copies. Sign-in and sessions stay separate. | Every account, from local files. Claude needs `quota setup`. | `npm i -g sideby`, then `sideby new` and sign in |\n\ncc-switch's docs describe that switch: it writes the live settings file ([README](https://github.com/farion1231/cc-switch#readme)). [#1105](https://github.com/farion1231/cc-switch/issues/1105) and [#2908](https://github.com/farion1231/cc-switch/issues/2908) ask for several sessions at once. [#1106](https://github.com/farion1231/cc-switch/issues/1106) is closed; the maintainer says Claude Code's \"open terminal\" can start one provider without changing the global config.\n\n## What else it does\n\n| You want to | Run | Guide |\n|---|---|---|\n| Find any past session of any account by what you remember, grouped by project, read it and continue it where it was | **Sessions › History** in the panel, or `sideby history \"fix login\" --project .` | [History](docs/guide/panel.md#history) |\n| See what every account is running right now and copy one session for another AI | **Sessions › Running** in the panel, or `sideby sessions` | [Sessions](docs/guide/panel.md#sessions) |\n| Send a running session a message, screenshots included | **Send to it** on a running session, or `sideby send claude:work \"run the tests\"` | [Send to a session](docs/guide/panel.md#send-to-a-session) |\n| Hand a task to your own AI from the panel: set up an account, fix a problem, support a new tool | **Let AI do it** in the panel, or `sideby ask` | [Let AI do it](docs/guide/panel.md#let-ai-do-it) |\n| See quota at a glance in the macOS menu bar | **Settings › Startup** in the panel, or `sideby menubar on` | [Quota in the menu bar](docs/guide/usage.md#quota-in-the-menu-bar) |\n| Have the panel ready in the background whenever you log in | **Settings › Startup** in the panel, or `sideby autostart on` | [Start at login](docs/guide/usage.md#start-at-login) |\n| Add an API key account (DeepSeek, a gateway, …) | `sideby new claude deepseek --api` | [API accounts](docs/guide/usage.md#api-accounts) |\n| Find and fix config drift between accounts | `sideby doctor --fix` | [Doctor](docs/guide/usage.md#doctor) |\n| See Claude quota (Codex needs no setup) | `sideby quota setup claude --yes` | [Claude quota](docs/guide/usage.md#claude-quota) |\n| Find the cheapest auto-compact size from your own sessions, and use it in one click | `sideby tune` (or the panel's Context tuning tab) | [Context tuning](docs/guide/usage.md#context-tuning) |\n| See each account's model and effort, and set them per account | `sideby model <account>` (or click the model in the panel) | [Model and effort](docs/guide/usage.md#model-and-effort) |\n| Choose whether Claude sessions connect to claude.ai by themselves (Remote Control), for every account at once | `sideby remote-control off` or `on` (or the panel's Settings) | [Remote Control](docs/guide/usage.md#remote-control) |\n| Pin the accounts you use most and put tools and accounts in your own order | `sideby pin claude:work`, `sideby order` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Move on when an account hits its limit | `sideby next claude` | [Handoff](docs/guide/usage.md#when-an-account-hits-its-limit) |\n| Let a running task move to the next account by itself when quota runs low (off by default; see the risk) | `sideby handoff enable` (or the panel) | [Auto Handoff](docs/guide/usage.md#auto-handoff) |\n| Short commands such as `ccw` | `sideby alias add ccw claude:work` | [Shell functions](docs/guide/configuration.md#shell-functions) |\n| Reopen a session from Orca and the like in the account that holds it | `\"resumeRouting\": true` in config | [Resuming from other tools](docs/guide/configuration.md#resuming-from-other-tools) |\n| Open Claude Desktop or the Codex app as one account, several side by side (macOS) | `sideby desktop claude:work` (or the panel) | [Desktop apps](docs/guide/usage.md#desktop-apps) |\n| Keep several Grok Bot windows open, each signed in to its own account (macOS) | `sideby desktop grok-bot:002` (or the panel) | [Grok Bot windows](docs/guide/usage.md#grok-bot-windows) |\n| Open the panel from the Dock or app menu | `sideby app install` | [Panel app](docs/guide/panel.md#panel-app) |\n| Show the panel inside your own local page | `createPanelHandler()` | [Embed the panel](docs/guide/panel.md#embed-the-panel) |\n| Add a Host, a pre-launch check, or your own project categories for History | a local plugin | [Plugins](docs/guide/plugins.md) |\n\n## Supported hosts\n\n| Host | Account directories | Sign-in | Quota | Usage (7 days) |\n|---|---|---|---|---|\n| Claude Code | `~/.claude`, `~/.claude-<name>` | `claude auth login` | ✓ after `quota setup claude` | ✓ |\n| Codex CLI | `~/.codex`, `~/.codex-<name>` | `codex login` | ✓ | ✓ |\n| Grok Build | `~/.grok`, `~/.grok-<name>` | `grok login` | weekly, asked from the `grok` CLI | no public source |\n| pi | `~/.pi/agent`, `~/.pi-<name>/agent` | `/login` inside pi | no public source | no public source |\n\nsideby starts the official binary on your `PATH` and never patches it. Tested versions and per-Host notes are in the [guide](docs/guide/usage.md#host-notes).\n\n## Platforms\n\nmacOS and Linux. CI runs the suite on `ubuntu-latest` and `macos-latest`, Node 22 and 24. **Windows is untested.** `sideby app` only installs a launcher on macOS and Linux. Linked items are symlinks, `sideby shell-init` prints bash and zsh functions, and the Claude quota wrapper runs `/bin/sh`.\n\n## Roadmap\n\n**Gemini CLI.** Gemini can point at another config directory with `GEMINI_CONFIG_DIR`. Older docs use `GEMINI_CLI_HOME`; current builds treat that name as deprecated, and exit on startup if it is set together with an exact directory override. A sideby family still needs a tested Gemini version, a login check that does not read tokens, and a list of which files to link or copy. That is more than a small patch, so it is not in this version.\n\n## Safe by design\n\n- It never edits a Host's global config to switch accounts. It moves a task to another account only when you turn on Auto Handoff, and never proxies requests or pools logins.\n- It never reads, prints or sends a credential value. Nothing about your accounts leaves your machine: the only request sideby makes on its own is a daily check of the npm registry for its newest version (off with `NO_UPDATE_NOTIFIER=1`; see [Updates](docs/guide/configuration.md#updates)).\n- `doctor --fix` never replaces a real file and never changes where a link points.\n- The panel answers only on `127.0.0.1` and refuses web pages from other sites, but it trusts every user of this computer. On a shared Mac, do not leave it running in the background ([details](docs/guide/panel.md#who-can-reach-the-panel)).\n\nDetails and the terms-of-service question are in the [FAQ](docs/guide/faq.md).\n\nUsage questions and ideas go in [Discussions](https://github.com/Adonis0123/sideby/discussions).\n\n## Docs\n\n- [Using sideby](docs/guide/usage.md): accounts, API accounts, Doctor, quota, Handoff, Host notes\n- [Commands](docs/guide/commands.md): every command, exit codes and `--json`\n- [Configuration](docs/guide/configuration.md): `config.json`, aliases, shell functions\n- [Panel](docs/guide/panel.md): the panel, sessions and their history, panel app and embedding\n- [Plugins](docs/guide/plugins.md): write your own Family, launch hook or project categories\n- [FAQ](docs/guide/faq.md): terms of service, data locations, alternatives, uninstall\n- [Changelog](https://github.com/Adonis0123/sideby/releases)\n\n## For AI agents\n\n- [`llms.txt`](llms.txt): setup steps, commands, JSON contract and plugin API in one index. `sideby families --json` states what each Host's accounts share.\n- [`skills/sideby/SKILL.md`](skills/sideby/SKILL.md): one Agent Skill for seeing, repairing and creating accounts and for moving on when one hits its limit. Install with `npx skills add Adonis0123/sideby -g`; `sideby doctor` warns when the installed copy is for another sideby version.\n- [`AGENTS.md`](AGENTS.md): rules for agents working on this repository.\n\n## License\n\n[MIT](LICENSE)\n"
|
|
85
88
|
}
|
package/schemas/autostart.json
CHANGED
|
@@ -94,11 +94,84 @@
|
|
|
94
94
|
},
|
|
95
95
|
"loaded": {
|
|
96
96
|
"type": "boolean",
|
|
97
|
-
"description": "launchd took the
|
|
97
|
+
"description": "After a change: launchd took it now. In a status of the menu bar item: launchd holds it now; false means it is on but not running until `sideby menubar on` or the next login."
|
|
98
98
|
},
|
|
99
99
|
"note": {
|
|
100
100
|
"type": "string"
|
|
101
101
|
},
|
|
102
|
+
"hotkey": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": [
|
|
105
|
+
"keys",
|
|
106
|
+
"label",
|
|
107
|
+
"enabled",
|
|
108
|
+
"isDefault",
|
|
109
|
+
"registered"
|
|
110
|
+
],
|
|
111
|
+
"properties": {
|
|
112
|
+
"keys": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "As config `menubar.hotkey` holds it, or the default: `opt+x`, `off`."
|
|
115
|
+
},
|
|
116
|
+
"label": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "As macOS writes it, such as `⌥⌘S`; empty when off."
|
|
119
|
+
},
|
|
120
|
+
"enabled": {
|
|
121
|
+
"type": "boolean"
|
|
122
|
+
},
|
|
123
|
+
"isDefault": {
|
|
124
|
+
"type": "boolean"
|
|
125
|
+
},
|
|
126
|
+
"registered": {
|
|
127
|
+
"anyOf": [
|
|
128
|
+
{
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "null"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"description": "Whether the menu bar item could register it: false means another app or macOS holds it; null when it has not said yet or it is off."
|
|
136
|
+
},
|
|
137
|
+
"problem": {
|
|
138
|
+
"type": "object",
|
|
139
|
+
"required": [
|
|
140
|
+
"code",
|
|
141
|
+
"message"
|
|
142
|
+
],
|
|
143
|
+
"properties": {
|
|
144
|
+
"code": {
|
|
145
|
+
"type": "string"
|
|
146
|
+
},
|
|
147
|
+
"message": {
|
|
148
|
+
"type": "string"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"description": "A value config allows but a new choice would be refused for; it still works."
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"icon": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"required": [
|
|
158
|
+
"visible"
|
|
159
|
+
],
|
|
160
|
+
"properties": {
|
|
161
|
+
"visible": {
|
|
162
|
+
"anyOf": [
|
|
163
|
+
{
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "null"
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"description": "Whether macOS shows the menu bar icon right now: false when it sits behind « (the menu bar is full) or is covered; null when the item has not said in the last 15 minutes."
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"description": "Only while the menu bar item is on."
|
|
174
|
+
},
|
|
102
175
|
"_notice": {
|
|
103
176
|
"type": "object",
|
|
104
177
|
"properties": {
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "sideby/browser-set.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"schemaVersion",
|
|
7
|
+
"ref",
|
|
8
|
+
"profile",
|
|
9
|
+
"changed"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"schemaVersion": {
|
|
13
|
+
"type": "number",
|
|
14
|
+
"const": 1
|
|
15
|
+
},
|
|
16
|
+
"ref": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
"profile": {
|
|
20
|
+
"anyOf": [
|
|
21
|
+
{
|
|
22
|
+
"type": "object",
|
|
23
|
+
"required": [
|
|
24
|
+
"dir",
|
|
25
|
+
"name"
|
|
26
|
+
],
|
|
27
|
+
"properties": {
|
|
28
|
+
"dir": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"name": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "null"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"description": "The browser user now chosen, or null with --auto (sideby finds it again by itself)."
|
|
41
|
+
},
|
|
42
|
+
"changed": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"description": "False when config already said so."
|
|
45
|
+
},
|
|
46
|
+
"_notice": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"properties": {
|
|
49
|
+
"update": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": [
|
|
52
|
+
"current",
|
|
53
|
+
"latest",
|
|
54
|
+
"command",
|
|
55
|
+
"message"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"current": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"latest": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"command": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "Run it after the user agrees: it shows the plan and exits 10; then --yes."
|
|
67
|
+
},
|
|
68
|
+
"message": {
|
|
69
|
+
"type": "string"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"skill": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"required": [
|
|
76
|
+
"installed",
|
|
77
|
+
"current",
|
|
78
|
+
"command",
|
|
79
|
+
"message"
|
|
80
|
+
],
|
|
81
|
+
"properties": {
|
|
82
|
+
"installed": {
|
|
83
|
+
"anyOf": [
|
|
84
|
+
{
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "null"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"description": "The skill's version; null when it has none."
|
|
92
|
+
},
|
|
93
|
+
"current": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"command": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"description": "`sideby update`, which updates the skill with sideby: run it after the user agrees; it shows the plan and exits 10, then --yes."
|
|
99
|
+
},
|
|
100
|
+
"message": {
|
|
101
|
+
"type": "string"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"description": "Not the answer to the task: mention it briefly afterwards and offer to update."
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"title": "sideby browser set --json"
|
|
110
|
+
}
|
package/schemas/browser.json
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
"found",
|
|
10
10
|
"profiles",
|
|
11
11
|
"families",
|
|
12
|
+
"sites",
|
|
13
|
+
"choices",
|
|
12
14
|
"problems"
|
|
13
15
|
],
|
|
14
16
|
"properties": {
|
|
@@ -55,7 +57,7 @@
|
|
|
55
57
|
"items": {
|
|
56
58
|
"type": "string"
|
|
57
59
|
},
|
|
58
|
-
"description": "Refs of the accounts this browser user signed in to on the vendor's website, as far as its local data shows; it may be left over from before a sign-out."
|
|
60
|
+
"description": "Refs of the accounts this browser user signed in to on the vendor's website, as far as its local data shows; it may be left over from before a sign-out. When several browser users show one account, only those whose Google account is the account's login email are kept; an account found nowhere gets the one browser user whose Google account is its login email. A user's choice replaces all of this."
|
|
59
61
|
},
|
|
60
62
|
"changedAt": {
|
|
61
63
|
"type": "string",
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
"items": {
|
|
78
80
|
"type": "string"
|
|
79
81
|
},
|
|
80
|
-
"description": "Families whose accounts can be matched (claude, codex)."
|
|
82
|
+
"description": "Families whose accounts can be matched (claude, codex, and plugin families whose `website` has `match`)."
|
|
81
83
|
},
|
|
82
84
|
"openOnly": {
|
|
83
85
|
"type": "array",
|
|
@@ -88,6 +90,24 @@
|
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
},
|
|
93
|
+
"sites": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"patternProperties": {
|
|
96
|
+
"^.*$": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"description": "Family → the https address its accounts open, for the families above."
|
|
101
|
+
},
|
|
102
|
+
"choices": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"patternProperties": {
|
|
105
|
+
"^.*$": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"description": "Account ref → the folder of the browser user the user chose for it (`sideby browser set`); such an account is in that profile's `signIns` alone. A choice whose folder is gone is left out and named in `problems`."
|
|
110
|
+
},
|
|
91
111
|
"problems": {
|
|
92
112
|
"type": "array",
|
|
93
113
|
"items": {
|
package/schemas/config.json
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"hotkey": {
|
|
38
38
|
"type": "string",
|
|
39
39
|
"pattern": "^(off|((ctrl|opt|cmd|shift)\\+)+[a-z0-9])$",
|
|
40
|
-
"description": "The shortcut that opens the menu bar item from anywhere, such as `opt+
|
|
40
|
+
"description": "The shortcut that opens the menu bar item from anywhere, such as `opt+x` (default), or `off`."
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"additionalProperties": false,
|
|
@@ -235,6 +235,10 @@
|
|
|
235
235
|
"type": "boolean",
|
|
236
236
|
"description": "Set the terminal title to `[<short command or account>]` when sideby starts an Account, and keep Hosts that allow it (Codex) from replacing it. Off by default."
|
|
237
237
|
},
|
|
238
|
+
"claudeMod": {
|
|
239
|
+
"type": "boolean",
|
|
240
|
+
"description": "Load sideby's Claude Code mod (`--plugin-dir`, Claude Code 2.1.287 or later) when sideby starts a Claude Code account: a band with the Session Label, a toast when a Message arrives and a `/sessions` pane. On by default; false turns it off."
|
|
241
|
+
},
|
|
238
242
|
"resumeRouting": {
|
|
239
243
|
"type": "boolean",
|
|
240
244
|
"description": "Make `sideby shell-init` also define Host-named functions (`claude`, `codex`, `grok`) that resume a session by id in the Account that holds it. Off by default."
|
|
@@ -333,12 +337,33 @@
|
|
|
333
337
|
"additionalProperties": false,
|
|
334
338
|
"description": "Update Check and Auto Update (ADR-0021)."
|
|
335
339
|
},
|
|
340
|
+
"history": {
|
|
341
|
+
"type": "object",
|
|
342
|
+
"properties": {
|
|
343
|
+
"index": {
|
|
344
|
+
"type": "boolean",
|
|
345
|
+
"description": "Keep a local History Index of every Session's title, Project, typed prompts and model replies (never tool output) in sideby's state folder, so Session History opens and searches at once. On by default; false stops it and deletes the index."
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"additionalProperties": false,
|
|
349
|
+
"description": "Session History (spec §3.33, ADR-0042)."
|
|
350
|
+
},
|
|
336
351
|
"browser": {
|
|
337
352
|
"type": "object",
|
|
338
353
|
"properties": {
|
|
339
354
|
"signIns": {
|
|
340
355
|
"type": "boolean",
|
|
341
356
|
"description": "Look in Google Chrome's local data for which browser user signed in to each Account's website (key names only, never cookies or passwords; nothing leaves this computer). Off by default."
|
|
357
|
+
},
|
|
358
|
+
"choices": {
|
|
359
|
+
"type": "object",
|
|
360
|
+
"patternProperties": {
|
|
361
|
+
"^[a-z0-9][a-z0-9-]*:[a-z0-9][a-z0-9-]*$": {
|
|
362
|
+
"type": "string",
|
|
363
|
+
"pattern": "^[\\w .-]{1,64}$"
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
"description": "The Chrome browser user (its folder, such as `Profile 7`) the user chose for an Account, by ref. It replaces what sideby found for that Account; set with `sideby browser set` or the Panel."
|
|
342
367
|
}
|
|
343
368
|
},
|
|
344
369
|
"additionalProperties": false,
|