TUI Dashboard for OpenCode - View providers, MCP servers, and plugin accounts
npm install opencode-account-managerManage providers, MCP servers, and plugin accounts in one place.
English |
Tiếng Việt
.ocam, plain JSON, and Antigravity Manager exports
Install opencode-account-manager globally via npm, then run "ocam" to verify installation.
Repository: https://github.com/d-init-d/opencode-account-manager
`
$3
`bash
npm install -g opencode-account-manager
`
$3
`bash
npm install -g github:d-init-d/opencode-account-manager
`
$3
`bash
ocam --version
`
---
For LLM Agents
$3
1. Run npm install -g opencode-account-manager to install globally
2. Run ocam to start the TUI dashboard
3. The dashboard will auto-detect OpenCode config at ~/.config/opencode/opencode.json
$3
`bash
ocam --version
Expected output: 0.4.2
`
---
Usage
$3
`bash
ocam
or
opencode-account-manager
`
$3
`bash
List accounts
ocam listExport accounts (encrypted by default)
ocam export -o backup.ocam
Or with env variable (non-interactive)
OCAM_EXPORT_PASSWORD="your-password" ocam export -o backup.ocamExport as plain JSON (requires acknowledgment)
ocam export -o backup.json --plain --i-understandImport accounts
ocam import backup.ocamImport from Antigravity Manager folder
ocam import-amHealth check
ocam checkHealth check (specific emails)
ocam check --emails user1@example.com,user2@example.comHealth check (bypass cache)
ocam check --forceHelp
ocam --help
`> Security Notes:
> - CLI export defaults to encrypted format (AES-256-GCM)
> - Password can be set via
OCAM_EXPORT_PASSWORD env var or interactive prompt
> - --password flag has been removed for security (avoid exposing passwords in shell history)
> - Plain export requires both --plain and --i-understand flagsHealth Check OAuth Config
Set OAuth client credentials via environment variables:
`
OCAM_OAUTH_CLIENT_ID=...
OCAM_OAUTH_CLIENT_SECRET=...
OCAM_OAUTH_TOKEN_ENDPOINT=https://oauth2.googleapis.com/token
`Security Configuration
- OAuth Endpoint Allowlist: Only
https://oauth2.googleapis.com/token is allowed by default
- Custom Endpoints: Set OCAM_OAUTH_ALLOW_CUSTOM_ENDPOINT=true to use non-standard endpoints
- clientSecret Storage: OCAM warns if clientSecret is stored in config file (use env var instead)
---
Keyboard Shortcuts
$3
| Key | Action |
|-----|--------|
| Tab | Switch section (Providers → Accounts → MCP) |
| R | Refresh data |
| E | Export accounts |
| I | Import accounts |
| A | Import from Antigravity Manager |
| S | Enter Select Mode |
| Q | Quit |
$3
| Key | Action |
|-----|--------|
| ↑/↓ | Navigate |
| Space | Toggle selection |
| A | Select all |
| N | Deselect all |
| E | Enable selected |
| D | Disable selected |
| X | Export selected |
| DEL | Delete selected |
| Esc | Exit Select Mode |
---
Supported Import Formats
| Format | Extension | Description |
|--------|-----------|-------------|
| Encrypted | .ocam | AES-256-GCM encrypted, password required |
| Portable | .json | OpenCode Account Manager plain export (⚠️ shows security warning) |
| AM Export | .json | Antigravity Manager app export [{email, refresh_token}] |
| Plugin Native | .json | antigravity-accounts.json format |> Security Warning: Plaintext exports (
.json) will display a warning about credential visibility. Encrypted exports (.ocam) are recommended for production use.
---
Configuration Paths
| File | Windows | Linux/Mac |
|------|---------|-----------|
| OpenCode config | ~/.config/opencode/opencode.json | ~/.config/opencode/opencode.json |
| Plugin accounts | %APPDATA%/opencode/antigravity-accounts.json | ~/.config/opencode/antigravity-accounts.json |
| OCAM preferences | %APPDATA%/opencode/ocam-config.json | ~/.config/opencode/ocam-config.json |
> Note: ~ on Windows resolves to your user home directory (e.g., C:\Users\YourName)
---
Requirements
- Node.js: >= 16.x
- OpenCode: Installed and configured
- Terminal: Unicode and 256 colors support (Windows Terminal, iTerm2, etc.)
---
Troubleshooting
$3
`bash
npm install -g opencode-account-manager
`
$3
Login at least one account first:
`bash
opencode auth login
`
$3
Reinstall the package:
`bash
npm uninstall -g opencode-account-manager
npm install -g opencode-account-manager
`$3
OCAM now warns when config files fail to parse:
`
Warning: Failed to parse opencode.json - Unexpected token ...
Warning: Failed to parse ocam-config.json - ...
`These warnings appear on CLI startup and help identify configuration issues.
$3
clientSecret in Config File
`
Warning: OAuth clientSecret should not be stored in ocam-config.json.
Please use OCAM_OAUTH_CLIENT_SECRET environment variable instead.
`Custom OAuth Endpoint Not Allowed
`
Warning: Custom OAuth token endpoint "..." is not in the allowlist.
Set OCAM_OAUTH_ALLOW_CUSTOM_ENDPOINT=true to allow custom endpoints.
`Plain Text Export Warning
`
⚠️ WARNING: Exporting in PLAIN TEXT format.
Your account credentials will be visible in the output file.
This is insecure and should only be used for testing/development.
`---
Documentation
- ROADMAP.md - Version history and plans
- BLUEPRINT.md - Technical architecture
---
Contributing
1. Fork the repo
2. Create branch: git checkout -b feature/your-feature
3. Commit: git commit -m "feat: description"
4. Push: git push origin feature/your-feature`