multicoder is a comprehensive authentication and profile management solution designed for developers working with multiple AI providers. It provides a unified interface to manage credentials, switch between profiles, and maintain consistent authentication state across Anthropic Claude, Google Gemini, OpenAI/Codex, Amazon Q, and more.
Whether you're building automation tools, desktop applications, or command-line utilities, multicoder eliminates the complexity of managing multiple API keys and OAuth flows across different providers.
- 🔐 Unified Authentication: One consistent API for all AI providers
- 👤 Profile Management: Easily switch between different development contexts
- 🖥️ GUI & CLI Options: Choose between intuitive desktop app or powerful command-line tools
- 🔄 Auto Migration: Seamlessly migrates from legacy configurations
- 🌍 Cross-Platform: Works on Windows, macOS, and Linux
- 🛠️ Developer-Friendly: Desktop app, CLI tools, programmatic API, and rich examples
- 🔌 Extensible: Plugin-based architecture for adding new providers
Modern Tauri-based desktop application for visual profile management:
- Intuitive Interface: User-friendly GUI for all profile operations
- Visual Status Dashboard: See authentication status and active profiles at a glance
- One-Click Operations: Create, switch, and manage profiles without typing commands
- Cross-Platform Native: Native performance on Windows, macOS, and Linux
- No CLI Required: Perfect for users who prefer graphical interfaces
Isolate credentials by profile with automatic migration from legacy multicoder and unycode configurations. Each profile maintains its own set of provider credentials, making it easy to manage multiple accounts or environments.
The CredentialManager intelligently handles:
- Native OAuth token caches
- Secure API key storage
- Environment variable integration
- Automatic credential refresh
Built-in authenticators for major AI platforms:
- Anthropic Claude - API key and OAuth support
- Google Gemini - API key authentication
- OpenAI/Codex - OAuth with automatic token refresh
- Amazon Q - Native credential integration
SystemEnvironmentManager provides unified environment variable persistence across platforms:
- Windows: User and system-level registry management
- macOS/Linux: Shell integration (bash, zsh, fish)
- Automatic shell profile detection and updates
Full-featured CLI (coders) for interactive authentication management:
coders profile create my-dev-profile
coders login gemini
coders switch my-dev-profile
coders statusnpm install multicoderOr install globally to use the CLI anywhere:
npm install -g multicoderDownload the pre-built desktop application from the Releases page for your platform:
- Windows:
.exeinstaller - macOS:
.dmgpackage - Linux:
.AppImageor.debpackage
The desktop application provides the same functionality as the CLI with an intuitive graphical interface - no installation or command-line knowledge required.
- Download and install the desktop application from Releases
- Launch the application
- Click "Create Profile" to set up your first profile
- Choose your AI provider (Claude, Gemini, Codex, etc.)
- Enter your API key or complete OAuth authentication
- Start using your configured profile immediately
The GUI provides visual feedback for all operations and makes it easy to:
- Manage multiple profiles with a click
- See authentication status at a glance
- Switch between different AI providers quickly
- No terminal or coding required
import { ProfileManager, authRegistry } from 'multicoder';
// Initialize profile manager
const profileManager = new ProfileManager();
await profileManager.initialize();
// Create a profile with API key
await profileManager.createProfileWithApiKey(
'gemini-dev',
'gemini',
process.env.GOOGLE_API_KEY
);
// Switch to the profile
const result = await profileManager.switchProfile('gemini-dev');
console.log(`Applied credentials:`, result.appliedCredentials);
// Use provider-specific authenticator
const geminiAuth = authRegistry.get('gemini');
const authResult = await geminiAuth?.authenticate({
profile: 'gemini-dev'
});After installation, use the coders command:
# List all profiles
coders profile list
# Create a new profile
coders profile create my-profile
# Create profile from environment variables
coders profile create-from-env dev-env
# Login to a provider
coders login gemini
coders login claude
# Switch active profile
coders switch my-profile
# Check authentication status
coders status
coders whoami
# Logout from a provider
coders logout gemini
# Delete a profile
coders profile delete my-profileDefault: ~/.multicoder
Override: Set MULTICODER_CONFIG_DIR environment variable
~/.multicoder/
├── credentials/ # Managed provider credentials
│ ├── gemini/
│ ├── claude/
│ └── codex/
├── profiles.json # Profile configurations
├── env.sh # POSIX environment variables
└── config.json # Global settings
The module automatically migrates configurations from:
~/.config/multicoder~/.config/unycoding%APPDATA%\multicoder(Windows)%APPDATA%\unycoding(Windows)~/Library/Application Support/multicoder(macOS)~/Library/Application Support/unycoding(macOS)
import { BaseAuthenticator, authRegistry } from 'multicoder';
class MyCustomAuth extends BaseAuthenticator {
async authenticate(options) {
// Your authentication logic
}
async getCredentials(options) {
// Retrieve credentials
}
}
// Register your authenticator
authRegistry.register('my-provider', new MyCustomAuth());import { SystemEnvironmentManager } from 'multicoder';
const envManager = new SystemEnvironmentManager();
// Set persistent environment variable
await envManager.setEnvironmentVariable(
'MY_API_KEY',
'secret-value',
{ persistent: true }
);
// Get current environment
const env = await envManager.getCurrentEnvironment();# Install dependencies
npm install
# Build TypeScript
npm run build
# Run tests
npm test# Run all tests
npm test
# Provider-specific tests
npm run test:gemini
npm run test:claude
npm run test:codex
# Quick smoke test
npm run test:quickExplore the examples/ directory for practical use cases:
create-profile-from-env.js- Bootstrap profiles from existing environmentquick-auth-check.js- Validate authentication statussimple-env-profile.js- Basic profile creation workflowtest-cli-v2-auth-status.js- CLI integration patterns
For users who prefer a graphical interface, multicoder includes a Tauri-based desktop application that provides a user-friendly GUI for profile management.
cd frontend
npm install
npm run tauri devnpm run dev- Launch Vite frontend only for UI debuggingnpm run tauri dev- Launch full Tauri application with Rust backend integration
The frontend provides:
- Visual Profile Management: Create, switch, and delete profiles through an intuitive interface
- Provider Configuration: Easy setup for Claude, Gemini, Codex, and other AI providers
- Real-time Status: View authentication status and active profile at a glance
- Cross-platform: Available for Windows, macOS, and Linux
src/components/profile/ProfileManager.tsx- Complete profile management UI componentsrc/services/profileService.ts- Service layer wrapping Tauri bridge commandssrc/stores/profileStore.ts- Zustand state management for persistent profile datasrc-tauri/- Rust backend configuration and command handlers
The frontend integrates seamlessly with the core authentication module, providing the same functionality through a modern React-based interface.
If you encounter OAuth-related problems with Codex, refer to docs/CODEX_OAUTH_FIX.md for detailed troubleshooting steps.
Make sure to reload your shell after setting environment variables:
# For bash/zsh
source ~/.bashrc # or ~/.zshrc
# Or open a new terminal windowOn Unix systems, ensure the configuration directory has proper permissions:
chmod 700 ~/.multicoderclass ProfileManager {
initialize(): Promise<void>
createProfile(name: string, providers: string[]): Promise<void>
createProfileWithApiKey(name: string, provider: string, apiKey: string): Promise<void>
switchProfile(name: string): Promise<SwitchResult>
deleteProfile(name: string): Promise<void>
listProfiles(): Promise<Profile[]>
getCurrentProfile(): Promise<Profile | null>
}class CredentialManager {
storeCredential(provider: string, credential: any): Promise<void>
getCredential(provider: string): Promise<any>
deleteCredential(provider: string): Promise<void>
listCredentials(): Promise<string[]>
}class AuthRegistry {
register(provider: string, authenticator: BaseAuthenticator): void
get(provider: string): BaseAuthenticator | undefined
list(): string[]
}Contributions are welcome! Please feel free to submit issues or pull requests.
ISC License - see LICENSE file for details.
- Issues: GitHub Issues
- Documentation: npm Package
Built with ❤️ for the AI development community by ljyou001
