Skip to content

Commit 5be9962

Browse files
Merge pull request #517 from shyim/add-openai-codex
feat: add openai codex
2 parents ff56fe4 + 539670d commit 5be9962

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

plugins/openai/codex.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package openai
2+
3+
import (
4+
"github.com/1Password/shell-plugins/sdk"
5+
"github.com/1Password/shell-plugins/sdk/needsauth"
6+
"github.com/1Password/shell-plugins/sdk/schema"
7+
"github.com/1Password/shell-plugins/sdk/schema/credname"
8+
)
9+
10+
func OpenAICodex() schema.Executable {
11+
return schema.Executable{
12+
Name: "OpenAI Codex",
13+
Runs: []string{"codex"},
14+
DocsURL: sdk.URL("https://help.openai.com/en/articles/11096431-openai-codex-cli-getting-started"),
15+
NeedsAuth: needsauth.NotForHelpOrVersion(),
16+
Uses: []schema.CredentialUsage{
17+
{
18+
Name: credname.APIKey,
19+
},
20+
},
21+
}
22+
}

plugins/openai/plugin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ func New() schema.Plugin {
1919
OpenAICLI(),
2020
OpenAIEvalsCLI(),
2121
OpenAIEvalSetCLI(),
22+
OpenAICodex(),
2223
},
2324
}
2425
}

0 commit comments

Comments
 (0)