Skip to content

Commit c1b5645

Browse files
committed
feat: add instructions for codex
1 parent a44f378 commit c1b5645

File tree

4 files changed

+36
-0
lines changed

4 files changed

+36
-0
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
pnpm-lock.yaml
2+
CHANGELOG.md

src/lib/generator/codex.ts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { GeneratorOptions, Instructions } from '../types';
2+
3+
export class CodexInstructions implements Instructions {
4+
constructor(private readonly options: GeneratorOptions) {}
5+
6+
getJSON(): unknown {
7+
return undefined;
8+
}
9+
10+
getLink(): string | undefined {
11+
return undefined;
12+
}
13+
14+
getMarkdown(): string {
15+
return `
16+
#### Manual installation
17+
18+
Requirements:
19+
- Docker
20+
21+
Add the following to your codex config file (\`~/.codex/config.toml\`):
22+
23+
\`\`\`
24+
[mcp_servers.${this.options.name}]
25+
command = "docker"
26+
args = ["run", "--rm", "-t", "ghcr.io/sparfenyuk/mcp-proxy:v0.3.2-alpine", "${this.options.url}", "--transport=streamablehttp"]
27+
\`\`\`
28+
29+
**Note:** Codex does not support MCP servers with OAuth2 authentication.`;
30+
}
31+
}

src/lib/generator/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { VscodeInstructions } from './vscode';
77
import { WindsurfInstructions } from './windsurf';
88
import { ChatGPTInstructions } from './chatgpt';
99
import { GeminiCLIInstructions } from './gemini_cli';
10+
import { CodexInstructions } from './codex';
1011

1112
export const generators: Record<
1213
Target,
@@ -19,4 +20,5 @@ export const generators: Record<
1920
windsurf: (options) => new WindsurfInstructions(options),
2021
chatgpt: (options) => new ChatGPTInstructions(options),
2122
'gemini-cli': (options) => new GeminiCLIInstructions(options),
23+
codex: (options) => new CodexInstructions(options),
2224
};

src/lib/target.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const targets = [
66
'windsurf',
77
'chatgpt',
88
'gemini-cli',
9+
'codex',
910
] as const;
1011

1112
export type Target = (typeof targets)[number];
@@ -18,6 +19,7 @@ const targetNames = [
1819
'Windsurf',
1920
'ChatGPT',
2021
'Gemini CLI',
22+
'Codex',
2123
] as const;
2224

2325
export function getTargetName(target: Target): string {

0 commit comments

Comments
 (0)