refactor: remove built-in Google auth in favor of external plugin
- Delete src/auth/antigravity/ directory (28 files) - Delete src/google-auth.ts standalone wrapper - Delete src/cli/commands/auth.ts CLI command - Remove google_auth config option from schema - Update CLI to remove auth command registration - Update config-manager to remove google_auth handling - Update documentation to reference external opencode-antigravity-auth plugin only - Regenerate JSON schema Users should install the opencode-antigravity-auth plugin for Gemini authentication. BREAKING CHANGE: The google_auth config option is removed. Use the external plugin instead.
This commit is contained in:
@@ -267,10 +267,6 @@ export function generateOmoConfig(installConfig: InstallConfig): Record<string,
|
||||
$schema: "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
|
||||
}
|
||||
|
||||
if (installConfig.hasGemini) {
|
||||
config.google_auth = false
|
||||
}
|
||||
|
||||
const agents: Record<string, Record<string, unknown>> = {}
|
||||
|
||||
if (!installConfig.hasClaude) {
|
||||
@@ -642,7 +638,6 @@ export function addProviderConfig(config: InstallConfig): ConfigMergeResult {
|
||||
}
|
||||
|
||||
interface OmoConfigData {
|
||||
google_auth?: boolean
|
||||
agents?: Record<string, { model?: string }>
|
||||
}
|
||||
|
||||
@@ -713,9 +708,6 @@ export function detectCurrentConfig(): DetectedConfig {
|
||||
result.hasChatGPT = false
|
||||
}
|
||||
|
||||
if (omoConfig.google_auth === false) {
|
||||
result.hasGemini = plugins.some((p) => p.startsWith("opencode-antigravity-auth"))
|
||||
}
|
||||
} catch {
|
||||
/* intentionally empty - malformed omo config returns defaults from opencode config detection */
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import { install } from "./install"
|
||||
import { run } from "./run"
|
||||
import { getLocalVersion } from "./get-local-version"
|
||||
import { doctor } from "./doctor"
|
||||
import { listAccounts, removeAccount } from "./commands/auth"
|
||||
import type { InstallArgs } from "./types"
|
||||
import type { RunOptions } from "./run"
|
||||
import type { GetLocalVersionOptions } from "./get-local-version/types"
|
||||
@@ -135,45 +134,6 @@ Categories:
|
||||
process.exit(exitCode)
|
||||
})
|
||||
|
||||
const authCommand = program
|
||||
.command("auth")
|
||||
.description("Manage Google Antigravity accounts")
|
||||
|
||||
authCommand
|
||||
.command("list")
|
||||
.description("List all Google Antigravity accounts")
|
||||
.addHelpText("after", `
|
||||
Examples:
|
||||
$ bunx oh-my-opencode auth list
|
||||
|
||||
Shows:
|
||||
- Account index and email
|
||||
- Account tier (free/paid)
|
||||
- Active account (marked with *)
|
||||
- Rate limit status per model family
|
||||
`)
|
||||
.action(async () => {
|
||||
const exitCode = await listAccounts()
|
||||
process.exit(exitCode)
|
||||
})
|
||||
|
||||
authCommand
|
||||
.command("remove <index-or-email>")
|
||||
.description("Remove an account by index or email")
|
||||
.addHelpText("after", `
|
||||
Examples:
|
||||
$ bunx oh-my-opencode auth remove 0
|
||||
$ bunx oh-my-opencode auth remove user@example.com
|
||||
|
||||
Note:
|
||||
- Use 'auth list' to see account indices
|
||||
- Removing the active account will switch to the next available account
|
||||
`)
|
||||
.action(async (indexOrEmail: string) => {
|
||||
const exitCode = await removeAccount(indexOrEmail)
|
||||
process.exit(exitCode)
|
||||
})
|
||||
|
||||
program
|
||||
.command("version")
|
||||
.description("Show version information")
|
||||
|
||||
Reference in New Issue
Block a user