Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ Run the `claude` command to start the agent, then follow these steps:

**macOS / Linux:**
```bash
curl -sSL https://raw.githubusercontent.com/gemini-cli-extensions/data-agent-kit-starter-pack/0.1.1/codex-install.sh | bash
curl -sSL https://raw.githubusercontent.com/gemini-cli-extensions/data-agent-kit-starter-pack/0.1.1/codex-install.sh | bash -s -- 0.1.1
```

**Windows:**
```powershell
irm https://raw.githubusercontent.com/gemini-cli-extensions/data-agent-kit-starter-pack/0.1.1/codex-install.ps1 | iex
$env:CODEX_TAG="0.1.1"; irm https://raw.githubusercontent.com/gemini-cli-extensions/data-agent-kit-starter-pack/0.1.1/codex-install.ps1 | iex
```

2. **Install the plugin in Codex:**
Expand Down
35 changes: 20 additions & 15 deletions codex-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

param(
[Parameter(Mandatory = $false)]
[string]$Tag
)

if (-not $Tag -and $env:CODEX_TAG) {
$Tag = $env:CODEX_TAG
}

$ErrorActionPreference = "Stop"

$pluginName = "data-agent-kit-starter-pack"
Expand Down Expand Up @@ -56,25 +65,21 @@ Write-Host "--- $pluginName Installer for Codex ---"
New-Item -ItemType Directory -Force -Path $pluginsRoot | Out-Null

if (Test-Path $installDir) {
try {
& git -C $installDir rev-parse --is-inside-work-tree 2>$null | Out-Null
} catch {
}
Write-Host "Removing existing plugin at $installDir for clean install..."
Remove-Item -LiteralPath $installDir -Recurse -Force
}

if ($LASTEXITCODE -eq 0) {
Write-Host "Updating existing plugin at $installDir..."
Invoke-GitCommand -Arguments @("-C", $installDir, "pull")
} else {
Write-Host "Existing directory at $installDir is not a valid git checkout. Reinstalling..."
Remove-Item -LiteralPath $installDir -Recurse -Force
Write-Host "Cloning plugin to $installDir..."
Invoke-GitCommand -Arguments @("clone", $repoUrl, $installDir)
}
if ($Tag) {
Write-Host "Cloning plugin version $Tag to $installDir..."
Invoke-GitCommand -Arguments @("clone", "--depth", "1", "--branch", $Tag, $repoUrl, $installDir)
} else {
Write-Host "Cloning plugin to $installDir..."
Invoke-GitCommand -Arguments @("clone", $repoUrl, $installDir)
Write-Host "Cloning plugin default branch to $installDir..."
Invoke-GitCommand -Arguments @("clone", "--depth", "1", $repoUrl, $installDir)
}

Write-Host "Removing git metadata..."
Remove-Item -LiteralPath (Join-Path $installDir ".git") -Recurse -Force

if (-not (Test-Path $marketplaceFile)) {
Write-Host "Creating new personal marketplace..."
Write-TextFileNoBom -Path $marketplaceFile -Content '{"name":"personal","plugins":[]}'
Expand Down
18 changes: 14 additions & 4 deletions codex-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

set -e

TAG=$1

PLUGIN_NAME="data-agent-kit-starter-pack"
REPO_URL="https://github.com/gemini-cli-extensions/data-agent-kit-starter-pack"
INSTALL_DIR="$HOME/.agents/plugins/$PLUGIN_NAME"
Expand All @@ -25,13 +27,21 @@ echo "--- $PLUGIN_NAME Installer for Codex ---"
# 1. Download/Update Plugin Content
mkdir -p "$HOME/.agents/plugins"
if [ -d "$INSTALL_DIR" ]; then
echo "Updating existing plugin at $INSTALL_DIR..."
cd "$INSTALL_DIR" && git pull
echo "Removing existing plugin at $INSTALL_DIR for clean install..."
rm -rf "$INSTALL_DIR"
fi

if [ -n "$TAG" ]; then
echo "Cloning plugin version $TAG to $INSTALL_DIR..."
git clone --depth 1 --branch "$TAG" "$REPO_URL" "$INSTALL_DIR"
else
echo "Cloning plugin to $INSTALL_DIR..."
git clone "$REPO_URL" "$INSTALL_DIR"
echo "Cloning plugin default branch to $INSTALL_DIR..."
git clone --depth 1 "$REPO_URL" "$INSTALL_DIR"
fi

echo "Removing git metadata..."
rm -rf "$INSTALL_DIR/.git"

# 2. Register with Codex Marketplace
if [ ! -f "$MARKETPLACE_FILE" ]; then
echo "Creating new personal marketplace..."
Expand Down
Loading