﻿---
title: "安装 AlloyDB Omni 插件"
filename: "terminal"
canonical: /templates/alloydb-omni-codex-plugin/
---

# 安装 AlloyDB Omni 插件

安装 alloydb-omni@data-agent-kit，使用 ALLOYDB_OMNI_* 参数连接实例。数据库名和用户名必填，密码要求取决于实例配置。

```
export ALLOYDB_OMNI_DATABASE=YOUR_ALLOYDB_OMNI_DATABASE
export ALLOYDB_OMNI_USER=YOUR_ALLOYDB_OMNI_USER
export ALLOYDB_OMNI_PASSWORD=YOUR_ALLOYDB_OMNI_PASSWORD

codex plugin marketplace add GoogleCloudPlatform/data-agent-kit
codex plugin add alloydb-omni@data-agent-kit
codex mcp list

# 可选：
# export ALLOYDB_OMNI_HOST=127.0.0.1
# export ALLOYDB_OMNI_PORT=5432
# codex plugin marketplace upgrade data-agent-kit

# 不要：
# plugin install alloydb-omni@data-agent-kit
# plugin add alloydb@data-agent-kit
# /plugin install alloydb-omni@claude-plugins-official
# gemini extensions install https://github.com/gemini-cli-extensions/postgres
# export ALLOYDB_OMNI_PROJECT
# export POSTGRES_HOST
# export ALLOYDB_POSTGRES_PROJECT
# --prebuilt postgres
# mcpServers.alloydbomni
# codex mcp login alloydb-omni
# command = "PATH_TO_TOOLBOX"

```
