Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## [2.8.1] - 2026-11-09

### Added

- **`install.sh`**: downloads a release tarball, unpacks it under `~/.local/share/opencode-antigravity-auth/` and wires the config entry. `curl` and `tar` are the only requirements — no npm, no git, no build step. Takes an optional version (`install.sh v2.8.1`), respects `OPENCODE_ANTIGRAVITY_HOME` and `XDG_CONFIG_HOME`, keeps the other keys of `opencode.json` intact, and writes to whichever key the config already uses (`plugin` on v1, `plugins` on v2).

### Fixed

- **The documented install path did not work.** `"plugins": ["github:JoshRob297/opencode-antigravity-auth"]` fails with `git dep preparation failed` in OpenCode's embedded npm, on 1.19.5 and 2.2.6, from a clean machine, and **against the upstream repository too**. `README`, `README.es.md` and `docs/TROUBLESHOOTING.md` now lead with the tarball and the installer, and say plainly that the `github:` spec is broken instead of claiming it clones and builds. Real npm still installs the same spec, which is why Option C stays available.
- **2.8.0's changelog was wrong about this**: it stated the `github:` spec "still clones and builds the plugin on install". It does not, on the OpenCode builds tested.

## [2.8.0] - 2026-11-08

### Changed
Expand Down
58 changes: 44 additions & 14 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,45 +98,75 @@ No hace falta cambiar nada de configuración al pasar de OpenCode v1 a v2.

## Instalación

### Opción A: Directo desde GitHub (Recomendado)
El plugin **no necesita npm ni git**. El instalador propio de OpenCode no sabe preparar
dependencias de git (`git dep preparation failed`) y no hay paquete de npm publicado con
este nombre, así que la instalación sale del tarball de cada release.

Añade a `plugins` en `~/.config/opencode/opencode.json`:
### Opción A: El instalador (Recomendado)

```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash
```

Para fijar una versión en vez de seguir la última release:

```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash -s -- v2.8.1
```

Descarga la release empaquetada, la descomprime en `~/.local/share/opencode-antigravity-auth/`
y apunta `plugin` / `plugins` a ella — la clave que ya use tu config, así que la entrada
funciona igual en OpenCode v1 y v2. Vuelve a correrlo para actualizar. Solo pide `curl` y `tar`.

### Opción B: El tarball, a mano

Cada release lleva el plugin empaquetado como asset. Descarga
`opencode-antigravity-auth-<versión>.tgz` de [Releases](../../releases) y luego:

```bash
mkdir -p ~/.local/share/opencode-antigravity-auth
tar -xzf opencode-antigravity-auth-2.8.1.tgz -C ~/.local/share/opencode-antigravity-auth
```

Y en `~/.config/opencode/opencode.json`:

```json
{
"plugins": ["github:JoshRob297/opencode-antigravity-auth#v2.6.0"]
"plugin": ["/home/tu-usuario/.local/share/opencode-antigravity-auth/package"]
}
```

> OpenCode v2 clona, compila y actualiza el plugin automáticamente desde el repositorio oficial.
OpenCode **v1 lee `plugin`, v2 lee `plugins`** — el instalador detecta cuál tienes.

### Opción B: Directorio local (Desarrollo / Sin conexión)

Clona y referencia de forma local:
### Opción C: Desde el código (Desarrollo)

```bash
git clone https://github.com/JoshRob297/opencode-antigravity-auth.git /path/to/plugin
cd /path/to/plugin && npm install && npm run build
```

Luego, en `~/.config/opencode/opencode.json`:

```json
{
"plugins": ["/path/to/plugin"]
}
```

### ¿Por qué no el spec `github:`?

`"plugins": ["github:JoshRob297/opencode-antigravity-auth"]` **no instala** hoy: el npm
embebido de OpenCode termina en `git dep preparation failed`. Se reprodujo en OpenCode
1.19.5 y 2.2.6, desde una máquina limpia, y **también contra el repositorio del upstream**
— o sea que es el instalador, no este paquete. El npm real maneja el mismo spec sin
quejarse, por eso se queda documentado para quien tenga uno que funcione.

---

## Inicio rápido (cero configuración en OpenCode v2)

1. **Añade el plugin** a `~/.config/opencode/opencode.json`:
1. **Instala el plugin** — Opción A de arriba:

```json
{
"plugins": ["github:JoshRob297/opencode-antigravity-auth"]
}
```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash
```

2. **Autentícate con Google:**
Expand Down
75 changes: 38 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,67 +95,76 @@ No configuration changes are required when transitioning between OpenCode v1 and

## Installation

### Option A: Direct from GitHub (Recommended)
The plugin needs **neither npm nor git**. OpenCode's own installer cannot prepare git
dependencies (`git dep preparation failed`) and there is no npm package published under
this name, so installs come from the release tarball.

Add to `plugins` in `~/.config/opencode/opencode.json`:
### Option A: The installer (Recommended)

```json
{
"plugins": ["github:JoshRob297/opencode-antigravity-auth"]
}
```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash
```

To pin a version, so what you run does not change under you:

To pin a version instead of following the latest release:


```json
{
"plugins": ["github:JoshRob297/opencode-antigravity-auth#v2.6.0"]
}
```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash -s -- v2.8.1
```

It downloads the packed release, unpacks it under `~/.local/share/opencode-antigravity-auth/`
and points `plugin` / `plugins` at it — whichever key your config already uses, so the entry
works on OpenCode v1 and v2 alike. Re-run it to upgrade. `curl` and `tar` are the only
requirements.

### Option B: The tarball, by hand

Every release also ships the packed plugin as an asset, for offline installs:


Every release carries the packed plugin as an asset. Download
`opencode-antigravity-auth-<version>.tgz` from [Releases](../../releases), then:

```bash
mkdir -p ~/.local/share/opencode-antigravity-auth
tar -xzf opencode-antigravity-auth-2.8.1.tgz -C ~/.local/share/opencode-antigravity-auth
```

npm install https://github.com/JoshRob297/opencode-antigravity-auth/releases/download/v2.6.0/opencode-antigravity-auth-2.6.0.tgz
And in `~/.config/opencode/opencode.json`:

```json
{
"plugin": ["/home/you/.local/share/opencode-antigravity-auth/package"]
}
```

> OpenCode v2 will automatically clone, build, and update the plugin directly from the official repository.

### Option B: Local Directory (Development / Offline)
OpenCode **v1 reads `plugin`, v2 reads `plugins`** — the installer detects which one you have.

Clone and reference locally:
### Option C: From source (Development)

```bash
git clone https://github.com/JoshRob297/opencode-antigravity-auth.git /path/to/plugin
cd /path/to/plugin && npm install && npm run build
```

Then in `~/.config/opencode/opencode.json`:

```json
{
"plugins": ["/path/to/plugin"]
}
```

### Why not the `github:` spec?

`"plugins": ["github:JoshRob297/opencode-antigravity-auth"]` **does not install** today:
OpenCode's embedded npm ends with `git dep preparation failed`. It was reproduced on
OpenCode 1.19.5 and 2.2.6, from a clean machine, and **against the upstream repository as
well** — so it is the installer, not this package. Real npm handles the same spec without
complaint, which is why it stays documented for setups that ship a working one.

---

## Quick Start (Zero-Config in OpenCode v2)

1. **Add the plugin** to `~/.config/opencode/opencode.json`:
1. **Install the plugin** — Option A above:

```json
{
"plugins": ["github:JoshRob297/opencode-antigravity-auth"]
}
```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash
```

2. **Authenticate with Google:**
Expand Down Expand Up @@ -637,15 +646,7 @@ To pin a version, so what you run does not change under you:



Every release also ships the packed plugin as an asset, for offline installs:



```bash

npm install https://github.com/JoshRob297/opencode-antigravity-auth/releases/download/v2.6.0/opencode-antigravity-auth-2.6.0.tgz

```
See [Installation](#installation) for how to get the files.

OpenCode v1 uses the legacy singular key `"plugin"`. The updater detects both automatically and preserves whichever convention your configuration uses.

Expand Down
28 changes: 24 additions & 4 deletions docs/TROUBLESHOOTING.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,20 +510,40 @@ npx tsx script/test-regression.ts --dry-run # Lista las pruebas

## Ayer funcionaba y hoy no

`github:JoshRob297/opencode-antigravity-auth` sigue a `main`, así que OpenCode toma cada commit. Cuando una actualización rompe algo, fija la versión que sabes que funciona y reporta el fallo contra esa:
Fija la versión que sabes que funciona y reporta el fallo contra esa:

```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash -s -- v2.6.0
```

Con `git log` entre esa etiqueta y `main` ves qué cambió. El instalador siempre trae exactamente la release que le pides, así que puedes moverte entre builds sin volver a tocar la config.

---

## "git dep preparation failed"

El plugin no se puede instalar con el spec `github:`:

```json
{ "plugins": ["github:JoshRob297/opencode-antigravity-auth#v2.6.0"] }
{ "plugins": ["github:JoshRob297/opencode-antigravity-auth"] }
```

Con `git log` ves qué cambió entre la etiqueta que fijaste y el head. Cada release también publica el plugin empaquetado como asset, por si prefieres instalar un build exacto:
El npm embebido de OpenCode no logra preparar la dependencia de git, ni en 1.19.5 ni en
2.2.6, y tampoco con el repositorio del upstream — el problema es el instalador, no el paquete.

Usa el tarball de la release:

```bash
npm install https://github.com/JoshRob297/opencode-antigravity-auth/releases/download/v2.6.0/opencode-antigravity-auth-2.6.0.tgz
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash
```

Si prefieres hacerlo a mano, descomprime `opencode-antigravity-auth-<versión>.tgz` donde
quieras y apunta `plugin` / `plugins` al directorio `package/` que trae dentro. Un clon con
`npm install && npm run build` también sirve, porque el npm real sí prepara dependencias de git.

---

## ¿Sigues atascado?

Abre un issue en [GitHub](https://github.com/JoshRob297/opencode-antigravity-auth/issues).

33 changes: 25 additions & 8 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,27 @@ Then restart OpenCode.

---

### "git dep preparation failed"

The plugin cannot be installed with the `github:` spec:

```json
{ "plugins": ["github:JoshRob297/opencode-antigravity-auth"] }
```

OpenCode's embedded npm fails to prepare the git dependency, on both 1.19.5 and 2.2.6,
and with the upstream repository as well — the installer is at fault, not the package.

Use the release tarball instead:

```bash
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash
```

If you would rather do it by hand, unpack `opencode-antigravity-auth-<version>.tgz` anywhere
and point `plugin` / `plugins` at the `package/` directory inside it. A clone plus
`npm install && npm run build` works too, because real npm does prepare git dependencies.

## IAM / Google Cloud Project Permission Error

If you see:
Expand Down Expand Up @@ -507,18 +528,14 @@ npx tsx script/test-regression.ts --dry-run # List tests

## It worked yesterday and broke today

`github:JoshRob297/opencode-antigravity-auth` follows `main`, so OpenCode picks up every commit. When an update breaks something, pin the version you know works and report the regression against it:

```json
{ "plugins": ["github:JoshRob297/opencode-antigravity-auth#v2.6.0"] }
```

`git log` then tells you what changed between the tag you pinned and the head. Every release also publishes the packed plugin as an asset, if you would rather install an exact build:
Pin the version you know works and report the regression against it:

```bash
npm install https://github.com/JoshRob297/opencode-antigravity-auth/releases/download/v2.6.0/opencode-antigravity-auth-2.6.0.tgz
curl -fsSL https://raw.githubusercontent.com/JoshRob297/opencode-antigravity-auth/main/install.sh | bash -s -- v2.6.0
```

`git log` between that tag and `main` then tells you what changed. The installer always fetches exactly the release you name, so you can move between builds without editing the config again.

---

## Still stuck?
Expand Down
Loading
Loading