account-switcher
v1.0.0
Published
Lightweight CLI tool untuk switch antara multiple accounts (Codex, Antigravity, GitHub, dll) dengan mudah dan aman. Switch accounts dalam 5 detik tanpa re-login!
Maintainers
Readme
Account Switcher 🔐
Lightweight CLI tool untuk switch antara multiple accounts (Codex, Antigravity, GitHub, dll) dengan mudah dan aman.
Switch accounts dalam 5 detik tanpa re-login! ⚡
📑 Table of Contents
- Features
- Installation
- Quick Start
- Tutorial by Use Case
- Commands Reference
- Authentication Methods Comparison
- Security
- Documentation
- FAQ
- Support
Features ✨
- 🔒 Secure Storage - Credentials disimpan dengan enkripsi
- ⚡ Quick Switch - Ganti account dengan satu command
- 🔐 Auto Login - Login otomatis ke Codex/Antigravity
- 🌐 OAuth Support - Login dengan Google OAuth untuk Codex/Antigravity
- 📱 Desktop App Support - Auto-open Codex/Antigravity apps (Mac)
- 🔄 Auth File Management - Direct access ke auth JSON Codex/Antigravity ⭐ NEW
- 💾 Backup & Restore - Save dan restore auth sessions ⭐ NEW
- 🚀 Seamless Switching - Switch account tanpa re-login ⭐ NEW
- 📋 List Accounts - Lihat semua accounts tersimpan
- ➕ Easy Management - Add/remove accounts dengan mudah
- 🎨 Beautiful CLI - Interface yang clean dan user-friendly
- 🔑 Export Credentials - Export sebagai environment variables
- 📝 Login Scripts - Generate login scripts untuk automation
Installation
# Clone or download this project
cd switch-account
# Install dependencies
npm install
# Link globally (agar bisa pakai command 'acc' di mana saja)
npm link
# Verify installation
acc --versionQuick Start 🚀
1. Add Your First Account
acc addFollow the interactive prompts:
- Account type: Codex (Google OAuth) ⭐ Recommended
- Name: work-codex
- Email: [email protected]
2. Open App & Login
acc open work-codexCodex app will open. Login manually with your Google account.
3. Backup Your Session
acc backup work-codexNow your session is saved! ✅
4. Add Second Account & Repeat
acc add # Add personal-codex
acc open # Login in app
acc backup personal-codex5. Switch Between Accounts (Instant!)
# Switch to work
acc apply work-codex --restart
# Switch to personal
acc apply personal-codex --restartDone! No re-login needed! 🎉
Tutorial by Use Case
📱 For Codex Desktop App Users
Setup Multiple Accounts
# 1. Add work account
acc add
# → Codex (Google OAuth)
# → Name: work-codex
# → Email: [email protected]
# 2. Add personal account
acc add
# → Codex (Google OAuth)
# → Name: personal-codex
# → Email: [email protected]First-Time Login & Backup
# Login to work account
acc open work-codex
# → Codex app opens
# → Login manually with [email protected]
# → Complete OAuth in browser
# Backup work session
acc backup work-codex
# ✓ Session saved!
# Logout in Codex app (click email → Log out)
# Login to personal account
acc open personal-codex
# → Login with [email protected]
# Backup personal session
acc backup personal-codex
# ✓ Session saved!Daily Switching (5 Seconds!)
# Morning - work mode
acc apply work-codex --restart
# ✓ Codex opens with [email protected]
# Evening - personal mode
acc apply personal-codex --restart
# ✓ Codex opens with [email protected]Check Current Session
acc sync work-codexOutput:
🔄 Syncing codex auth...
✓ Auth file found!
📋 Current Session:
Email: [email protected]
User ID: user_abc123
Has Token: Yes🚀 For Antigravity Users
Same workflow as Codex:
# Add account
acc add
# → Antigravity (Google OAuth)
# → Name: my-antigravity
# → Email: [email protected]
# Open & login
acc open my-antigravity
# Backup
acc backup my-antigravity
# Switch
acc apply my-antigravity --restart💻 For GitHub/GitLab Users
Add Account with API Token
acc add
# → GitHub (API token)
# → Name: work-github
# → Username: johndoe
# → Token: ghp_xxxxxxxxxxxx
# → API URL: https://api.github.com (optional)Use in Scripts
# Export credentials
eval $(acc export work-github)
# Use in API calls
curl -H "Authorization: Bearer $ACCOUNT_TOKEN" \
-H "User: $ACCOUNT_USERNAME" \
$ACCOUNT_API_URL/user🔄 Managing Multiple Accounts
List All Accounts
acc listOutput:
📋 Saved Accounts:
→ work-codex [codex] ⭐
personal-codex [codex]
client-codex [codex]
work-github [github]Switch Current Account
acc switch personal-codexCheck Current Account
acc currentOutput:
🔑 Current Account:
Name: work-codex
Type: codex
User: [email protected]
Auth: OAuth (google)Remove Account
acc remove old-account
# For names with spaces
acc remove "Old Account"💾 Backup & Restore
Backup Current Session
acc backup work-codexSaves to: ~/.config/account-switcher/backups/codex/work-codex.json
List All Backups
acc backupsOutput:
💾 Auth Backups:
codex:
• work-codex
Created: 1/15/2025, 10:30:00 AM
Size: 2.45 KB
• personal-codex
Created: 1/15/2025, 11:00:00 AM
Size: 2.38 KBRestore Specific Backup
acc restore work-codex --restartSmart Switch (Auto Backup + Restore)
acc apply work-codex --restartThis command:
- ✅ Backs up current session automatically
- ✅ Restores target account session
- ✅ Sets as current account
- ✅ Restarts app
🛠️ Advanced Usage
Restart App
acc restart work-codexExport for Scripts
# Export current account
eval $(acc export)
# Export specific account
eval $(acc export work-codex)
# Use in script
echo $ACCOUNT_USERNAME
echo $ACCOUNT_PASSWORD # or $ACCOUNT_TOKENGenerate Login Script
# Generate script
acc script work-codex -o login.sh
# Use script
source login.sh🎯 Real-World Workflows
Workflow 1: Freelancer with Multiple Clients
# Setup
acc add # client-a-codex
acc add # client-b-codex
acc add # client-c-codex
# Login & backup each
acc open client-a-codex && acc backup client-a-codex
acc open client-b-codex && acc backup client-b-codex
acc open client-c-codex && acc backup client-c-codex
# Daily switching
acc apply client-a-codex --restart # Morning
acc apply client-b-codex --restart # Afternoon
acc apply client-c-codex --restart # EveningWorkflow 2: Work/Personal Separation
# Setup
acc add # work-codex ([email protected])
acc add # personal-codex ([email protected])
# Backup both
acc backup work-codex
acc backup personal-codex
# Daily routine
acc apply work-codex --restart # 9 AM
acc apply personal-codex --restart # 6 PMWorkflow 3: Testing Multiple Accounts
# Setup test accounts
acc add # test-1-codex
acc add # test-2-codex
acc add # test-3-codex
# Quick switching for testing
acc apply test-1-codex --restart
# ... test features ...
acc apply test-2-codex --restart
# ... test features ...
acc apply test-3-codex --restart
# ... test features ...🔧 Troubleshooting
Auth File Not Found
acc sync work-codex
# ✗ No auth file found for codexSolution:
- Make sure Codex/Antigravity is installed
- Login manually in the app first
- Then backup:
acc backup work-codex
Backup Not Found
acc restore work-codex
# ✗ Backup not found: work-codexSolution:
- Check backups:
acc backups - Create backup first:
acc backup work-codex
App Doesn't Reflect Changes
Solution:
# Restart app
acc restart work-codex
# Or use --restart flag
acc apply work-codex --restartWrong Account After Apply
Solution:
# Check current session
acc sync
# Restore correct account
acc apply correct-account --restart💡 Pro Tips
1. Create Aliases for Speed
# Add to ~/.bashrc or ~/.zshrc
alias codex-work='acc apply work-codex --restart'
alias codex-personal='acc apply personal-codex --restart'
alias codex-client='acc apply client-codex --restart'
# Usage
codex-work # Instant switch!
codex-personal
codex-client2. Check Before Switch
# See who's currently logged in
acc sync
# Then switch
acc apply work-codex --restart3. Backup All Accounts Script
#!/bin/bash
# backup-all.sh
echo "Backing up all accounts..."
acc backup work-codex
acc backup personal-codex
acc backup client-codex
echo "✓ All accounts backed up!"4. Auto-load Default Account
# Add to ~/.bashrc or ~/.zshrc
eval $(acc export default-account 2>/dev/null)5. Quick Open Current Account
# Set default
acc switch work-codex
# Quick open
acc openAtau install global:
npm install -g .Usage
Add Account
acc addInteractive prompt akan memandu Anda:
- Account type - Pilih dari:
- Codex (username/password)
- Codex (Google OAuth) ⭐ NEW
- Antigravity (username/password)
- Antigravity (Google OAuth) ⭐ NEW
- GitHub (API token)
- GitLab (API token)
- Custom
- Account name - Nama untuk identifikasi (contoh: "my-codex")
- Username/Email - Username atau email Anda
- Password/Token - Password (untuk username/password) atau API Token (untuk GitHub/GitLab)
- Tidak perlu untuk OAuth accounts
- API URL - (Optional, untuk GitHub/GitLab/Custom)
Authentication Methods:
- Username/Password: Codex & Antigravity (traditional login)
- OAuth (Google): Codex & Antigravity (login dengan Google account) ⭐
- API Token: GitHub, GitLab, dan Custom services
List Accounts
acc list
# atau
acc lsOutput:
📋 Saved Accounts:
→ my-codex [codex]
work-github [github]
personal-antigravity [antigravity]Switch Account
acc switch my-codex
# atau
acc use my-codexShow Current Account
acc currentOutput:
🔑 Current Account:
Name: my-codex
Type: codex
User: [email protected]Remove Account
acc remove my-codex
# atau
acc rm my-codexExport Credentials
Untuk digunakan dalam scripts:
# Export ke environment variables
eval $(acc export my-codex)
# Sekarang bisa digunakan:
echo $ACCOUNT_USERNAME
echo $ACCOUNT_PASSWORD # untuk Codex/Antigravity
echo $ACCOUNT_TOKEN # untuk GitHub/GitLabLogin to Service
Login otomatis ke Codex atau Antigravity:
# Login dengan account yang sudah di-switch
acc login
# Atau login dengan account tertentu
acc login my-codexOutput untuk Codex:
🔐 Logging in to Codex...
Username: [email protected]
Password: ********
✓ Codex credentials loaded!
You can now use Codex CLI commands:
codex login
codex projects
codex deployGenerate Login Script
Buat script untuk automation:
# Print ke console
acc script my-codex
# Save ke file
acc script my-codex -o login-codex.sh
# Gunakan script
source login-codex.shExamples
Setup Codex with Google OAuth ⭐ (Recommended)
# Add Codex account with Google OAuth
acc add
# Select: Codex (Google OAuth)
# Name: my-codex-google
# Email: [email protected]
# (No password needed!)
# Method 1: Auto-open app and show instructions
acc login my-codex-google
# Method 2: Just open the app
acc open my-codex-googleFor Desktop App Users (Mac):
# Open Codex app with account info
acc open my-codex-googleOutput:
📱 Opening Codex app...
Account: [email protected]
✓ Codex app opened!
💡 To login:
1. Click account/profile icon
2. Select "Sign in with Google"
3. Login with: [email protected]What happens:
- ✅ Codex desktop app opens automatically
- ✅ Shows your account email for reference
- ✅ Gives step-by-step instructions
- ✅ You complete OAuth in the app
Setup Codex with Username/Password (Traditional)
# Add Codex account
acc add
# Select: Codex (username/password)
# Name: work-codex
# Username: [email protected]
# Password: your-password
# Switch to it
acc switch work-codex
# Login to Codex
acc login
# Now you can use: codex login, codex projects, etc.Setup Antigravity Account (Username/Password)
# Add Antigravity account
acc add
# Select: Antigravity (username/password)
# Name: my-antigravity
# Username: [email protected]
# Password: your-password
# Login to Antigravity
acc login my-antigravity
# Now you can use: antigravity login, antigravity apps, etc.Setup Antigravity with Google OAuth ⭐
# Add Antigravity account with Google OAuth
acc add
# Select: Antigravity (Google OAuth)
# Name: my-antigravity-google
# Email: [email protected]
# Login - will open browser
acc login my-antigravity-googleSetup GitHub Account (API Token)
# Add GitHub account
acc add
# Select: GitHub (API token)
# Name: work-github
# Username: johndoe
# Token: ghp_xxxxxxxxxxxx
# API URL: https://api.github.com
# Use in scripts
eval $(acc export work-github)
curl -H "Authorization: token $ACCOUNT_TOKEN" \
$ACCOUNT_API_URL/userUse in Scripts
#!/bin/bash
# For Codex/Antigravity (password-based)
eval $(acc export my-codex)
echo "Logging in as: $ACCOUNT_USERNAME"
# Use $ACCOUNT_PASSWORD in your script
# For GitHub/GitLab (token-based)
eval $(acc export work-github)
curl -H "Authorization: Bearer $ACCOUNT_TOKEN" \
-H "User: $ACCOUNT_USERNAME" \
$ACCOUNT_API_URL/api/endpoint🚀 Seamless Account Switching (NEW!)
The Problem
Switching accounts manually:
- Open app
- Logout
- Login with different account
- Wait for OAuth
- Done (5 minutes ⏱️)
The Solution
With auth file management:
acc apply work-codex --restart
# Done in 5 seconds! ⚡Complete Workflow
1. Setup & Backup Accounts
# Add accounts
acc add # work-codex ([email protected])
acc add # personal-codex ([email protected])
# Login to work account in Codex app
acc open work-codex
# ... login manually with [email protected] ...
# Backup work session
acc backup work-codex
# Logout and login to personal account
# ... login manually with [email protected] ...
# Backup personal session
acc backup personal-codex2. Switch Between Accounts (No Re-login!)
# Switch to work
acc apply work-codex --restart
# ✓ Codex opens with [email protected] logged in!
# Switch to personal
acc apply personal-codex --restart
# ✓ Codex opens with [email protected] logged in!3. Check Current Session
acc sync work-codexOutput:
🔄 Syncing codex auth...
✓ Auth file found!
📋 Current Session:
Email: [email protected]
User ID: user_abc123
Has Token: YesNew Commands
| Command | Description | Example |
|---------|-------------|---------|
| acc sync [name] | Check current auth session | acc sync work-codex |
| acc backup <name> | Backup current session | acc backup work-codex |
| acc restore <name> | Restore saved session | acc restore work-codex --restart |
| acc apply <name> | Smart switch (backup + restore) | acc apply work-codex --restart |
| acc restart [name] | Restart app | acc restart work-codex |
| acc backups [type] | List all backups | acc backups codex |
Benefits
- ⚡ 60x Faster - Switch in 5 seconds vs 5 minutes
- 🔒 Secure - Backups stored encrypted
- 💾 Multiple Sessions - Save unlimited accounts
- 🎯 One Command -
acc applydoes everything - 🔄 Auto Backup - Current session backed up automatically
- 🚀 No Re-login - Use saved sessions
Real-World Example
# Morning - work mode
acc apply work-codex --restart
# Codex opens instantly with work account
# Afternoon - client meeting
acc apply client-codex --restart
# Switch to client account in 5 seconds
# Evening - personal projects
acc apply personal-codex --restart
# Back to personal account instantlySee full guide: docs/AUTH_MANAGEMENT.md
🎯 Authentication Methods Comparison:
| Service | Auth Method | Setup Required | Login Process | Security |
|---------|-------------|----------------|---------------|----------|
| Codex | Google OAuth ⭐ | Email only | Browser opens automatically | ⭐⭐⭐⭐⭐ Most secure |
| Codex | Username/Password | Email + Password | acc login | ⭐⭐⭐ Secure |
| Antigravity | Google OAuth ⭐ | Email only | Browser opens automatically | ⭐⭐⭐⭐⭐ Most secure |
| Antigravity | Username/Password | Email + Password | acc login | ⭐⭐⭐ Secure |
| GitHub | API Token | Username + Token | eval $(acc export) | ⭐⭐⭐⭐ Very secure |
| GitLab | API Token | Username + Token | eval $(acc export) | ⭐⭐⭐⭐ Very secure |
Why OAuth is Recommended? ⭐
- No Password Storage - Passwords tidak disimpan di local
- Automatic Refresh - Token di-refresh otomatis
- Easy Revocation - Bisa revoke access dari Google account settings
- 2FA Support - Mendukung Google 2-Factor Authentication
- Audit Trail - Google tracks login activity
Automation with Login Scripts
# Generate login script
acc script my-codex -o ~/.acc-codex.sh
# Add to your workflow
source ~/.acc-codex.sh
codex deploy --project myapp
# Or use in CI/CD
#!/bin/bash
source ~/.acc-codex.sh
codex login
codex deploy --env productionIntegration with Shell
Add to your .bashrc or .zshrc:
# Quick aliases
alias accls='acc list'
alias accuse='acc switch'
alias acccur='acc current'
# Auto-load account on shell start
eval $(acc export default-account 2>/dev/null)Security 🔒
- Credentials disimpan dengan enkripsi menggunakan machine-specific key
- Config file location:
~/.config/account-switcher/config.json - Encryption key generated dari platform, architecture, dan home directory
- Tidak ada credentials yang di-log atau di-print ke console
Commands Reference
| Command | Alias | Description |
|---------|-------|-------------|
| acc add | - | Add new account (interactive) |
| acc list | ls | List all accounts |
| acc switch <name> | use | Switch to account |
| acc current | - | Show current account |
| acc remove <name> | rm | Remove account |
| acc open [name] | - | Open desktop app |
| acc sync [name] | - | Check current session |
| acc backup <name> | - | Backup auth session |
| acc restore <name> | - | Restore auth session |
| acc apply <name> | - | Smart switch (backup + restore + restart) |
| acc restart [name] | - | Restart desktop app |
| acc backups [type] | - | List all backups |
| acc export <name> | - | Export as env vars |
| acc login [name] | - | Login to service |
| acc script <name> | - | Generate login script |
Command Details
Basic Commands
acc add - Add new account
- Interactive prompts
- Supports: Codex, Antigravity, GitHub, GitLab, Custom
- Auth methods: OAuth, Username/Password, API Token
acc list (alias: ls) - List all accounts
- Shows all saved accounts
- Indicates current account with →
- Displays account type
acc switch <name> (alias: use) - Set current account
- Changes active account
- Doesn't modify auth files
- Use with
acc openoracc apply
acc current - Show current account details
- Displays name, type, username, auth method
- Shows API URL if configured
acc remove <name> (alias: rm) - Remove account
- Deletes account from config
- Requires confirmation
- Use quotes for names with spaces:
acc remove "My Account"
Desktop App Commands
acc open [name] - Open desktop app
- Opens Codex or Antigravity app
- Shows login instructions
- Uses current account if name not specified
acc restart [name] - Restart app
- Closes and reopens app
- Applies auth file changes
- Uses current account if name not specified
Auth Management Commands ⭐
acc sync [name] - Check current session
- Reads auth file
- Shows logged in email, user ID, token status
- Verifies auth file exists
acc backup <name> - Backup auth session
- Saves current auth.json
- Stores in
~/.config/account-switcher/backups/ - Required before switching accounts
acc restore <name> - Restore auth session
- Loads saved auth.json
- Overwrites current auth file
- Use
--restartflag to restart app automatically
acc apply <name> - Smart switch ⭐ RECOMMENDED
- Auto-backs up current session
- Restores target account session
- Sets as current account
- Use
--restartflag to restart app - This is the main command for switching!
acc backups [type] - List all backups
- Shows all saved sessions
- Displays creation date and size
- Filter by type:
codexorantigravity
Export & Script Commands
acc export <name> - Export as environment variables
- For GitHub/GitLab: exports token
- For Codex/Antigravity: exports username/password
- Use with
eval $(acc export name)
acc login [name] - Login to service
- For OAuth: opens browser
- For password: shows credentials
- For desktop apps: opens app with instructions
acc script <name> - Generate login script
- Creates reusable login script
- Use
-o filenameto save to file - For automation and CI/CD
Tips 💡
Account Types:
- Codex/Antigravity with Google OAuth ⭐ (Recommended - no password needed!)
- Codex/Antigravity: Username + Password (traditional)
- GitHub/GitLab: Username + API Token (for API access)
OAuth Benefits:
- ✅ No need to store passwords
- ✅ More secure (uses Google's authentication)
- ✅ Easy to revoke access
- ✅ Automatic token refresh
Naming Convention: Gunakan nama yang descriptive
work-codex-google personal-codex-password staging-antigravity-googleQuick Login:
acc switch my-codex-google && acc loginMultiple Accounts:
# Work account with Google acc add # work-codex-google # Personal account with password acc add # personal-codex-password # Switch between them acc switch work-codex-google acc switch personal-codex-passwordAuto-load on Shell Start:
# Add to ~/.bashrc or ~/.zshrc eval $(acc export default-account 2>/dev/null)Backup: Config file ada di
~/.config/account-switcher/config.json
🔒 Security
Encryption
- ✅ Credentials encrypted with machine-specific key
- ✅ Uses OS platform, architecture, and home directory as seed
- ✅ Different machines = different encryption keys
File Permissions
- ✅ Config file:
600(owner read/write only) - ✅ Backup directory:
700(owner access only) - ✅ Auth backups:
600(owner read/write only)
Best Practices
- ✅ Never share config or backup files
- ✅ Keep backups in secure location
- ✅ Use OAuth when possible (no password storage)
- ✅ Regularly update and rotate credentials
- ✅ Delete old backups periodically
What's Stored
- OAuth accounts: Email only (no password)
- Password accounts: Encrypted username + password
- Token accounts: Encrypted username + API token
- Auth backups: Complete auth.json (access tokens, refresh tokens)
📚 Documentation
Main Guides
- README.md - This file (complete guide)
- Quick Start - Get started in 5 minutes
- Tutorial by Use Case - Step-by-step tutorials
Advanced Guides
- docs/AUTH_MANAGEMENT.md - Complete auth file management guide (450+ lines)
- docs/OAUTH.md - OAuth flow explanation
- docs/DESKTOP_APP.md - Desktop app usage guide
- docs/CODEX_APP_GUIDE.md - Codex app specific guide
- docs/QUICK_REFERENCE.md - Quick command reference
Video Tutorials (Coming Soon)
- Setting up your first account
- Switching between accounts
- Backup and restore workflow
- Advanced tips and tricks
❓ FAQ
General Questions
Q: Do I need to install Codex/Antigravity CLI?
A: No! This tool works with desktop apps. CLI is optional.
Q: Can I use this on Windows/Linux?
A: Currently optimized for macOS. Windows/Linux support coming soon.
Q: How many accounts can I add?
A: Unlimited! Add as many as you need.
Q: Is my data safe?
A: Yes! All credentials are encrypted with machine-specific keys.
Account Management
Q: Can I rename an account?
A: Not directly. Remove and re-add with new name, or edit config file manually.
Q: What happens if I delete an account?
A: Only the config entry is deleted. Auth backups remain until manually deleted.
Q: Can I export my accounts to another machine?
A: Config file is machine-specific due to encryption. You'll need to re-add accounts on new machine.
Auth File Management
Q: Where are auth files stored?
A:
- Codex:
~/Library/Application Support/Codex/auth.json - Antigravity:
~/Library/Application Support/Antigravity/auth.json
Q: What if auth file location is different?
A: Tool auto-detects common locations. If not found, you can manually specify in code.
Q: Can I backup auth files manually?
A: Yes! Use acc backup <name> or copy auth.json manually.
Q: How do I restore if something goes wrong?
A: Use acc backups to list backups, then acc restore <name> --restart.
Switching Accounts
Q: Do I need to logout manually before switching?
A: No! acc apply handles everything automatically.
Q: How long does switching take?
A: ~5 seconds (app restart time). No re-login needed!
Q: Can I switch while app is running?
A: Yes! Use acc apply <name> --restart to close and reopen automatically.
Q: What if switch fails?
A: Previous session is auto-backed up. Use acc backups to find and restore it.
OAuth & Authentication
Q: Why use OAuth instead of password?
A: More secure, no password storage, automatic token refresh, easy revocation.
Q: Can I use GitHub/Google OAuth for Codex?
A: Yes! Select "Codex (Google OAuth)" when adding account.
Q: What if OAuth browser doesn't open?
A: Manual steps will be shown. Login in app manually.
Q: How do I revoke access?
A: Go to Google Account settings → Security → Third-party apps → Remove Codex/Antigravity.
Troubleshooting
Q: "Auth file not found" error?
A: Login manually in app first, then run acc backup <name>.
Q: "Backup not found" error?
A: Create backup first with acc backup <name>.
Q: App doesn't reflect changes?
A: Restart app with acc restart <name> or use --restart flag.
Q: Wrong account after apply?
A: Check with acc sync, then restore correct account.
Advanced Usage
Q: Can I use this in scripts?
A: Yes! Use acc export for env vars or acc script to generate scripts.
Q: Can I automate switching?
A: Yes! Create aliases or cron jobs with acc apply commands.
Q: Can I use with CI/CD?
A: Yes! Export credentials with acc export in CI/CD pipelines.
Q: Can I integrate with other tools?
A: Yes! Tool outputs JSON-compatible data for integration.
🆘 Support
Getting Help
Issues & Bugs
Found a bug? Open an issue
Feature Requests
Have an idea? Submit a feature request
Questions
Need help? Start a discussion
Community
Discord (Coming Soon)
Join our community for real-time help and discussions.
Twitter
Follow @alfianmaulana for updates.
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Reporting Security Issues
Found a security vulnerability? Please email [email protected] instead of opening a public issue.
🎯 Roadmap
v1.1 (Current)
- [x] Multi-account management
- [x] OAuth support
- [x] Desktop app integration
- [x] Auth file management
- [x] Backup & restore
v1.2 (Next)
- [ ] Windows support
- [ ] Linux support
- [ ] GUI application
- [ ] Cloud sync (optional)
- [ ] Team sharing features
v2.0 (Future)
- [ ] Browser extension
- [ ] Mobile app
- [ ] Enterprise features
- [ ] SSO integration
- [ ] Audit logging
Community Requests
- [ ] VS Code extension
- [ ] Alfred workflow
- [ ] Raycast extension
- [ ] Slack integration
📊 Comparison
vs Manual Switching
| Feature | Manual | Account Switcher | |---------|--------|------------------| | Switch Time | 5 minutes | 5 seconds | | Re-login Required | Yes | No | | Multiple Accounts | Hard to manage | Easy | | Backup Sessions | Manual | Automatic | | Secure Storage | No | Yes (encrypted) | | Command Line | No | Yes | | Automation | No | Yes |
vs Other Tools
| Feature | Account Switcher | Tool A | Tool B | |---------|------------------|--------|--------| | Desktop App Support | ✅ | ❌ | ✅ | | Auth File Management | ✅ | ❌ | ❌ | | OAuth Support | ✅ | ✅ | ❌ | | Backup & Restore | ✅ | ❌ | ✅ | | Seamless Switching | ✅ | ❌ | ❌ | | Open Source | ✅ | ❌ | ✅ | | Free | ✅ | ❌ | ✅ |
🙏 Acknowledgments
Built with:
- Commander.js - CLI framework
- Inquirer.js - Interactive prompts
- Chalk - Terminal colors
- Conf - Config storage
Inspired by:
- AWS CLI profiles
- Git config management
- SSH key management
Special thanks to:
- Codex team for amazing desktop app
- Antigravity team for developer tools
- Open source community
📄 License
MIT License
Copyright (c) 2025 Alfian Maulana
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
⭐ Star History
If you find this tool useful, please consider giving it a star on GitHub! ⭐
Made with ❤️ by Alfian Maulana
Version: 1.1.0
Last Updated: January 2025
Status: Production Ready 🚀
