v1.0.1 - Seamless Login CLI
Seamless login from the command line
codebuddy2api 1.0.1 adds a single command to open the login page, wait for QR authorization, and save your account automatically.
Highlights
- Run
python3 converter.py loginto add an account without starting the server or copying tokens and login IDs. - The command opens your browser and polls until the account is saved. Login links expire after 10 minutes; press
Ctrl+Cto cancel. - Use
--site intlfor the international site and--no-browseron servers or in containers. - Updated English and Chinese quick-start guides with account login and Docker commands.
Security and reliability
- Command-line login and the admin API share credential validation and atomic writes with private file permissions.
- Logging in to the same account updates its existing credential file and preserves other account entries.
- Access and refresh tokens are not printed to the terminal. Failed or cancelled logins do not report a successful save.
Docker
docker pull ghcr.io/maiphucgiang/codebuddy2api:1.0.1After updating and starting your container, add an account with:
docker exec -it codebuddy2api python3 converter.py login --no-browserFor Docker Compose, use docker compose exec codebuddy2api python3 converter.py login --no-browser.
Release tags: 1.0.1, 1.0, 1, and latest. Development builds use edge and do not overwrite latest.
Notes for existing users
- Existing accounts remain available after upgrading; there is no need to log in again.
- Keep the same credential directory for login and the server. Docker credentials remain in the mounted
./authdirectory. - With the default directory scan, newly saved accounts are loaded on the next request without restarting. Servers started with
--auth-fileonly use the specified files.
Validation
- 90 regression tests passed inside the locally built Python 3.12 amd64 image.
- Version/tag consistency and Docker Compose configuration checks passed.
- GitHub Actions built and published both architectures. Anonymous pulls and manifest inspection confirmed matching
1.0.1,1.0,1, andlatesttags; the published image reports version 1.0.1 and includes the login command. - CodeQL completed. Two alerts that classified the returned credential file path as a password were reviewed and dismissed as false positives; no open code-scanning alerts remain.
- Login tests cover polling, account updates, cancellation, expiry, credential validation, and save failures. Browser authorization uses mocked responses; a real account QR login was not performed.
For personal learning only. Use only subscriptions and accounts you are authorized to access.