opencode-aicodewith-auth 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,114 @@
1
+ # opencode-aicodewith-auth
2
+
3
+ An OpenCode plugin for AICodewith authentication. Access multiple AI models including GPT-5.2, Claude, and Gemini through AICodewith API.
4
+
5
+ ## Features
6
+
7
+ - Unified authentication for multiple AI providers
8
+ - Support for the following models:
9
+ - `gpt-5.2-codex` - OpenAI GPT-5.2 Codex
10
+ - `gpt-5.2` - OpenAI GPT-5.2
11
+ - `claude-sonnet-4-5-20250929` - Anthropic Claude Sonnet 4.5
12
+ - `claude-opus-4-5-20251101` - Anthropic Claude Opus 4.5
13
+ - `gemini-3-pro-high` - Google Gemini 3 Pro High
14
+ - Automatic configuration injection
15
+
16
+ ## Installation
17
+
18
+ ### From npm
19
+
20
+ Add the plugin to your OpenCode configuration file:
21
+
22
+ ```json title="opencode.json"
23
+ {
24
+ "$schema": "https://opencode.ai/config.json",
25
+ "plugin": ["opencode-aicodewith-auth"]
26
+ }
27
+ ```
28
+
29
+ Then restart OpenCode. The plugin will be automatically installed.
30
+
31
+ ### From source
32
+
33
+ 1. Clone the repository:
34
+ ```bash
35
+ git clone https://github.com/DaneelOlivaw1/opencode-aicodewith-auth.git
36
+ cd opencode-aicodewith-auth
37
+ ```
38
+
39
+ 2. Install dependencies:
40
+ ```bash
41
+ bun install
42
+ ```
43
+
44
+ 3. Build the plugin:
45
+ ```bash
46
+ bun run build
47
+ ```
48
+
49
+ ## Configuration
50
+
51
+ After installation, the plugin will automatically configure the `aicodewith` provider in your OpenCode config. You can also manually configure it:
52
+
53
+ ```json title="~/.config/opencode/opencode.json"
54
+ {
55
+ "provider": {
56
+ "aicodewith": {
57
+ "name": "AICodewith",
58
+ "api": "https://api.openai.com/v1",
59
+ "env": ["AICODEWITH_API_KEY"],
60
+ "models": {
61
+ "gpt-5.2-codex": {},
62
+ "gpt-5.2": {},
63
+ "claude-sonnet-4-5-20250929": {},
64
+ "claude-opus-4-5-20251101": {},
65
+ "gemini-3-pro-high": {}
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ## Authentication
73
+
74
+ Set your AICodewith API key as an environment variable:
75
+
76
+ ```bash
77
+ export AICODEWITH_API_KEY=sk-your-api-key
78
+ ```
79
+
80
+ Or authenticate via the OpenCode TUI by selecting the "AICodewith API Key" authentication method.
81
+
82
+ ## Usage
83
+
84
+ Once configured, you can select any of the supported models in OpenCode:
85
+
86
+ ```bash
87
+ opencode --model gpt-5.2-codex
88
+ ```
89
+
90
+ Or switch models within the TUI.
91
+
92
+ ## Development
93
+
94
+ ### Build
95
+
96
+ ```bash
97
+ bun run build
98
+ ```
99
+
100
+ ### Type check
101
+
102
+ ```bash
103
+ bun run typecheck
104
+ ```
105
+
106
+ ### Clean
107
+
108
+ ```bash
109
+ bun run clean
110
+ ```
111
+
112
+ ## License
113
+
114
+ MIT
@@ -0,0 +1,5 @@
1
+ import type { Plugin, PluginInput, Hooks } from "@opencode-ai/plugin";
2
+ import { type AicodewithProviderSettings } from "./provider";
3
+ export declare function createAicodewith(input: AicodewithProviderSettings | PluginInput): import("./provider").AicodewithProvider | Hooks;
4
+ export declare const AicodewithCodexAuthPlugin: Plugin;
5
+ export default AicodewithCodexAuthPlugin;