diff --git a/docs/manifest.json b/docs/manifest.json
index 78a0d38ec94..57711406c87 100644
--- a/docs/manifest.json
+++ b/docs/manifest.json
@@ -1180,6 +1180,21 @@
"path": "./reference/cli/index.md",
"icon_path": "./images/icons/terminal.svg",
"children": [
+ {
+ "title": "aibridge",
+ "description": "Manage AIBridge.",
+ "path": "reference/cli/aibridge.md"
+ },
+ {
+ "title": "aibridge interceptions",
+ "description": "Manage AIBridge interceptions.",
+ "path": "reference/cli/aibridge_interceptions.md"
+ },
+ {
+ "title": "aibridge interceptions list",
+ "description": "List AIBridge interceptions as JSON.",
+ "path": "reference/cli/aibridge_interceptions_list.md"
+ },
{
"title": "autoupdate",
"description": "Toggle auto-update policy for a workspace",
diff --git a/docs/reference/cli/aibridge.md b/docs/reference/cli/aibridge.md
new file mode 100644
index 00000000000..7b16c5cdc87
--- /dev/null
+++ b/docs/reference/cli/aibridge.md
@@ -0,0 +1,16 @@
+
+# aibridge
+
+Manage AIBridge.
+
+## Usage
+
+```console
+coder aibridge
+```
+
+## Subcommands
+
+| Name | Purpose |
+|-----------------------------------------------------------|--------------------------------|
+| [interceptions](./aibridge_interceptions.md) | Manage AIBridge interceptions. |
diff --git a/docs/reference/cli/aibridge_interceptions.md b/docs/reference/cli/aibridge_interceptions.md
new file mode 100644
index 00000000000..9cfb3d45a74
--- /dev/null
+++ b/docs/reference/cli/aibridge_interceptions.md
@@ -0,0 +1,16 @@
+
+# aibridge interceptions
+
+Manage AIBridge interceptions.
+
+## Usage
+
+```console
+coder aibridge interceptions
+```
+
+## Subcommands
+
+| Name | Purpose |
+|-------------------------------------------------------|--------------------------------------|
+| [list](./aibridge_interceptions_list.md) | List AIBridge interceptions as JSON. |
diff --git a/docs/reference/cli/aibridge_interceptions_list.md b/docs/reference/cli/aibridge_interceptions_list.md
new file mode 100644
index 00000000000..7e86cd4968e
--- /dev/null
+++ b/docs/reference/cli/aibridge_interceptions_list.md
@@ -0,0 +1,69 @@
+
+# aibridge interceptions list
+
+List AIBridge interceptions as JSON.
+
+## Usage
+
+```console
+coder aibridge interceptions list [flags]
+```
+
+## Options
+
+### --initiator
+
+| | |
+|------|---------------------|
+| Type | string |
+
+Only return interceptions initiated by this user. Accepts a user ID, username, or "me".
+
+### --started-before
+
+| | |
+|------|---------------------|
+| Type | string |
+
+Only return interceptions started before this time. Must be after 'started-after' if set. Accepts a time in the RFC 3339 format, e.g. "2006-01-02T15:04:05Z07:00".
+
+### --started-after
+
+| | |
+|------|---------------------|
+| Type | string |
+
+Only return interceptions started after this time. Must be before 'started-before' if set. Accepts a time in the RFC 3339 format, e.g. "2006-01-02T15:04:05Z07:00".
+
+### --provider
+
+| | |
+|------|---------------------|
+| Type | string |
+
+Only return interceptions from this provider.
+
+### --model
+
+| | |
+|------|---------------------|
+| Type | string |
+
+Only return interceptions from this model.
+
+### --after-id
+
+| | |
+|------|---------------------|
+| Type | string |
+
+The ID of the last result on the previous page to use as a pagination cursor.
+
+### --limit
+
+| | |
+|---------|------------------|
+| Type | int |
+| Default | 100 |
+
+The limit of results to return. Must be between 1 and 1000.
diff --git a/docs/reference/cli/index.md b/docs/reference/cli/index.md
index c298f8bcb61..c1410b45999 100644
--- a/docs/reference/cli/index.md
+++ b/docs/reference/cli/index.md
@@ -68,6 +68,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
| [groups](./groups.md) | Manage groups |
| [prebuilds](./prebuilds.md) | Manage Coder prebuilds |
| [external-workspaces](./external-workspaces.md) | Create or manage external workspaces |
+| [aibridge](./aibridge.md) | Manage AIBridge. |
## Options
diff --git a/enterprise/cli/exp_aibridge.go b/enterprise/cli/aibridge.go
similarity index 97%
rename from enterprise/cli/exp_aibridge.go
rename to enterprise/cli/aibridge.go
index 722f7bf2392..90953b6aa2b 100644
--- a/enterprise/cli/exp_aibridge.go
+++ b/enterprise/cli/aibridge.go
@@ -134,8 +134,7 @@ func (r *RootCmd) aibridgeInterceptionsList() *serpent.Command {
return xerrors.Errorf("limit value must be between 1 and %d", maxInterceptionsLimit)
}
- expCli := codersdk.NewExperimentalClient(client)
- resp, err := expCli.AIBridgeListInterceptions(inv.Context(), codersdk.AIBridgeListInterceptionsFilter{
+ resp, err := client.AIBridgeListInterceptions(inv.Context(), codersdk.AIBridgeListInterceptionsFilter{
Pagination: codersdk.Pagination{
AfterID: afterID,
// #nosec G115 - Checked above.
diff --git a/enterprise/cli/exp_aibridge_test.go b/enterprise/cli/aibridge_test.go
similarity index 99%
rename from enterprise/cli/exp_aibridge_test.go
rename to enterprise/cli/aibridge_test.go
index db1cf436296..a5b48a14e1c 100644
--- a/enterprise/cli/exp_aibridge_test.go
+++ b/enterprise/cli/aibridge_test.go
@@ -54,7 +54,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
}, nil)
args := []string{
- "exp",
"aibridge",
"interceptions",
"list",
@@ -135,7 +134,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
}, nil)
args := []string{
- "exp",
"aibridge",
"interceptions",
"list",
@@ -189,7 +187,6 @@ func TestAIBridgeListInterceptions(t *testing.T) {
}, nil)
args := []string{
- "exp",
"aibridge",
"interceptions",
"list",
diff --git a/enterprise/cli/root.go b/enterprise/cli/root.go
index 3cec1197036..78858ef48da 100644
--- a/enterprise/cli/root.go
+++ b/enterprise/cli/root.go
@@ -25,13 +25,12 @@ func (r *RootCmd) enterpriseOnly() []*serpent.Command {
r.prebuilds(),
r.provisionerd(),
r.externalWorkspaces(),
+ r.aibridge(),
}
}
-func (r *RootCmd) enterpriseExperimental() []*serpent.Command {
- return []*serpent.Command{
- r.aibridge(),
- }
+func (*RootCmd) enterpriseExperimental() []*serpent.Command {
+ return []*serpent.Command{}
}
func (r *RootCmd) EnterpriseSubcommands() []*serpent.Command {
diff --git a/enterprise/cli/testdata/coder_--help.golden b/enterprise/cli/testdata/coder_--help.golden
index ddb44f78ae5..8424ccac923 100644
--- a/enterprise/cli/testdata/coder_--help.golden
+++ b/enterprise/cli/testdata/coder_--help.golden
@@ -14,6 +14,7 @@ USAGE:
$ coder templates init
SUBCOMMANDS:
+ aibridge Manage AIBridge.
external-workspaces Create or manage external workspaces
features List Enterprise features
groups Manage groups
diff --git a/enterprise/cli/testdata/coder_aibridge_--help.golden b/enterprise/cli/testdata/coder_aibridge_--help.golden
new file mode 100644
index 00000000000..d005ae429ad
--- /dev/null
+++ b/enterprise/cli/testdata/coder_aibridge_--help.golden
@@ -0,0 +1,12 @@
+coder v0.0.0-devel
+
+USAGE:
+ coder aibridge
+
+ Manage AIBridge.
+
+SUBCOMMANDS:
+ interceptions Manage AIBridge interceptions.
+
+———
+Run `coder --help` for a list of global options.
diff --git a/enterprise/cli/testdata/coder_aibridge_interceptions_--help.golden b/enterprise/cli/testdata/coder_aibridge_interceptions_--help.golden
new file mode 100644
index 00000000000..1f3b3af5ad3
--- /dev/null
+++ b/enterprise/cli/testdata/coder_aibridge_interceptions_--help.golden
@@ -0,0 +1,12 @@
+coder v0.0.0-devel
+
+USAGE:
+ coder aibridge interceptions
+
+ Manage AIBridge interceptions.
+
+SUBCOMMANDS:
+ list List AIBridge interceptions as JSON.
+
+———
+Run `coder --help` for a list of global options.
diff --git a/enterprise/cli/testdata/coder_aibridge_interceptions_list_--help.golden b/enterprise/cli/testdata/coder_aibridge_interceptions_list_--help.golden
new file mode 100644
index 00000000000..c98fd0019a4
--- /dev/null
+++ b/enterprise/cli/testdata/coder_aibridge_interceptions_list_--help.golden
@@ -0,0 +1,37 @@
+coder v0.0.0-devel
+
+USAGE:
+ coder aibridge interceptions list [flags]
+
+ List AIBridge interceptions as JSON.
+
+OPTIONS:
+ --after-id string
+ The ID of the last result on the previous page to use as a pagination
+ cursor.
+
+ --initiator string
+ Only return interceptions initiated by this user. Accepts a user ID,
+ username, or "me".
+
+ --limit int (default: 100)
+ The limit of results to return. Must be between 1 and 1000.
+
+ --model string
+ Only return interceptions from this model.
+
+ --provider string
+ Only return interceptions from this provider.
+
+ --started-after string
+ Only return interceptions started after this time. Must be before
+ 'started-before' if set. Accepts a time in the RFC 3339 format, e.g.
+ "====[timestamp]=====07:00".
+
+ --started-before string
+ Only return interceptions started before this time. Must be after
+ 'started-after' if set. Accepts a time in the RFC 3339 format, e.g.
+ "====[timestamp]=====07:00".
+
+———
+Run `coder --help` for a list of global options.