sideby 0.31.2 → 0.32.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 +4 -4
- package/dist/build.json +1 -1
- package/dist/src/cli/commands.d.ts +0 -4
- package/dist/src/cli/commands.js +76 -14
- package/dist/src/cli/format.js +3 -2
- package/dist/src/cli/json-schemas.js +45 -5
- package/dist/src/cli/main.js +19 -159
- package/dist/src/core/ask.js +6 -1
- package/dist/src/core/cli-commands.d.ts +56 -0
- package/dist/src/core/cli-commands.js +842 -0
- package/dist/src/core/handoff-chain.d.ts +9 -3
- package/dist/src/core/handoff-chain.js +3 -2
- package/dist/src/core/handoff-rules.js +5 -5
- package/dist/src/core/handoff-run.js +19 -2
- package/dist/src/core/handoff-select.d.ts +15 -5
- package/dist/src/core/handoff-select.js +34 -22
- package/dist/src/core/handoff.d.ts +36 -3
- package/dist/src/core/handoff.js +57 -18
- package/dist/src/core/pick-commands.d.ts +19 -4
- package/dist/src/core/pick-commands.js +19 -5
- package/dist/src/core/quota-levels.d.ts +67 -4
- package/dist/src/core/quota-levels.js +82 -6
- package/dist/src/core/search-catalog.js +20 -0
- package/dist/src/families/claude/index.js +3 -0
- package/dist/src/families/claude/quota-fetch.d.ts +26 -0
- package/dist/src/families/claude/quota-fetch.js +236 -0
- package/dist/src/handoff/hook.js +5 -0
- package/dist/src/menubar/script.js +8 -3
- package/dist/src/menubar/snapshot.d.ts +9 -5
- package/dist/src/menubar/snapshot.js +37 -24
- package/dist/src/menubar/strings.d.ts +6 -4
- package/dist/src/menubar/strings.js +6 -4
- package/dist/src/panel/handler.js +7 -3
- package/dist/src/panel/i18n.d.ts +15 -0
- package/dist/src/panel/i18n.js +36 -6
- package/dist/src/panel/page-logic.d.ts +32 -8
- package/dist/src/panel/page-logic.js +43 -16
- package/dist/src/panel/page-script.js +129 -17
- package/dist/src/panel/page-styles.js +18 -0
- package/dist/src/panel/page.js +6 -1
- package/dist/src/runtime.d.ts +2 -1
- package/dist/src/runtime.js +10 -4
- package/dist/testing/index.d.ts +5 -0
- package/dist/testing/index.js +2 -0
- package/package.json +2 -2
- package/schemas/commands-list.json +165 -0
- package/schemas/menubar-snapshot.json +3 -3
- package/schemas/next.json +57 -4
- package/skills/sideby/SKILL.md +3 -2
- package/skills/sideby/references/accounts.md +1 -1
- package/skills/sideby/references/ai-tasks.md +2 -2
- package/skills/sideby/references/diagnose.md +1 -1
- package/skills/sideby/references/handoff.md +13 -9
- package/skills/sideby/references/panel.md +11 -1
- package/skills/sideby/references/quota.md +9 -3
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
// The Panel page's inline script. Plain browser JavaScript in a string (no template literals inside, so String.raw
|
|
2
2
|
// keeps it verbatim); the pure helpers from page-logic.ts are prepended so the tested code is the code that runs.
|
|
3
|
+
import { filterCommands } from '../core/cli-commands.js';
|
|
3
4
|
import { groupsToAccept } from '../core/inbound.js';
|
|
4
5
|
import { quotaIsStale } from '../core/quota-levels.js';
|
|
5
6
|
import { remoteControlTodo } from '../core/remote-control.js';
|
|
6
7
|
import { catalogMatchLevel, catalogNorm, searchCatalog } from '../core/search-catalog.js';
|
|
7
|
-
import { aiTaskAccounts, aliasArgsOf, aliasIssue, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, bindingWindow, cacheHitRate, canLeaveLocal, categoryOrder, codeSwapOutcome, dotsKeepKeyboard, enableOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, hiddenIn, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, networkTaskFacts, newAccountDir, nextReset, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, quotaAskable, quotaHighLevel, quotaPressure, radioStep, reloadForBuild, remoteControlSummary, reorder, rowBadge, runCodeSwap, saveHandoffChange, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, shortCwd, shortSessionLabel, sortAccounts, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, uaDayRuns, uaGroupPending, uaOnChoices, uaParseClock, uaPickTime, uaSameSlot, uaShouldRead, uaSlotNight, uaStatusParts, uaStepClock, uaToggleDay, uaWaitingCount, uaWhen, updatedAge, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
|
|
8
|
+
import { aiTaskAccounts, aliasArgsOf, aliasIssue, askBridge, askBridged, askCopy, attentionReasons, attentionWhy, autostartNote, bindingWindow, cacheHitRate, canLeaveLocal, categoryOrder, codeSwapOutcome, dotsKeepKeyboard, enableOutcome, fileSize, fixPrompt, foldSkips, foldToolCalls, formatDuration, handoffChangeOf, handoffHintAccount, handoffTaskFacts, hiddenIn, highlightParts, histFilters, historyEmpty, historyWhen, hotkeyFromKey, hotkeyPressKind, inDisplayOrder, loginClusters, loginKey, longWindow, maskEmail, matchesQuery, mdBlocks, mdInline, menuPlacement, mergeDaily, mergeUsage, messageChip, messageNews, networkTaskFacts, newAccountDir, nextReset, panelFixes, panelHint, panelLang, panelMigration, panelPrefs, passedWindow, pinnedIn, quotaAskable, quotaHighLevel, quotaPressure, radioStep, reloadForBuild, remoteControlSummary, reorder, rowBadge, runCodeSwap, saveHandoffChange, sendBlock, sendFileProblem, sendResultView, sessionAge, sessionLabelParts, shortCwd, shortSessionLabel, sortAccounts, sortSessions, steadyOrder, stripSecrets, suggestAlias, suggestName, switchFailure, tailInView, taskFindings, uaDayRuns, uaGroupPending, uaOnChoices, uaParseClock, uaPickTime, uaSameSlot, uaShouldRead, uaSlotNight, uaStatusParts, uaStepClock, uaToggleDay, uaWaitingCount, uaWhen, updatedAge, widthFollower, widthTier, windowState, withPinned, } from './page-logic.js';
|
|
8
9
|
const LOGIC = [
|
|
9
10
|
quotaIsStale,
|
|
10
11
|
catalogNorm,
|
|
11
12
|
catalogMatchLevel,
|
|
12
13
|
searchCatalog,
|
|
14
|
+
filterCommands,
|
|
13
15
|
aiTaskAccounts,
|
|
14
16
|
askBridge,
|
|
15
17
|
askBridged,
|
|
@@ -52,6 +54,7 @@ const LOGIC = [
|
|
|
52
54
|
mergeUsage,
|
|
53
55
|
messageChip,
|
|
54
56
|
messageNews,
|
|
57
|
+
longWindow,
|
|
55
58
|
newAccountDir,
|
|
56
59
|
nextReset,
|
|
57
60
|
canLeaveLocal,
|
|
@@ -117,6 +120,8 @@ const MAIN = String.raw `
|
|
|
117
120
|
const MESSAGES = JSON.parse(document.getElementById('sideby-i18n').textContent)
|
|
118
121
|
const WARN = BOOT.warn
|
|
119
122
|
const FAIL = BOOT.fail
|
|
123
|
+
// A Long Window's levels (weekly, a billing period): it warns later than a 5-hour one (spec §3.26).
|
|
124
|
+
const LONG = { warn: BOOT.longWarn, fail: BOOT.longFail }
|
|
120
125
|
// Quota data older than this is greyed and marked with its age.
|
|
121
126
|
// Findings listed before the rest fold behind a button.
|
|
122
127
|
const FINDINGS_SHOWN = 5
|
|
@@ -1124,10 +1129,10 @@ const MAIN = String.raw `
|
|
|
1124
1129
|
for (const f of e.findings) { if (f.level === 'fail') fail++; else if (f.level === 'warn') warn++ }
|
|
1125
1130
|
return { fail, warn }
|
|
1126
1131
|
}
|
|
1127
|
-
function reasonsOf(a, now) { return attentionReasons(a, healthOf(a.ref), now, WARN) }
|
|
1132
|
+
function reasonsOf(a, now) { return attentionReasons(a, healthOf(a.ref), now, WARN, LONG.warn) }
|
|
1128
1133
|
// One line on why an Account needs a look, such as "7d at 62% (warns from 60%)".
|
|
1129
1134
|
function whyOf(a, now) {
|
|
1130
|
-
const m = attentionWhy(a, healthOf(a.ref), now, WARN)
|
|
1135
|
+
const m = attentionWhy(a, healthOf(a.ref), now, WARN, LONG.warn)
|
|
1131
1136
|
if (m && m.key === 'why.not-installed' && family(a.family).brokenBin) return t('why.broken')
|
|
1132
1137
|
return m ? t(m.key, m.vars && m.vars.label ? Object.assign({}, m.vars, { label: winTitle(m.vars.label) }) : m.vars) : ''
|
|
1133
1138
|
}
|
|
@@ -1167,6 +1172,7 @@ const MAIN = String.raw `
|
|
|
1167
1172
|
$('ask-ai').setAttribute('aria-label', t('ask.button'))
|
|
1168
1173
|
$('search-btn').setAttribute('aria-label', t('pal.button') + ' (' + palKey() + ')')
|
|
1169
1174
|
$('search-kbd').textContent = palKey()
|
|
1175
|
+
$('cmds-btn').setAttribute('aria-label', t('cmds.button') + ' (?)')
|
|
1170
1176
|
const repo = $('repo')
|
|
1171
1177
|
for (const k of ['aria-label', 'title']) repo.setAttribute(k, t('top.repo'))
|
|
1172
1178
|
if (/^https:\/\/github\.com\//.test(BOOT.repoUrl || '')) { repo.href = BOOT.repoUrl; repo.hidden = false }
|
|
@@ -1342,7 +1348,7 @@ const MAIN = String.raw `
|
|
|
1342
1348
|
// A window's cell: percent and countdown on one line, the bar under them. The label shows where no column
|
|
1343
1349
|
// header does (cards, narrow screens).
|
|
1344
1350
|
function meter(w, now, stale, observedAt, withLength) {
|
|
1345
|
-
const st = windowState(w, now, WARN, FAIL)
|
|
1351
|
+
const st = windowState(w, now, WARN, FAIL, LONG)
|
|
1346
1352
|
const passed = passedWindow(w, observedAt, now)
|
|
1347
1353
|
const left = prefs.quota === 'left'
|
|
1348
1354
|
const shown = left ? 100 - st.pct : st.pct
|
|
@@ -1417,7 +1423,7 @@ const MAIN = String.raw `
|
|
|
1417
1423
|
wins.length ? cols.map((c) => {
|
|
1418
1424
|
// A model group with several limits (Antigravity's 5-hour and weekly) shows the one that binds first.
|
|
1419
1425
|
const same = wins.filter((x) => winKey(x) === c)
|
|
1420
|
-
const w = bindingWindow(same, now, WARN, FAIL)
|
|
1426
|
+
const w = bindingWindow(same, now, WARN, FAIL, LONG)
|
|
1421
1427
|
return w ? meter(w, now, stale, q.observedAt, same.length > 1) : noMeter(winTitle(c), winShort(c))
|
|
1422
1428
|
}) : h('div', { class: 'q-note' }, t('quota.noWindows')),
|
|
1423
1429
|
// Old numbers keep their colours and say their age once, under the bars.
|
|
@@ -1477,7 +1483,7 @@ const MAIN = String.raw `
|
|
|
1477
1483
|
}
|
|
1478
1484
|
// A word, not only a colour (spec §3.8): what kind of look the account needs; the reason is on hover.
|
|
1479
1485
|
function attentionWord(subject, reason) {
|
|
1480
|
-
const lvl = reason === 'health-fail' ? 'fail' : reason === 'quota-high' ? quotaHighLevel(subject, Date.now(), FAIL) : 'warn'
|
|
1486
|
+
const lvl = reason === 'health-fail' ? 'fail' : reason === 'quota-high' ? quotaHighLevel(subject, Date.now(), FAIL, LONG.fail) : 'warn'
|
|
1481
1487
|
const why = whyOf(subject, Date.now())
|
|
1482
1488
|
const word = reason === 'health-fail' ? t('att.fix') : reason === 'quota-high' ? t('att.quota') : t('att.check')
|
|
1483
1489
|
const dot = h('span', { class: 'dot dot-' + lvl, 'aria-hidden': 'true' })
|
|
@@ -2029,7 +2035,7 @@ const MAIN = String.raw `
|
|
|
2029
2035
|
// with more, the count, each one's reason on hover, and a click shows only them (as the summary card does).
|
|
2030
2036
|
function attentionTag(needing, now) {
|
|
2031
2037
|
// Red when one of them needs a fix or has a red quota bar, so the tag matches what the rows show.
|
|
2032
|
-
const lvl = needing.some((a) => reasonsOf(a, now).includes('health-fail') || quotaHighLevel(a, now, FAIL) === 'fail') ? 'fail' : 'warn'
|
|
2038
|
+
const lvl = needing.some((a) => reasonsOf(a, now).includes('health-fail') || quotaHighLevel(a, now, FAIL, LONG.fail) === 'fail') ? 'fail' : 'warn'
|
|
2033
2039
|
if (needing.length === 1) {
|
|
2034
2040
|
const a = needing[0]
|
|
2035
2041
|
const label = a.name + ' · ' + whyOf(a, now)
|
|
@@ -2856,8 +2862,9 @@ const MAIN = String.raw `
|
|
|
2856
2862
|
// A wide dialog is wide before it opens, so it does not open narrow and then stretch.
|
|
2857
2863
|
el.classList.toggle('dialog-wide', kind === 'settings' ? el.classList.contains('dialog-wide') : kind === 'history')
|
|
2858
2864
|
// A dialog that grows as the user adds to it (screenshots, its result) keeps its top edge and grows downward.
|
|
2859
|
-
el.classList.toggle('dialog-top', kind === 'send' || kind === 'palette')
|
|
2865
|
+
el.classList.toggle('dialog-top', kind === 'send' || kind === 'palette' || kind === 'commands')
|
|
2860
2866
|
el.classList.toggle('dialog-pal', kind === 'palette')
|
|
2867
|
+
el.classList.toggle('dialog-cmds', kind === 'commands')
|
|
2861
2868
|
if (!el.open) { el.showModal(); raiseToasts() }
|
|
2862
2869
|
}
|
|
2863
2870
|
|
|
@@ -5540,7 +5547,7 @@ const MAIN = String.raw `
|
|
|
5540
5547
|
switch (r.id) {
|
|
5541
5548
|
case 'when': return p.adaptive ? t('hp.rule.whenAdaptive', { prepare: p.prepareAt, p: p.threshold, max: p.max }) : t('hp.rule.when', { prepare: p.prepareAt, p: p.threshold })
|
|
5542
5549
|
case 'windows': return t('hp.rule.windows')
|
|
5543
|
-
case 'takeover': return t('hp.rule.takeover', { limit: p.limit, p: thr })
|
|
5550
|
+
case 'takeover': return t('hp.rule.takeover', { limit: p.limit, long: p.longLimit ?? thr, p: thr })
|
|
5544
5551
|
case 'wait': return p.minutes > 0 ? t('hp.rule.wait', { w: p.minutes }) : t('hp.rule.noWait')
|
|
5545
5552
|
case 'sameFamily': return t(p.on ? 'hp.rule.sameOn' : 'hp.rule.sameOff')
|
|
5546
5553
|
case 'otherFamilies': return p.on ? t('hp.rule.otherOn') : t('hp.rule.otherOff')
|
|
@@ -6551,6 +6558,7 @@ const MAIN = String.raw `
|
|
|
6551
6558
|
'handoff-on': { run: () => setPage('handoff'), ok: () => Boolean(ahState()), nav: true },
|
|
6552
6559
|
network: { run: openNet, ok: () => Boolean(netState()) },
|
|
6553
6560
|
themes: { run: openThemes, ok: () => true },
|
|
6561
|
+
commands: { run: () => openCommands(), ok: () => true },
|
|
6554
6562
|
update: { run: openUpdate, ok: () => Boolean(BOOT.updates) },
|
|
6555
6563
|
ask: { run: () => openAsk(), ok: () => !askBridged(BOOT, window) },
|
|
6556
6564
|
health: { run: palHealth, ok: () => Boolean(S.state && S.state.accounts.length), nav: true },
|
|
@@ -6594,15 +6602,18 @@ const MAIN = String.raw `
|
|
|
6594
6602
|
return Boolean(a && a.ok())
|
|
6595
6603
|
}
|
|
6596
6604
|
function palWhyOff(e) { return e.target.action && e.target.write && BOOT.readOnly ? t('pal.readOnly') : '' }
|
|
6597
|
-
function openPalette() {
|
|
6598
|
-
|
|
6605
|
+
function openPalette(q) {
|
|
6606
|
+
// The Commands dialog hands its dialog over (its "Search Panel features" row); any other open dialog stays.
|
|
6607
|
+
if (dlg.el && dlg.el.open && dlg.kind !== 'commands') return
|
|
6599
6608
|
closeMenu()
|
|
6600
|
-
|
|
6609
|
+
cmd.els = null
|
|
6610
|
+
pal.q = typeof q === 'string' ? q : ''
|
|
6601
6611
|
pal.sel = 0
|
|
6602
6612
|
pal.all = false
|
|
6603
6613
|
pal.found = palFindable()
|
|
6604
6614
|
showDialog('palette')
|
|
6605
6615
|
const input = h('input', { type: 'search', class: 'pal-input', role: 'combobox', 'aria-expanded': 'true', 'aria-controls': 'pal-list', 'aria-autocomplete': 'list', autocomplete: 'off', spellcheck: 'false', placeholder: t('pal.placeholder'), 'aria-label': t('pal.title') })
|
|
6616
|
+
input.value = pal.q
|
|
6606
6617
|
input.addEventListener('input', () => { pal.q = input.value; pal.sel = 0; pal.all = false; drawPalette() })
|
|
6607
6618
|
input.addEventListener('keydown', palKeys)
|
|
6608
6619
|
const list = h('div', { id: 'pal-list', class: 'pal-list', role: 'listbox', 'aria-label': t('pal.title') })
|
|
@@ -6703,7 +6714,8 @@ const MAIN = String.raw `
|
|
|
6703
6714
|
if (pal.q) { e.preventDefault(); pal.els.input.value = ''; pal.q = ''; pal.sel = 0; drawPalette() }
|
|
6704
6715
|
}
|
|
6705
6716
|
}
|
|
6706
|
-
|
|
6717
|
+
// Closes the palette, or the Commands dialog when its "Open in Panel" goes somewhere (both use palGo).
|
|
6718
|
+
function palClose() { pal.els = null; if (dlg.kind === 'palette' || dlg.kind === 'commands') dlg.el.close() }
|
|
6707
6719
|
// Lights a row up once it is in view, so the eye finds it; none under reduced motion.
|
|
6708
6720
|
function palFlash(el) {
|
|
6709
6721
|
if (REDUCED || !el) return
|
|
@@ -6722,6 +6734,7 @@ const MAIN = String.raw `
|
|
|
6722
6734
|
}
|
|
6723
6735
|
function palGo(e) {
|
|
6724
6736
|
palRemember(e.id)
|
|
6737
|
+
const from = dlg.kind
|
|
6725
6738
|
const g = e.target
|
|
6726
6739
|
pal.els = null
|
|
6727
6740
|
if (g.page) { palClose(); setPage(g.page); window.scrollTo({ top: 0, behavior: REDUCED ? 'auto' : 'smooth' }); return }
|
|
@@ -6745,8 +6758,9 @@ const MAIN = String.raw `
|
|
|
6745
6758
|
const a = PALETTE_ACTIONS[g.action]
|
|
6746
6759
|
if (a.nav) palClose()
|
|
6747
6760
|
a.run()
|
|
6748
|
-
// An action that opened nothing (such as a task handed to the Portal) leaves no palette behind
|
|
6749
|
-
|
|
6761
|
+
// An action that opened nothing (such as a task handed to the Portal) leaves no palette or Commands dialog behind;
|
|
6762
|
+
// one that opened its own dialog in their place (the palette's Commands action too) keeps it.
|
|
6763
|
+
if (dlg.kind === from && (from === 'palette' || from === 'commands')) palClose()
|
|
6750
6764
|
}
|
|
6751
6765
|
// The words go to Session History's search box, which reads them as it does typed ones.
|
|
6752
6766
|
function palHistory(q) {
|
|
@@ -6760,6 +6774,92 @@ const MAIN = String.raw `
|
|
|
6760
6774
|
setPage('sessions')
|
|
6761
6775
|
}
|
|
6762
6776
|
|
|
6777
|
+
// ---------- Command List (spec §3.38, ADR-0061) ----------
|
|
6778
|
+
// The Commands button, ? and the palette open every sideby command by task, from the Command List that
|
|
6779
|
+
// sideby --help and sideby commands print too. Each row copies its command (the example when there is one, so it runs
|
|
6780
|
+
// as it is); a command with a place in the Panel also goes there, through the palette's own navigation.
|
|
6781
|
+
const CMDS = JSON.parse(document.getElementById('sideby-commands').textContent)
|
|
6782
|
+
const cmd = { q: '', els: null, found: null }
|
|
6783
|
+
function openCommands() {
|
|
6784
|
+
// The palette hands its dialog over (its Commands action); any other open dialog stays.
|
|
6785
|
+
if (dlg.el && dlg.el.open && dlg.kind !== 'palette') return
|
|
6786
|
+
closeMenu()
|
|
6787
|
+
pal.els = null
|
|
6788
|
+
cmd.q = ''
|
|
6789
|
+
cmd.found = palFindable()
|
|
6790
|
+
showDialog('commands')
|
|
6791
|
+
const input = h('input', { type: 'search', class: 'pal-input', autocomplete: 'off', spellcheck: 'false', placeholder: t('cmds.placeholder'), 'aria-label': t('cmds.placeholder'), 'aria-controls': 'cmd-list' })
|
|
6792
|
+
input.addEventListener('input', () => { cmd.q = input.value; drawCommands() })
|
|
6793
|
+
input.addEventListener('keydown', (e) => {
|
|
6794
|
+
// Escape first empties the box, as in the palette; a second one closes.
|
|
6795
|
+
if (e.key === 'Escape' && cmd.q) { e.preventDefault(); input.value = ''; cmd.q = ''; drawCommands() }
|
|
6796
|
+
else if (e.key === 'ArrowDown') {
|
|
6797
|
+
const b = cmd.els && cmd.els.list.querySelector('button')
|
|
6798
|
+
if (b) { e.preventDefault(); b.focus() }
|
|
6799
|
+
}
|
|
6800
|
+
})
|
|
6801
|
+
const list = h('div', { id: 'cmd-list', class: 'cmd-list' })
|
|
6802
|
+
cmd.els = { input, list }
|
|
6803
|
+
setKids(dlg.el, [
|
|
6804
|
+
h('h2', { id: 'dlg-title', class: 'sr-only' }, t('cmds.title')),
|
|
6805
|
+
h('div', { class: 'pal-head' }, icon('terminal', 'pal-ic'), input, h('kbd', { class: 'kbd-inline', 'aria-hidden': 'true' }, 'Esc')),
|
|
6806
|
+
list,
|
|
6807
|
+
h('div', { class: 'pal-foot muted small', 'aria-hidden': 'true' }, t('cmds.foot')),
|
|
6808
|
+
])
|
|
6809
|
+
drawCommands()
|
|
6810
|
+
input.focus()
|
|
6811
|
+
}
|
|
6812
|
+
function drawCommands() {
|
|
6813
|
+
if (!cmd.els) return
|
|
6814
|
+
const q = cmd.q.trim()
|
|
6815
|
+
const kids = []
|
|
6816
|
+
if (!q) {
|
|
6817
|
+
kids.push(h('p', { class: 'cmd-intro muted small' }, t('cmds.intro')))
|
|
6818
|
+
kids.push(cmdGroup(t('cmds.common'), CMDS.commands.filter((c) => c.common).sort((a, b) => a.common - b.common)))
|
|
6819
|
+
}
|
|
6820
|
+
const hits = filterCommands(q, CMDS.commands, CMDS.groups)
|
|
6821
|
+
for (const g of CMDS.groups) {
|
|
6822
|
+
const list = hits.filter((c) => c.group === g.id)
|
|
6823
|
+
if (list.length) kids.push(cmdGroup(g.title[lang] || g.title.en, list))
|
|
6824
|
+
}
|
|
6825
|
+
if (q && !hits.length)
|
|
6826
|
+
kids.push(h('div', { class: 'cmd-none' }, h('p', { class: 'muted' }, t('cmds.none', { q })),
|
|
6827
|
+
h('button', { class: 'link-btn', type: 'button', onclick: () => openPalette(q) }, icon('search'), ' ', t('cmds.feature', { q }))))
|
|
6828
|
+
cmd.els.list.replaceChildren(...kids)
|
|
6829
|
+
cmd.els.list.scrollTop = 0
|
|
6830
|
+
}
|
|
6831
|
+
function cmdGroup(title, list) {
|
|
6832
|
+
return h('section', { class: 'cmd-group', 'aria-label': title },
|
|
6833
|
+
h('h3', { class: 'pal-group' }, title),
|
|
6834
|
+
h('ul', { class: 'cmd-rows' }, list.map(cmdRow)))
|
|
6835
|
+
}
|
|
6836
|
+
// The copy button sits next to what it copies: the example when there is one, else the command itself.
|
|
6837
|
+
function cmdCopyBtn(text) {
|
|
6838
|
+
const b = h('button', { class: 'icon-btn cmd-copy', type: 'button', 'aria-label': t('cmds.copy', { text }), 'data-tip': t('btn.copy') })
|
|
6839
|
+
b.append(icon('copy'))
|
|
6840
|
+
b.addEventListener('click', async () => {
|
|
6841
|
+
await copyText(text)
|
|
6842
|
+
b.replaceChildren(icon('tick'))
|
|
6843
|
+
b.classList.add('is-done')
|
|
6844
|
+
b.setAttribute('data-tip', t('cmds.copied'))
|
|
6845
|
+
setTimeout(() => { b.replaceChildren(icon('copy')); b.classList.remove('is-done'); b.setAttribute('data-tip', t('btn.copy')) }, 1400)
|
|
6846
|
+
})
|
|
6847
|
+
return b
|
|
6848
|
+
}
|
|
6849
|
+
function cmdRow(c) {
|
|
6850
|
+
const e = c.feature ? CATALOG.entries.find((x) => x.id === c.feature) : null
|
|
6851
|
+
// "Open in Panel" only where this Panel has the place now, never for this list itself.
|
|
6852
|
+
const go = e && !(e.target.action === 'commands') && palAvailable(e, cmd.found) && !palWhyOff(e) ? e : null
|
|
6853
|
+
const what = go ? go.title[lang] || go.title.en : ''
|
|
6854
|
+
return h('li', { class: 'cmd-row' },
|
|
6855
|
+
h('div', { class: 'cmd-line' },
|
|
6856
|
+
h('code', { class: 'cmd-usage' }, c.usage),
|
|
6857
|
+
go ? h('button', { class: 'link-btn cmd-open', type: 'button', 'aria-label': t('cmds.openLabel', { what }), onclick: () => palGo(go) }, t('cmds.open')) : null,
|
|
6858
|
+
c.example ? null : cmdCopyBtn(c.usage)),
|
|
6859
|
+
h('div', { class: 'cmd-desc' }, c.summary[lang] || c.summary.en),
|
|
6860
|
+
c.example ? h('div', { class: 'cmd-ex' }, h('span', { class: 'cmd-ex-label' }, t('cmds.example')), h('code', null, c.example), cmdCopyBtn(c.example)) : null)
|
|
6861
|
+
}
|
|
6862
|
+
|
|
6763
6863
|
// ---------- start at login (spec §3.29, ADR-0029) and the Menu Bar Item (spec §3.31, ADR-0034) ----------
|
|
6764
6864
|
// Each switch reads its state when the settings open; moving it shows the file and what will run, and only the
|
|
6765
6865
|
// confirmation writes. A read-only Panel shows the state only. mb.* words override as.* for the menu bar.
|
|
@@ -7084,7 +7184,7 @@ const MAIN = String.raw `
|
|
|
7084
7184
|
return Boolean(u && u.skillUpdate && u.skillUpdate.installed && u.skillUpdate.installed.length)
|
|
7085
7185
|
}
|
|
7086
7186
|
// Example phrases: a click puts one in the Let AI do it box (spec §3.28).
|
|
7087
|
-
const AI_ASKS = ['ai.ask.quota', 'ai.ask.pick', 'ai.ask.new', 'ai.ask.api', 'ai.ask.pin', 'ai.ask.hide', 'ai.ask.relogin', 'ai.ask.fix', 'ai.ask.handoff', 'ai.ask.handoffRules', 'ai.ask.session', 'ai.ask.history', 'ai.ask.send', 'ai.ask.inbound', 'ai.ask.menubar', 'ai.ask.rc', 'ai.ask.network', 'ai.ask.unattended', 'ai.ask.theme', 'ai.ask.find', 'ai.ask.tool']
|
|
7187
|
+
const AI_ASKS = ['ai.ask.quota', 'ai.ask.pick', 'ai.ask.new', 'ai.ask.api', 'ai.ask.pin', 'ai.ask.hide', 'ai.ask.relogin', 'ai.ask.fix', 'ai.ask.handoff', 'ai.ask.handoffRules', 'ai.ask.session', 'ai.ask.history', 'ai.ask.send', 'ai.ask.inbound', 'ai.ask.menubar', 'ai.ask.rc', 'ai.ask.network', 'ai.ask.unattended', 'ai.ask.theme', 'ai.ask.find', 'ai.ask.commands', 'ai.ask.tool']
|
|
7088
7188
|
// Network Guard (spec §3.35): one dialog with the switch, the allowed countries and the newest result per address.
|
|
7089
7189
|
// Countries are never ticked for the user, the current one included: a wrong network would allow itself.
|
|
7090
7190
|
const NET_COMMON = ['US', 'JP', 'SG', 'GB', 'DE', 'FR', 'NL', 'CA', 'AU', 'KR', 'TW', 'HK']
|
|
@@ -7943,7 +8043,7 @@ const MAIN = String.raw `
|
|
|
7943
8043
|
if (BOOT.readOnly) { copyText(name, name); return }
|
|
7944
8044
|
try {
|
|
7945
8045
|
const r = await api('/api/pick/start', { name })
|
|
7946
|
-
const why = r.reason === 'most-room' ? t('pk.why.room', { n: String(r.pressure) }) : t(r.reason === 'others-full' ? 'pk.why.othersFull' : 'pk.why.noData')
|
|
8046
|
+
const why = r.reason === 'most-room' ? t('pk.why.room', { n: String(r.pressure), w: r.window ? winTitle(r.window) + ' ' : '' }) : r.reason === 'tight' ? t('pk.why.tight', { n: String(r.pressure), w: r.window ? winTitle(r.window) + ' ' : '', limit: String(r.limit), longLimit: String(r.longLimit) }) : t(r.reason === 'others-full' ? 'pk.why.othersFull' : 'pk.why.noData')
|
|
7947
8047
|
if (r.opened) { toast(t('pk.started', { terminal: TERM_NAMES[r.terminal] || r.terminal, ref: r.picked, why })); return }
|
|
7948
8048
|
await copyText(name, name)
|
|
7949
8049
|
toast(r.automation ? t('login.automation', { terminal: TERM_NAMES[r.terminal] || r.terminal }) : t('login.failed'), { kind: 'info' })
|
|
@@ -8638,6 +8738,7 @@ const MAIN = String.raw `
|
|
|
8638
8738
|
$('refresh').addEventListener('click', refreshAll)
|
|
8639
8739
|
$('ask-ai').addEventListener('click', () => openAsk())
|
|
8640
8740
|
$('search-btn').addEventListener('click', () => openPalette())
|
|
8741
|
+
$('cmds-btn').addEventListener('click', () => openCommands())
|
|
8641
8742
|
// Cmd/Ctrl+K opens the Command Palette from anywhere and closes it again; / and Cmd/Ctrl+F stay on the account search.
|
|
8642
8743
|
document.addEventListener('keydown', (e) => {
|
|
8643
8744
|
if (!(e.metaKey || e.ctrlKey) || e.altKey || e.shiftKey || (e.key !== 'k' && e.key !== 'K')) return
|
|
@@ -8645,6 +8746,17 @@ const MAIN = String.raw `
|
|
|
8645
8746
|
e.preventDefault()
|
|
8646
8747
|
openPalette()
|
|
8647
8748
|
})
|
|
8749
|
+
// ? opens the Command List (as GitHub and Linear open their shortcut lists), and closes it again; typing a ? in a
|
|
8750
|
+
// field stays typing.
|
|
8751
|
+
document.addEventListener('keydown', (e) => {
|
|
8752
|
+
if (e.key !== '?' || e.metaKey || e.ctrlKey || e.altKey || e.defaultPrevented) return
|
|
8753
|
+
const el = e.target
|
|
8754
|
+
if (el && (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT' || el.isContentEditable)) return
|
|
8755
|
+
if (dlg.el && dlg.el.open) { if (dlg.kind === 'commands') { e.preventDefault(); dlg.el.close() } return }
|
|
8756
|
+
if (menu.el) return
|
|
8757
|
+
e.preventDefault()
|
|
8758
|
+
openCommands()
|
|
8759
|
+
})
|
|
8648
8760
|
// In a Portal that offers AI Tasks itself the Portal has the button; opened on its own, the Panel keeps it.
|
|
8649
8761
|
$('ask-ai').hidden = askBridged(BOOT, window)
|
|
8650
8762
|
$('accounts').addEventListener('dragover', onDragOver)
|
|
@@ -1387,6 +1387,24 @@ input.ua-time::placeholder { color: var(--faint); }
|
|
|
1387
1387
|
.pal-none { padding: 14px 10px 4px; margin: 0; }
|
|
1388
1388
|
.pal-foot { padding: 8px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
|
|
1389
1389
|
[data-width=narrow] .pal-where, [data-width=narrow] .pal-foot { display: none; }
|
|
1390
|
+
.dialog.dialog-cmds { width: min(760px, calc(100vw - 24px)); flex-direction: column; }
|
|
1391
|
+
.cmd-list { overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 10px; height: min(62vh, 560px); }
|
|
1392
|
+
.cmd-intro { margin: 8px 10px 2px; }
|
|
1393
|
+
.cmd-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
|
|
1394
|
+
.cmd-row { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-top: 1px solid var(--border); }
|
|
1395
|
+
.cmd-row:first-child { border-top: 0; }
|
|
1396
|
+
.cmd-line, .cmd-ex { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
1397
|
+
.cmd-usage { flex: 1; min-width: 0; color: var(--text); font-weight: var(--strong-weight); overflow-wrap: anywhere; }
|
|
1398
|
+
.cmd-desc { color: var(--muted); font-size: var(--small); }
|
|
1399
|
+
.cmd-ex { font-size: 12px; color: var(--muted); }
|
|
1400
|
+
.cmd-ex code { min-width: 0; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
|
|
1401
|
+
.cmd-ex-label { flex: none; }
|
|
1402
|
+
.cmd-open { flex: none; font-size: var(--small); }
|
|
1403
|
+
.cmd-copy { flex: none; }
|
|
1404
|
+
.cmd-copy.is-done { color: var(--ok); }
|
|
1405
|
+
.cmd-none { padding: 14px 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
|
|
1406
|
+
.cmd-none p { margin: 0; }
|
|
1407
|
+
.cmd-none .link-btn { display: inline-flex; align-items: center; gap: 4px; }
|
|
1390
1408
|
.find-flash { animation: find-flash 1.2s ease-out; border-radius: var(--ctl-radius); }
|
|
1391
1409
|
@keyframes find-flash { 0%, 35% { box-shadow: 0 0 0 6px var(--accent-soft); background: var(--accent-soft); } to { box-shadow: 0 0 0 6px transparent; background: transparent; } }
|
|
1392
1410
|
@media (prefers-reduced-motion: reduce) { .find-flash { animation: none; } .pal-opt { transition: none; } }
|
package/dist/src/panel/page.js
CHANGED
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
// i18n.ts (English and Chinese text); this module assembles them under the CSP nonce.
|
|
4
4
|
import { createHash } from 'node:crypto';
|
|
5
5
|
import { FAVICON_SVG, MARK_SVG } from '../core/brand-mark.js';
|
|
6
|
+
import { commandListForPage } from '../core/cli-commands.js';
|
|
6
7
|
import { ALIAS_NAME, RESERVED_ALIASES } from '../core/config.js';
|
|
7
|
-
import { QUOTA_FAIL_PERCENT, QUOTA_WARN_PERCENT, USAGE_DAYS } from '../core/quota-levels.js';
|
|
8
|
+
import { QUOTA_FAIL_PERCENT, QUOTA_LONG_FAIL_PERCENT, QUOTA_LONG_WARN_PERCENT, QUOTA_WARN_PERCENT, USAGE_DAYS, } from '../core/quota-levels.js';
|
|
8
9
|
import { COMMON_ENTRIES, SEARCH_CATALOG } from '../core/search-catalog.js';
|
|
9
10
|
import { REPO_URL, SKILL_INSTALL } from '../core/skill-check.js';
|
|
10
11
|
import { MESSAGES } from './i18n.js';
|
|
@@ -58,6 +59,8 @@ export function renderPage(opts) {
|
|
|
58
59
|
},
|
|
59
60
|
warn: QUOTA_WARN_PERCENT,
|
|
60
61
|
fail: QUOTA_FAIL_PERCENT,
|
|
62
|
+
longWarn: QUOTA_LONG_WARN_PERCENT,
|
|
63
|
+
longFail: QUOTA_LONG_FAIL_PERCENT,
|
|
61
64
|
usageDays: USAGE_DAYS,
|
|
62
65
|
// The alias rules of the config, so the new-account dialog checks a short command as sideby will.
|
|
63
66
|
aliasPattern: ALIAS_NAME.source,
|
|
@@ -93,6 +96,7 @@ export function renderPage(opts) {
|
|
|
93
96
|
<button id="ua-badge" class="btn ua-badge" type="button" hidden></button>
|
|
94
97
|
<button id="update" class="btn update-btn" type="button" hidden></button>
|
|
95
98
|
<button id="search-btn" class="btn" type="button" aria-haspopup="dialog" aria-label="Search"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM20 20l-4.2-4.2"/></svg><span class="hide-sm" data-i18n="pal.button">Search</span><kbd id="search-kbd" class="kbd-inline hide-sm" aria-hidden="true"></kbd></button>
|
|
99
|
+
<button id="cmds-btn" class="btn" type="button" aria-haspopup="dialog" aria-label="Commands (?)"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 17l6-5-6-5M12 19h8"/></svg><span class="hide-sm" data-i18n="cmds.button">Commands</span><kbd class="kbd-inline hide-sm" aria-hidden="true">?</kbd></button>
|
|
96
100
|
<button id="ask-ai" class="btn" type="button" aria-haspopup="dialog" aria-label="Let AI do it"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2zM12 5v4M9.5 13.5v1M14.5 13.5v1"/></svg><span class="hide-sm" data-i18n="ask.button">Let AI do it</span></button>
|
|
97
101
|
<a id="repo" class="icon-btn repo-link" target="_blank" rel="noopener noreferrer" aria-label="sideby on GitHub" title="sideby on GitHub" hidden><svg viewBox="0 0 24 24" aria-hidden="true"><path d="${GITHUB_MARK}"/></svg></a>
|
|
98
102
|
<button id="settings" class="btn" type="button" aria-haspopup="dialog" aria-expanded="false"${lang === 'auto' ? '' : ' hidden'}><span data-i18n="set.button">Settings</span></button>
|
|
@@ -123,6 +127,7 @@ export function renderPage(opts) {
|
|
|
123
127
|
<div id="toasts" class="toasts" aria-live="polite" popover="manual"></div>
|
|
124
128
|
<script type="application/json" id="sideby-boot">${boot}</script>
|
|
125
129
|
<script type="application/json" id="sideby-catalog">${jsonForScript({ entries: SEARCH_CATALOG, common: COMMON_ENTRIES })}</script>
|
|
130
|
+
<script type="application/json" id="sideby-commands">${jsonForScript(commandListForPage())}</script>
|
|
126
131
|
<script type="application/json" id="sideby-i18n">${jsonForScript(MESSAGES)}</script>
|
|
127
132
|
<script${nonce}>${PAGE_SCRIPT}</script>
|
|
128
133
|
</body>
|
package/dist/src/runtime.d.ts
CHANGED
|
@@ -357,7 +357,8 @@ export interface Runtime {
|
|
|
357
357
|
/** Puts back what `remoteControlOff` or `remoteControlOn` replaced, only where the key still holds what it wrote. */
|
|
358
358
|
remoteControlUndo(): Promise<RemoteControlChange>;
|
|
359
359
|
/**
|
|
360
|
-
* Which Account of a Family to move on to (spec §3.13)
|
|
360
|
+
* Which Account of a Family to move on to (spec §3.13), for a start the user asks for: past the Takeover Limit it
|
|
361
|
+
* falls back to the least used Account under 100% (`tight`). Throws a UserError with code `no-quota-source`
|
|
361
362
|
* when the Family cannot tell, `no-accounts` when it has none.
|
|
362
363
|
*/
|
|
363
364
|
handoff(familyId: string, opts?: {
|
package/dist/src/runtime.js
CHANGED
|
@@ -19,7 +19,7 @@ import { resolvePaths } from './core/paths.js';
|
|
|
19
19
|
import { choosePick, suggestPickName } from './core/pick-commands.js';
|
|
20
20
|
import { categoryReader } from './core/project-categories.js';
|
|
21
21
|
import { fetchedQuota, quotaCheckOff, shownQuota } from './core/quota-fetch.js';
|
|
22
|
-
import {
|
|
22
|
+
import { takeoverLimits } from './core/quota-levels.js';
|
|
23
23
|
import { remoteControlGroups, turnRemoteControlOff, turnRemoteControlOn, undoRemoteControlOff, } from './core/remote-control.js';
|
|
24
24
|
import { findResumeRoute } from './core/resume.js';
|
|
25
25
|
import { SAME_LOGIN_FAMILIES, sameLoginGroups, sharedQuota } from './core/same-login.js';
|
|
@@ -985,9 +985,15 @@ export async function createRuntime(opts = {}) {
|
|
|
985
985
|
// The current Account: the one sideby started this process from, when it belongs to this Family.
|
|
986
986
|
const current = env.SIDEBY_ACCOUNT;
|
|
987
987
|
const from = current && list.some((a) => a.ref === current) ? current : undefined;
|
|
988
|
-
// The Takeover
|
|
989
|
-
|
|
990
|
-
|
|
988
|
+
// The Takeover Limits follow the user's Handoff Threshold, so `sideby next` and Auto Handoff agree on "full".
|
|
989
|
+
// A start the user asks for may still go past them (a Last Resort, spec §3.13); Auto Handoff never does.
|
|
990
|
+
const limits = takeoverLimits(handoffSettings(config).threshold);
|
|
991
|
+
return planHandoff(f.id, candidates, readContext().now, {
|
|
992
|
+
...o,
|
|
993
|
+
limits,
|
|
994
|
+
lastResort: true,
|
|
995
|
+
...(from ? { from } : {}),
|
|
996
|
+
});
|
|
991
997
|
},
|
|
992
998
|
handoffSettings: () => handoffSettings(config),
|
|
993
999
|
async handoffDecision(origin, used, opts = {}) {
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ export interface FakeHostOptions {
|
|
|
27
27
|
* without a start record either way; left out, it prints nothing, as a Host whose version cannot be told.
|
|
28
28
|
*/
|
|
29
29
|
version?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Treat a quota question (`claude -p /usage`, spec §3.26) like any start: record it and run `onStart`. Left out,
|
|
32
|
+
* the fake exits at once without a record or an answer, as a check that starts no session.
|
|
33
|
+
*/
|
|
34
|
+
quota?: boolean;
|
|
30
35
|
}
|
|
31
36
|
/**
|
|
32
37
|
* Installs a fake Host executable named `name` that appends its argv, selected env and received signals
|
package/dist/testing/index.js
CHANGED
|
@@ -62,6 +62,8 @@ if (process.argv.length === 3 && process.argv[2] === '--version') {
|
|
|
62
62
|
process.stdout.write(${JSON.stringify(opts.version ? `${opts.version}\n` : '')})
|
|
63
63
|
process.exit(0)
|
|
64
64
|
}
|
|
65
|
+
// A quota question (\`claude -p /usage\`, spec §3.26) starts no session either: no record, and no answer.
|
|
66
|
+
${opts.quota ? '' : "if (process.argv[2] === '-p' && process.argv[3] === '/usage') process.exit(0)"}
|
|
65
67
|
// Handlers first: tests signal the Host as soon as the start record appears.
|
|
66
68
|
for (const s of ['SIGINT', 'SIGTERM', 'SIGHUP', 'SIGQUIT']) process.on(s, () => { rec({ signal: s }); process.exit(${opts.sleep ? 100 : 0}) })
|
|
67
69
|
rec({ argv: process.argv.slice(2), env: process.env, pid: process.pid })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sideby",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.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)",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
},
|
|
86
86
|
"packageManager": "pnpm@10.15.0",
|
|
87
87
|
"readmeFilename": "README.md",
|
|
88
|
-
"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| Stop Claude and Codex when your requests would leave from a country you did not allow, for example when the proxy stopped | **Settings › Network check** in the panel, or `sideby network on` | [Network check](docs/guide/usage.md#network-check) |\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, put tools and accounts in your own order, and hide the ones you never use | `sideby pin claude:work`, `sideby order`, `sideby hide grok` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Give the panel other colors: five built-in Themes, your own color, or one your AI writes | **Settings › Theme** in the panel, or `sideby theme use leaf` | [Themes](docs/guide/panel.md#themes) |\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| Antigravity CLI | `~/.gemini/antigravity-cli` (main account only) | sign in with Google inside `agy` | 5-hour and weekly per model group, asked from the `agy` CLI | 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"
|
|
88
|
+
"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 # optional: live Claude quota while a session runs; 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 and each tool's own CLI. | `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 every account's quota (no setup) | `sideby quota` | [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| Stop Claude and Codex when your requests would leave from a country you did not allow, for example when the proxy stopped | **Settings › Network check** in the panel, or `sideby network on` | [Network check](docs/guide/usage.md#network-check) |\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, put tools and accounts in your own order, and hide the ones you never use | `sideby pin claude:work`, `sideby order`, `sideby hide grok` (or the panel's Settings) | [Your own order](docs/guide/usage.md#your-own-order) |\n| Give the panel other colors: five built-in Themes, your own color, or one your AI writes | **Settings › Theme** in the panel, or `sideby theme use leaf` | [Themes](docs/guide/panel.md#themes) |\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` | ✓ | ✓ |\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| Antigravity CLI | `~/.gemini/antigravity-cli` (main account only) | sign in with Google inside `agy` | 5-hour and weekly per model group, asked from the `agy` CLI | 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"
|
|
89
89
|
}
|