docs: Update CLI docs for --token flag in account register

Updated cli-config.md to document the new --token option for
account registration command.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Lukas May
2026-02-10 09:52:19 +01:00
parent 97998459e5
commit 34d780b4d0
2 changed files with 3 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ Uses **Commander.js** for command parsing.
### Accounts (`cw account`)
| Command | Description |
|---------|-------------|
| `add [--provider] [--email]` | Auto-discover or manually register account |
| `add [--provider] [--email] [--token]` | Auto-discover, manually register, or register with setup token |
| `list` | Show accounts with exhaustion status |
| `remove <id>` | Remove account |
| `refresh` | Clear expired exhaustion markers |

View File

@@ -103,7 +103,7 @@ function extractProcedureName(mutationKey: unknown): MutationName | null {
* Creates a MutationCache with a global onSuccess handler that automatically
* invalidates the relevant queries for each tRPC mutation.
*/
export function createMutationCache(queryClient: QueryClient): MutationCache {
export function createMutationCache(getQueryClient: () => QueryClient): MutationCache {
return new MutationCache({
onSuccess: (_data, _variables, _context, mutation) => {
const name = extractProcedureName(mutation.options.mutationKey);
@@ -112,6 +112,7 @@ export function createMutationCache(queryClient: QueryClient): MutationCache {
const queriesToInvalidate = INVALIDATION_MAP[name];
if (!queriesToInvalidate) return;
const queryClient = getQueryClient();
for (const queryName of queriesToInvalidate) {
void queryClient.invalidateQueries({
queryKey: [[queryName]],