Skip to content

ltxzs/opencode-github-copilot-switcher

Repository files navigation

OpenCode GitHub Copilot Switcher

English | 简体中文 | 日本語

A seamless Tauri-based desktop application designed to manage, switch, and authenticate GitHub Copilot accounts for use within OpenCode.

Features

  • Multi-Account Management: Easily add and switch between multiple GitHub accounts.

  • Hot-Switching: Seamlessly switch accounts directly in your current session without needing to restart OpenCode. Note: Seamless hot-switching requires OpenCode to be launched from a PowerShell environment. If OpenCode is running in a CMD environment, switching accounts will terminate the OpenCode process and interrupt the current session. Restarting OpenCode will restore normal operation with the successfully switched account.

  • Native Device Flow Authentication: Utilizes the official OpenCode GitHub Copilot Client ID to ensure full compatibility with the OpenCode extension.

  • Auto-Copy Device Code: Automatically copies your authentication device code to the clipboard and provides an intuitive Toast notification.

  • Cross-Platform: Available for Windows, macOS, and Linux.

Visual Interface & Seamless Operation

Main Interface Authorization Flow

This tool offers a clear visual interface that makes managing multiple GitHub Copilot accounts incredibly intuitive. Instead of dealing with complex CLI commands or repetitive native login flows, you can concretely and visually view your active accounts, add new ones, and hot-switch between them with a single click.

Why this app?

Better UX than native OpenCode: The native process for switching GitHub Copilot accounts in OpenCode is complex and unintuitive. This tool provides a clear, user-friendly interface to manage multiple accounts and supports hot-switching—meaning you can switch accounts on the fly without having to restart the OpenCode application.

Designed for Frequent Account Switching: This tool was originally designed to solve a specific problem: users logging into GitHub Copilot in OpenCode with first-month free or educational discount accounts often hit usage limits, requiring them to frequently switch accounts to continue using the service heavily. Because OpenCode's native switching method is repetitive and tedious, this tool provides a streamlined, seamless hot-switching experience to bypass this hassle.

Installation

Download the latest release for your platform from the Releases page.

  • Windows: .exe or .msi
  • macOS: .app or .dmg
  • Linux: .AppImage or .deb

Development

This project is built using:

  • Tauri (Rust)
  • React (Vite)
  • Tailwind CSS

Prerequisites

Setup

  1. Clone the repository:

    git clone https://github.com/ltxzs/opencode-github-copilot-switcher.git
    cd opencode-github-copilot-switcher/opencode-github-switcher
  2. Install dependencies:

    npm install
  3. Run in development mode:

    npm run tauri dev
  4. Build for production:

    npm run tauri build

License

MIT License. See LICENSE for more details.