Skip to content

Commit 01ee35b

Browse files
committed
docs(auth): align front-door flows with shipped workflows
1 parent 310325d commit 01ee35b

8 files changed

Lines changed: 113 additions & 19 deletions

File tree

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Codex CLI-first multi-account OAuth manager for the official `@openai/codex` CLI
1616
- Canonical `codex auth ...` workflow for account login, switching, checks, and diagnostics
1717
- Multi-account OAuth pool with health-aware selection and automatic failover
1818
- Project-scoped account storage under `~/.codex/multi-auth/projects/<project-key>/...`
19-
- Interactive dashboard for account actions and settings
20-
- Experimental settings tab for staged sync, backup, and refresh-guard controls
19+
- Interactive dashboard for login, restore, switching, sync preview, and settings
20+
- Productized settings split across `Everyday Settings`, `Codex CLI Sync`, `Experimental`, and `Advanced & Operator`
2121
- Forecast, report, fix, and doctor commands for operational safety
2222
- Flagged account verification and restore flow
2323
- Session affinity and live account sync controls
@@ -112,6 +112,12 @@ codex auth fix --dry-run
112112
codex auth doctor --fix
113113
```
114114

115+
Interactive dashboard paths:
116+
117+
- restore named backups: `codex auth login` -> `Restore From Backup`
118+
- preview Codex CLI sync: `codex auth login` -> `Settings` -> `Codex CLI Sync`
119+
- adjust stable dashboard preferences: `codex auth login` -> `Settings` -> `Everyday Settings`
120+
115121
---
116122

117123
## Command Toolkit
@@ -237,6 +243,7 @@ codex auth login
237243
- `codex auth` unrecognized: run `where codex`, then follow `docs/troubleshooting.md` for routing fallback commands
238244
- Switch succeeds but wrong account appears active: run `codex auth switch <index>`, then restart session
239245
- OAuth callback on port `1455` fails: free the port and re-run `codex auth login`
246+
- Interactive login skipped restore and went straight to OAuth: place named backups in `~/.codex/multi-auth/backups/`, then rerun `codex auth login` in a normal TTY
240247
- `missing field id_token` / `token_expired` / `refresh_token_reused`: re-login affected account
241248

242249
</details>

docs/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Public documentation for `codex-multi-auth`.
1717

1818
| Document | Focus |
1919
| --- | --- |
20-
| [index.md](index.md) | Daily-use landing page for common `codex auth ...` workflows |
21-
| [getting-started.md](getting-started.md) | Install, first login, and first health check |
20+
| [index.md](index.md) | Daily-use landing page for login, restore, sync, and diagnostics workflows |
21+
| [getting-started.md](getting-started.md) | Install, first login, startup restore prompt, and first health check |
2222
| [faq.md](faq.md) | Short answers to common adoption questions |
2323
| [architecture.md](architecture.md) | Public system overview of the wrapper, storage, and optional plugin runtime |
24-
| [features.md](features.md) | User-facing capability map |
24+
| [features.md](features.md) | User-facing capability map, including backup restore, sync center, and settings split |
2525
| [configuration.md](configuration.md) | Stable defaults, precedence, and environment overrides |
26-
| [troubleshooting.md](troubleshooting.md) | Recovery playbooks for install, login, switching, and stale state |
26+
| [troubleshooting.md](troubleshooting.md) | Recovery playbooks for install, login, restore, sync, and stale state |
2727
| [privacy.md](privacy.md) | Data handling and local storage behavior |
2828
| [upgrade.md](upgrade.md) | Migration from legacy package and path history |
2929
| [releases/v0.1.9.md](releases/v0.1.9.md) | Stable release notes |
@@ -39,8 +39,8 @@ Public documentation for `codex-multi-auth`.
3939

4040
| Document | Focus |
4141
| --- | --- |
42-
| [reference/commands.md](reference/commands.md) | Commands, flags, and hotkeys |
43-
| [reference/settings.md](reference/settings.md) | Dashboard and runtime settings |
42+
| [reference/commands.md](reference/commands.md) | Commands, flags, hotkeys, and interactive entry points |
43+
| [reference/settings.md](reference/settings.md) | Everyday settings, sync center, and advanced operator controls |
4444
| [reference/storage-paths.md](reference/storage-paths.md) | Canonical and compatibility storage paths |
4545
| [reference/public-api.md](reference/public-api.md) | Public API stability and semver contract |
4646
| [reference/error-contracts.md](reference/error-contracts.md) | CLI, JSON, and helper error semantics |

docs/features.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ User-facing capability map for `codex-multi-auth`.
99
| Capability | What it gives you | Primary entry |
1010
| --- | --- | --- |
1111
| Multi-account dashboard login | Add and manage multiple OAuth identities from one terminal flow | `codex auth login` |
12+
| Startup recovery prompt | Offer restore before OAuth when recoverable named backups are found and no active accounts exist | `codex auth login` |
13+
| Backup restore manager | Review named backups, merge with dedupe, and skip invalid or over-limit restores | `codex auth login` -> `Restore From Backup` |
1214
| Account dedupe and identity normalization | Avoid duplicate saved account rows | login flow |
1315
| Explicit active-account switching | Pick the current account by index instead of relying on hidden state | `codex auth switch <index>` |
1416
| Fast and deep health checks | See whether the current pool is usable before a coding session | `codex auth check` |
@@ -32,6 +34,7 @@ User-facing capability map for `codex-multi-auth`.
3234
| --- | --- | --- |
3335
| Safe repair workflow | Detects and repairs known local storage inconsistencies | `codex auth fix` |
3436
| Diagnostics with optional repair | One command to inspect and optionally fix common failures | `codex auth doctor` |
37+
| JSON diagnostics pack | Machine-readable state for support, bug reports, and deeper inspection | `codex auth report --live --json` |
3538
| Backup and WAL recovery | Safer persistence when local writes are interrupted or partially applied | storage runtime |
3639

3740
---
@@ -53,6 +56,8 @@ User-facing capability map for `codex-multi-auth`.
5356
| --- | --- |
5457
| Quick switch and search hotkeys | Faster navigation in the dashboard |
5558
| Account action hotkeys | Per-account set, refresh, toggle, and delete shortcuts |
59+
| Productized settings split | Keeps `Everyday Settings` separate from `Advanced & Operator` controls |
60+
| Preview-first sync center | Shows one-way Codex CLI sync results and rollback context before apply |
5661
| In-dashboard settings hub | Runtime and display tuning without editing files directly |
5762
| Browser-first OAuth with manual fallback | Works in normal and constrained terminal environments |
5863

docs/getting-started.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,29 @@ codex auth forecast --live
7272

7373
---
7474

75+
## Restore Or Start Fresh
76+
77+
Use the restore path when you already have named backup files and want to recover account state before creating new OAuth sessions.
78+
79+
- Automatic path: run `codex auth login`, then confirm the startup restore prompt when it appears
80+
- Manual path: run `codex auth login`, then choose `Restore From Backup`
81+
- Backup location: `~/.codex/multi-auth/backups/<name>.json`
82+
83+
The restore manager shows each backup name, account count, freshness, and whether the restore would exceed the account limit before it lets you apply anything.
84+
85+
---
86+
87+
## Sync And Settings
88+
89+
The settings flow is split into two productized sections:
90+
91+
- `Everyday Settings` for list appearance, details line, results and refresh behavior, and colors
92+
- `Advanced & Operator` for `Codex CLI Sync`, `Experimental`, and backend tuning
93+
94+
Use `Codex CLI Sync` when you want to preview one-way sync from official Codex CLI account files before applying it. The sync screen shows source and target paths, preview summary, destination-only preservation, and backup rollback paths before apply.
95+
96+
---
97+
7598
## Day-1 Command Pack
7699

77100
```bash

docs/index.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# codex-multi-auth Docs
22

3-
Daily-use guide for the `codex auth ...` workflow.
3+
Daily-use guide for the `codex auth ...` workflow, including restore, sync, and diagnostics.
44

55
---
66

@@ -12,6 +12,8 @@ codex auth list
1212
codex auth check
1313
```
1414

15+
If login detects recoverable named backups before OAuth, confirm the prompt to open `Restore From Backup` first.
16+
1517
If you are choosing an account for the next session:
1618

1719
```bash
@@ -39,6 +41,12 @@ codex auth report --live --json
3941
codex auth doctor --fix
4042
```
4143

44+
Interactive workflows that ship in the dashboard:
45+
46+
- backup restore: `codex auth login` -> `Restore From Backup`
47+
- sync preview and apply: `codex auth login` -> `Settings` -> `Codex CLI Sync`
48+
- settings split: `codex auth login` -> `Settings` -> `Everyday Settings` or `Advanced & Operator`
49+
4250
---
4351

4452
## Canonical Policy

docs/reference/commands.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Compatibility aliases are supported:
2020

2121
| Command | Description |
2222
| --- | --- |
23-
| `codex auth login` | Open interactive auth dashboard |
23+
| `codex auth login` | Open interactive auth dashboard, including login, restore, settings, and diagnostics entry points |
2424
| `codex auth list` | List saved accounts and active account |
2525
| `codex auth status` | Print short runtime/account summary |
2626
| `codex auth switch <index>` | Set active account by index |
@@ -91,16 +91,26 @@ Compatibility aliases are supported:
9191

9292
Settings screen hotkeys are panel-specific:
9393

94-
- Account List View: `Enter Toggle | Number Toggle | M Sort | L Layout | S Save | Q Back (No Save)`
95-
- Summary Line: `Enter Toggle | 1-3 Toggle | [ ] Reorder | S Save | Q Back (No Save)`
96-
- Menu Behavior: `Enter Select | 1-3 Delay | P Pause | L AutoFetch | F Status | T TTL | S Save | Q Back (No Save)`
97-
- Color Theme: `Enter Select | 1-2 Base | S Save | Q Back (No Save)`
98-
- Backend Controls: `Enter Open | 1-4 Category | S Save | R Reset | Q Back (No Save)`
94+
- List Appearance: `Enter Toggle | Number Toggle | M Sort | L Layout | S Save | Q Back (No Save)`
95+
- Details Line: `Enter Toggle | 1-3 Toggle | [ ] Reorder | S Save | Q Back (No Save)`
96+
- Results & Refresh: `Enter Select | 1-3 Delay | P Pause | L AutoFetch | F Status | T TTL | S Save | Q Back (No Save)`
97+
- Colors: `Enter Select | 1-2 Base | S Save | Q Back (No Save)`
98+
- Advanced Backend Controls: `Enter Open | 1-4 Category | S Save | R Reset | Q Back (No Save)`
9999

100100
---
101101

102102
## Workflow Packs
103103

104+
Interactive dashboard workflows:
105+
106+
- Backup restore: `codex auth login` -> `Restore From Backup`
107+
- Startup recovery prompt: interactive `codex auth login` TTY flow only, then confirm restore when recoverable named backups are found before OAuth
108+
- Sync preview and apply: `codex auth login` -> `Settings` -> `Codex CLI Sync`
109+
- Stable settings path: `codex auth login` -> `Settings` -> `Everyday Settings`
110+
- Advanced settings path: `codex auth login` -> `Settings` -> `Advanced & Operator`
111+
112+
---
113+
104114
Health and planning:
105115

106116
```bash

docs/reference/settings.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ When `CODEX_MULTI_AUTH_DIR` is set, this root moves accordingly.
2121

2222
## Everyday Settings
2323

24-
The top-level settings flow separates everyday dashboard preferences from advanced operator controls.
24+
The shipped settings menu starts with `Everyday Settings` and keeps the stable dashboard path separate from advanced operator controls. This is the default path for most users.
2525

2626
### List Appearance
2727

@@ -72,9 +72,11 @@ Controls display style:
7272

7373
## Advanced and Operator Controls
7474

75+
The second top-level section is `Advanced & Operator`. It holds the sync workflow and backend tuning that are useful when you need to inspect or change lower-level behavior.
76+
7577
### Codex CLI Sync
7678

77-
The advanced section includes a preview-first sync center for Codex CLI account sync.
79+
`Codex CLI Sync` is a preview-first sync center for Codex CLI account sync.
7880
See [upgrade notes](../upgrade.md) for sync workflow changes.
7981

8082
Before applying sync, it shows:
@@ -86,6 +88,13 @@ Before applying sync, it shows:
8688
- destination-only preservation behavior
8789
- backup and rollback context (`.bak`, `.bak.1`, `.bak.2`, `.wal`)
8890

91+
Workflow notes:
92+
93+
- refresh recomputes the read-only preview from Codex CLI source files
94+
- apply writes the preview result into the target path
95+
- sync is one-way, it is not a bidirectional merge
96+
- target-only accounts are preserved rather than deleted
97+
8998
Validation:
9099

91100
- `npm run typecheck`
@@ -116,7 +125,7 @@ Named backup behavior:
116125

117126
### Advanced Backend Controls
118127

119-
Expert backend controls stay available without changing the saved settings schema. They are grouped into categories so the default path can stay simpler for day-to-day use.
128+
`Advanced Backend Controls` stay available without changing the saved settings schema. They are grouped into categories so the everyday path can stay simpler for day-to-day use.
120129

121130
## Backend Categories
122131

@@ -208,6 +217,7 @@ For most environments:
208217

209218
- smart sort enabled
210219
- auto-fetch limits enabled
220+
- storage backups enabled when you want rollback context for sync and recovery flows
211221
- live sync enabled
212222
- session affinity enabled
213223
- preemptive quota deferral enabled

docs/troubleshooting.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Troubleshooting
22

3-
Recovery guide for install, login, switching, worktree storage, and stale local auth state.
3+
Recovery guide for install, login, backup restore, sync preview, worktree storage, and stale local auth state.
44

55
---
66

@@ -20,6 +20,8 @@ codex auth login
2020

2121
If `codex auth login` starts with no saved accounts and recoverable named backups are present, you will be prompted to restore before OAuth. This prompt only appears in interactive terminals and is skipped after same-session fresh/reset flows.
2222

23+
If you want to inspect backup options yourself instead of taking the prompt immediately, open `codex auth login` and choose `Restore From Backup`.
24+
2325
---
2426

2527
## Verify Install And Routing
@@ -57,6 +59,17 @@ npm i -g codex-multi-auth
5759

5860
---
5961

62+
## Backup Restore Problems
63+
64+
| Symptom | Likely cause | Action |
65+
| --- | --- | --- |
66+
| You expected a restore prompt but went straight to OAuth | No recoverable named backups were found, the terminal is non-interactive, or the flow is skipping restore after an intentional reset | Put named backup files in `~/.codex/multi-auth/backups/`, then rerun `codex auth login` in an interactive terminal |
67+
| `Restore From Backup` says no backups were found | The named backup directory is empty or the files are elsewhere | Place backup files in `~/.codex/multi-auth/backups/` and retry |
68+
| A backup is listed but cannot be selected | The backup is invalid or would exceed the account limit | Trim current accounts first or choose a different backup |
69+
| Restore succeeded but some rows were skipped | Deduping kept the existing matching account state | Run `codex auth list` and `codex auth check` to review the merged result |
70+
71+
---
72+
6073
## Switching And State Problems
6174

6275
| Symptom | Likely cause | Action |
@@ -67,6 +80,19 @@ npm i -g codex-multi-auth
6780

6881
---
6982

83+
## Codex CLI Sync Problems
84+
85+
Use `codex auth login` -> `Settings` -> `Codex CLI Sync` when you want to inspect sync state before applying it.
86+
87+
| Symptom | Likely cause | Action |
88+
| --- | --- | --- |
89+
| Sync preview looks one-way | This is the shipped behavior | Review the preview, then apply only if the target result is what you want |
90+
| A target-only account would be lost | The sync center preserves destination-only accounts instead of deleting them | Recheck the preview summary before apply |
91+
| You want rollback context before syncing | Backup support is disabled in current settings | Enable storage backups in advanced settings, then refresh the sync preview |
92+
| Active selection does not match expectation | Preview kept the newer local choice or updated from Codex CLI based on selection precedence | Refresh preview and review the selection summary before apply |
93+
94+
---
95+
7096
## Worktrees And Project Storage
7197

7298
| Symptom | Likely cause | Action |
@@ -89,6 +115,11 @@ codex auth report --live --json
89115
codex auth doctor --json
90116
```
91117

118+
Interactive diagnostics path:
119+
120+
- `codex auth login` -> `Settings` -> `Codex CLI Sync` for preview-based sync diagnostics
121+
- `codex auth login` -> `Settings` -> `Advanced Backend Controls` for sync, retry, quota, recovery, and timeout tuning
122+
92123
---
93124

94125
## Reset Options

0 commit comments

Comments
 (0)