Skip to content

feat(accounts): export and import all provider accounts - #557

Merged
caigee-cmd merged 1 commit into
caigee-cmd:mainfrom
guyu233:feat/account-export-import
Nov 20, 2026
Merged

caigee-cmd merged 1 commit into
caigee-cmd:mainfrom
guyu233:feat/account-export-import

Conversation

@guyu233

@guyu233 guyu233 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a full account export/import feature for moving all configured provider accounts between two computers.
  • Export downloads one JSON file containing every account's settings and stored sign-in credential.
  • Import is a separate, dedicated action with a confirmation dialog showing the account count; it adds new accounts with fresh IDs and never modifies existing ones.
  • The existing "Batch import" (WorkBuddy/Kiro credential packs) is unchanged.

Backend

  • New versioned bundle format cli2api-accounts v1 in internal/control/account_bundle.go.
  • New authenticated endpoints:
    • GET /api/accounts/export
    • POST /api/accounts/import/bundle
  • Export covers all stored accounts: provider/region, enabled state, concurrency, priority, model routing, check-in, proxy, and credential (qoder-pat-v1 / all in-process providers, plus legacy qoder-native-v1 blob).
  • Import is additive with partial-success error reporting; failed credential writes roll back the created account.

Frontend

  • Accounts page toolbar gains "Export all accounts" and "Import all accounts" buttons.
  • File download uses Blob + URL.createObjectURL; file name includes the export timestamp.
  • Dedicated import confirmation modal shows file name, account count, and how many have credentials.
  • i18n strings added in both English and Chinese.

Security note

The exported file contains cleartext sign-in credentials. The UI warns the operator to keep the file private.

Validation

  • go build ./internal/... passed.
  • go test ./internal/control/... ./internal/console/... passed.
  • npm run build and npm run lint passed (0 errors).
  • npm run sync executed; embedded static assets match the new bundle.

Changelog

  • changelog/unreleased/account-bundle-export-import.md added.

@caigee-cmd
caigee-cmd force-pushed the feat/account-export-import branch from abb863c to 49c7ccc Compare November 20, 2026 08:36
@caigee-cmd
caigee-cmd force-pushed the feat/account-export-import branch from 49c7ccc to ca58d94 Compare November 20, 2026 09:39
@caigee-cmd
caigee-cmd merged commit 624823a into caigee-cmd:main Nov 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants