feat: add CLI commands to manage AI Gateway keys (#25689)

Adds `coder ai-gateway keys` commands:
* `create <name>` creates key with given name
* `list` lists existing keys (alias `ls`)
* `delete <name | id>` removes key matching by name or key id, name has
priority (alias `rm`)
This commit is contained in:
Paweł Banaszewski
2026-06-18 09:08:17 +00:00
committed by GitHub
parent 803daaa8b7
commit 0dbe0442f0
16 changed files with 591 additions and 5 deletions
+1
View File
@@ -16,6 +16,7 @@ USAGE:
SUBCOMMANDS:
agent-firewall Network isolation tool for monitoring and restricting
HTTP/HTTPS requests
ai-gateway Manage AI Gateway
external-workspaces Create or manage external workspaces
features List Enterprise features
groups Manage groups
+12
View File
@@ -0,0 +1,12 @@
coder v0.0.0-devel
USAGE:
coder ai-gateway
Manage AI Gateway
SUBCOMMANDS:
keys Manage AI Gateway keys
———
Run `coder --help` for a list of global options.
@@ -0,0 +1,14 @@
coder v0.0.0-devel
USAGE:
coder ai-gateway keys
Manage AI Gateway keys
SUBCOMMANDS:
create Create an AI Gateway key
delete Delete an AI Gateway key
list List AI Gateway keys
———
Run `coder --help` for a list of global options.
@@ -0,0 +1,9 @@
coder v0.0.0-devel
USAGE:
coder ai-gateway keys create <name>
Create an AI Gateway key
———
Run `coder --help` for a list of global options.
@@ -0,0 +1,15 @@
coder v0.0.0-devel
USAGE:
coder ai-gateway keys delete [flags] <name|id>
Delete an AI Gateway key
Aliases: rm
OPTIONS:
-y, --yes bool
Bypass confirmation prompts.
———
Run `coder --help` for a list of global options.
@@ -0,0 +1,18 @@
coder v0.0.0-devel
USAGE:
coder ai-gateway keys list [flags]
List AI Gateway keys
Aliases: ls
OPTIONS:
-c, --column [id|name|key prefix|created at|last used at] (default: id,name,key prefix,last used at,created at)
Columns to display in table output.
-o, --output table|json (default: table)
Output format.
———
Run `coder --help` for a list of global options.