Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d69c180
feat(auth): sign in via device authorization and serve git credentials
rhuanbarreto Sep 5, 2026
3a03947
docs: regenerate llms-full.txt
rhuanbarreto Sep 5, 2026
1871833
fix(auth): address review findings on the device-flow login
rhuanbarreto Sep 6, 2026
7e8a15e
fix(auth): address the second review round
rhuanbarreto Sep 6, 2026
a93b97e
docs: correct the credential-helper fallback and keep tokens out of argv
rhuanbarreto Sep 6, 2026
7197d19
fix(auth): survive a concurrent refresh, and stop overstating token s…
rhuanbarreto Sep 6, 2026
55f4291
fix: drain both git streams in the test helper, fail the download on 401
rhuanbarreto Sep 6, 2026
41b642e
docs: name the destination the Archgate platform throughout
rhuanbarreto Sep 6, 2026
b721ad4
feat(auth): open the browser and copy the device code on login
rhuanbarreto Sep 6, 2026
ea6e29d
fix(auth): keep the session when git erases a rejected credential
rhuanbarreto Sep 6, 2026
240b011
docs: regenerate llms-full.txt
rhuanbarreto Sep 6, 2026
fc1a600
refactor(auth): split the platform sign-in contract from its OAuth de…
rhuanbarreto Sep 6, 2026
05cc17c
fix(auth): refuse redirects on token requests and report failed inval…
rhuanbarreto Sep 6, 2026
33203d4
docs: regenerate llms-full.txt
rhuanbarreto Sep 6, 2026
aedcb6c
refactor(auth): make plugin-install.ts the owner of the plugins host
rhuanbarreto Sep 6, 2026
8953e6f
fix(auth): refuse control characters in credential records and degrad…
rhuanbarreto Sep 6, 2026
9b8c093
fix(login): unregister the git helper before clearing credentials
rhuanbarreto Sep 6, 2026
b531edb
fix(auth): request the plugins resource on the device-code grant
rhuanbarreto Sep 6, 2026
552acdb
fix(login): register the git credential helper by absolute path
rhuanbarreto Sep 6, 2026
24dc23a
fix(auth): keep a failing sign-in service from reading as a sign-out
rhuanbarreto Sep 7, 2026
597f140
fix(auth): verify what was stored, report partial logout, open URLs w…
rhuanbarreto Sep 7, 2026
38d0f30
fix(auth): keep sign-in and logout honest about transport and helper …
rhuanbarreto Sep 7, 2026
4da88d7
fix(auth): file the platform session under one fixed credential account
rhuanbarreto Sep 7, 2026
afd9664
fix(auth): skip empty ID-token claims when naming the session
rhuanbarreto Sep 7, 2026
d8e8096
fix(auth): keep the credential helper off the network and tolerate a …
rhuanbarreto Sep 7, 2026
1ee97f7
fix(auth): stop refresh when the credential helper cannot be unregist…
rhuanbarreto Sep 7, 2026
39b00e4
docs: regenerate llms-full.txt
rhuanbarreto Sep 7, 2026
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: 4 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ export default defineConfig({
items: [
{ label: "Overview", slug: "reference/cli" },
{ label: "archgate login", slug: "reference/cli/login" },
{
label: "archgate credential",
slug: "reference/cli/credential",
},
{ label: "archgate init", slug: "reference/cli/init" },
{ label: "archgate plugin", slug: "reference/cli/plugin" },
{ label: "archgate check", slug: "reference/cli/check" },
Expand Down
202 changes: 139 additions & 63 deletions docs/public/llms-full.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/src/content/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,5 @@ If you prefer `npm install -g archgate` instead of the proto plugin, you need to
Once installed, run `archgate init` in your project to set up linting and guardrails. See the [Quick Start](/getting-started/quick-start/) guide for a walkthrough.

:::tip[Editor plugins (beta)]
Want your AI agent to read ADRs before coding and validate after? The editor plugins for [Claude Code](/guides/claude-code-plugin/) and [Cursor](/guides/cursor-integration/) add a full guardrails workflow on top of the CLI. Run `archgate login` to sign up and get started.
Want your AI agent to read ADRs before coding and validate after? The editor plugins for [Claude Code](/guides/claude-code-plugin/) and [Cursor](/guides/cursor-integration/) add a full guardrails workflow on top of the CLI. Run `archgate login` to sign in and get started.
:::
2 changes: 1 addition & 1 deletion docs/src/content/docs/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ Now that you have a working setup, dive deeper:
- [Cursor Integration](/guides/cursor-integration/): Use Archgate with Cursor IDE for AI-assisted development.

:::tip[Editor plugins (beta)]
Want AI agents that automatically read your ADRs before coding? Run `archgate login` to sign up and authenticate, then run `archgate init --install-plugin` to set up the plugin.
Want AI agents that automatically read your ADRs before coding? Run `archgate login` to sign in, then run `archgate init --install-plugin` to set up the plugin.
:::
10 changes: 5 additions & 5 deletions docs/src/content/docs/guides/claude-code-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ The `archgate:developer` agent is set as the default agent via `.claude/settings
## Installation

:::note[Beta access required]
The Claude Code plugin is currently in beta. Run `archgate login` to sign up and authenticate.
The Claude Code plugin is currently in beta. Run `archgate login` to sign in.
:::

### 1. Log in with GitHub
### 1. Log in to the Archgate platform

Authenticate with your GitHub account to obtain a plugin token:
Log in to obtain plugin access:

```bash
archgate login
```

This starts a GitHub Device Flow. The CLI displays a one-time code and URL -- open the URL in your browser, enter the code, and authorize. Once complete, credentials are stored securely in your OS credential manager via `git credential approve`.
This starts an OAuth 2.0 Device Authorization Grant against the Archgate platform. The CLI displays a one-time code and URL -- open the URL in your browser, enter the code, and authorize. Once complete, the resulting tokens are handed to your configured git credential helper via `git credential approve`; an OS-backed helper keeps them encrypted, while git's built-in `store` helper writes them in plain text.

### 2. Initialize your project with the plugin

Expand All @@ -67,7 +67,7 @@ If the `claude` CLI is on your PATH, the plugin is installed automatically via:
1. `claude plugin marketplace add https://plugins.archgate.dev/archgate.git` (registers the Archgate marketplace)
2. `claude plugin install archgate@archgate` (installs the plugin)

The marketplace URL carries no credentials -- git authenticates against `plugins.archgate.dev` using the token `archgate login` stored in your OS credential manager.
The marketplace URL carries no credentials -- git authenticates against `plugins.archgate.dev` using the token `archgate login` handed to your git credential helper.

If the `claude` CLI is not found, the command prints the manual commands for you to run.

Expand Down
8 changes: 4 additions & 4 deletions docs/src/content/docs/guides/copilot-cli-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ Installation is declarative: the CLI writes the marketplace and plugin declarati
## Installation

:::note[Beta access required]
The GitHub Copilot plugin is currently in beta. Run `archgate login` to sign up and authenticate before following the steps below.
The GitHub Copilot plugin is currently in beta. Run `archgate login` to sign in before following the steps below.
:::

### 1. Log in with GitHub
### 1. Log in to the Archgate platform

Authenticate with your GitHub account to obtain a plugin token:
Log in to obtain plugin access:

```bash
archgate login
```

This starts a GitHub Device Flow. The CLI displays a one-time code and URL -- open the URL in your browser, enter the code, and authorize. Once complete, credentials are stored securely in your OS credential manager via `git credential approve`.
This starts an OAuth 2.0 Device Authorization Grant against the Archgate platform. The CLI displays a one-time code and URL -- open the URL in your browser, enter the code, and authorize. Once complete, the resulting tokens are handed to your configured git credential helper via `git credential approve`; an OS-backed helper keeps them encrypted, while git's built-in `store` helper writes them in plain text.

### 2. Initialize your project with the plugin

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/cursor-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ archgate init --editor cursor
```

:::note[Beta access required]
The Cursor plugin is currently in beta. Run `archgate login` to sign up and authenticate.
The Cursor plugin is currently in beta. Run `archgate login` to sign in.
:::

If you have logged in via `archgate login`, the init command also installs the Archgate plugin for Cursor. The plugin provides pre-built agents, skills, and hooks that give Cursor's AI agent a full guardrails workflow.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/opencode-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ archgate init --editor opencode
```

:::note[Beta access required]
The opencode agent bundle is currently in beta. Run `archgate login` to sign up and authenticate.
The opencode agent bundle is currently in beta. Run `archgate login` to sign in.
:::

The opencode agents and skills are **not written to your project tree** — unlike Cursor, which also installs its agents and skills at the user scope but still writes its `afterFileEdit` hook into the project's `.cursor/hooks.json`. For opencode nothing editor-specific lands in the repository: everything lives on your machine and is available across every project you open with opencode.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/guides/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ When cloning or forking a repository that uses Archgate, the security scanner au

### Credentials

The `archgate login` command stores your authentication token in the operating system's credential manager (macOS Keychain, Windows Credential Manager, or Linux libsecret) via `git credential approve`. No credentials are written to disk as plain-text files. The token is used for plugin installation and is never sent to third parties beyond the Archgate plugins service.
The `archgate login` command hands your tokens to the git credential helper you have configured, via `git credential approve`. A helper backed by the operating system's credential manager (macOS Keychain, Windows Credential Manager, or Linux libsecret) keeps them encrypted; git's built-in `store` helper writes them to `~/.git-credentials` in plain text, so check yours with `git config --global credential.helper`. The token is used for plugin installation and is never sent to third parties beyond the Archgate plugins service.

- Plugin installation commands never embed the token in a URL or pass it as a command-line argument: git-based installs authenticate through the OS credential manager, and API downloads send the token in an `Authorization` header. Neither is visible in process listings.
- Plugin installation commands never embed the token in a URL or pass it as a command-line argument: git-based installs authenticate through your git credential helper, and API downloads send the token in an `Authorization` header. Neither is visible in process listings.
- To revoke access, run `archgate login logout`.

### Self-update integrity
Expand Down
23 changes: 14 additions & 9 deletions docs/src/content/docs/guides/vscode-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ Agent plugins require **VS Code 1.110 (February 2026 release) or later**. Earlie
:::

:::note[Beta access required]
The VS Code plugin is currently in beta. Run `archgate login` to sign up and authenticate before following the steps below.
The VS Code plugin is currently in beta. Run `archgate login` to sign in before following the steps below.
:::

### 1. Log in with GitHub
### 1. Log in to the Archgate platform

Authenticate with your GitHub account to obtain a plugin token:
Log in to obtain plugin access:

```bash
archgate login
```

This starts a GitHub Device Flow. The CLI displays a one-time code and URL -- open the URL in your browser, enter the code, and authorize. Once complete, credentials are stored securely in your OS credential manager via `git credential approve`.
This starts an OAuth 2.0 Device Authorization Grant against the Archgate platform. The CLI displays a one-time code and URL -- open the URL in your browser, enter the code, and authorize. Once complete, the resulting tokens are handed to your configured git credential helper via `git credential approve`; an OS-backed helper keeps them encrypted, while git's built-in `store` helper writes them in plain text.

### 2. Initialize your project with the plugin

Expand Down Expand Up @@ -88,7 +88,7 @@ The user-level marketplace setting (added to your `settings.json`):
}
```

The URL carries no credentials. Git authenticates against `plugins.archgate.dev` using the token `archgate login` stored in your OS credential manager.
The URL carries no credentials. `archgate credential` is the credential helper; `archgate login` registers it for `plugins.archgate.dev`. Git asks it on each request and receives a valid access token, renewed only when the cached one has lapsed.

### Manual setup

Expand All @@ -99,12 +99,17 @@ If you prefer not to let the CLI modify your user settings, you can set things u
**Extension:** Download and install the `.vsix` file directly:

```bash
curl -H "Authorization: Bearer <token>" https://plugins.archgate.dev/api/vscode -o archgate.vsix
code --install-extension archgate.vsix
rm archgate.vsix
printf 'protocol=https\nhost=plugins.archgate.dev\n\n' |
archgate credential get |
sed -n 's|^password=\(.*\)|header = "Authorization: Bearer \1"|p' |
curl --config - --fail --silent --show-error --output archgate.vsix https://plugins.archgate.dev/api/vscode &&
code --install-extension archgate.vsix
rm -f archgate.vsix
```

Replace `<token>` with the plugin token `archgate login` stored for `plugins.archgate.dev` in your OS credential manager. You can read it back with `git credential fill` (`printf 'protocol=https\nhost=plugins.archgate.dev\n\n' | git credential fill`).
`archgate credential get` emits a git credential response, so the `password=` line is reshaped into a `curl --config` directive and piped in. The token never reaches the command line, where it would be visible in the process list and your shell history. `--fail` makes curl exit non-zero on a 401 rather than writing the error body over `archgate.vsix`, and `&&` keeps `code` from installing anything curl did not finish downloading; the final `rm -f` cleans up either way.

Prefer the marketplace setup above where you can: it lets git ask the helper on every request, so no token is handled by hand at all.

## What the plugin provides

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The Archgate CLI works standalone, but **editor plugins** unlock a full AI guard
</CardGrid>

:::tip[Beta access]
Editor plugins are currently in beta. Run `archgate login` to sign up and authenticate, then `archgate init --install-plugin` to set up the plugin.
Editor plugins are currently in beta. Run `archgate login` to sign in, then `archgate init --install-plugin` to set up the plugin.
:::

<CardGrid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,5 @@ Hvis du foretrekker `npm install -g archgate` i stedet for proto-pluginen, må d
Etter installasjonen, kjør `archgate init` i prosjektet ditt for å sette opp linting og guardrails. Se guiden [Hurtigstart](/getting-started/quick-start/) for en gjennomgang.

:::tip[Editorplugins (beta)]
Vil du at AI-agenten din skal lese ADR-er før den koder og validere etterpå? Editorpluginene for [Claude Code](/guides/claude-code-plugin/) og [Cursor](/guides/cursor-integration/) legger til en komplett guardrails-arbeidsflyt på toppen av CLI-en. Kjør `archgate login` for å registrere deg og komme i gang.
Vil du at AI-agenten din skal lese ADR-er før den koder og validere etterpå? Editorpluginene for [Claude Code](/guides/claude-code-plugin/) og [Cursor](/guides/cursor-integration/) legger til en komplett guardrails-arbeidsflyt på toppen av CLI-en. Kjør `archgate login` for å logge inn og komme i gang.
:::
2 changes: 1 addition & 1 deletion docs/src/content/docs/nb/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ Nå som du har et fungerende oppsett, kan du dykke dypere:
- [Cursor-integrasjon](/guides/cursor-integration/) -- Bruk Archgate med Cursor IDE for AI-assistert utvikling.

:::tip[Editorplugins (beta)]
Vil du ha AI-agenter som automatisk leser ADR-ene dine før de koder? Kjør `archgate login` for å registrere deg og autentisere, deretter kjør `archgate init --install-plugin` for å sette opp pluginen.
Vil du ha AI-agenter som automatisk leser ADR-ene dine før de koder? Kjør `archgate login` for å logge inn, deretter kjør `archgate init --install-plugin` for å sette opp pluginen.
:::
10 changes: 5 additions & 5 deletions docs/src/content/docs/nb/guides/claude-code-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ Pluginen legger til agenter og rollebaserte ferdigheter i Claude Code. Utviklera
## Installasjon

:::note[Beta-tilgang kreves]
Claude Code-pluginen er for tiden i beta. Kjør `archgate login` for å registrere deg og autentisere.
Claude Code-pluginen er for tiden i beta. Kjør `archgate login` for å logge inn.
:::

### 1. Logg inn med GitHub
### 1. Logg inn på Archgate-plattformen

Autentiser med GitHub-kontoen din for å få et plugin-token:
Logg inn for å få tilgang til pluginene:

```bash
archgate login
```

Dette starter en GitHub Device Flow. CLI-et viser en engangskode og URL -- åpne URL-en i nettleseren din, skriv inn koden og autoriser. Når det er ferdig, lagres legitimasjonen sikkert i operativsystemets legitimasjonsbehandler via `git credential approve`.
Dette starter en OAuth 2.0 Device Authorization Grant mot Archgate-plattformen. CLI-et viser en engangskode og URL -- åpne URL-en i nettleseren din, skriv inn koden og autoriser. Når det er ferdig, gis tokenene til den git credential-helperen du har konfigurert via `git credential approve`; en helper som bruker operativsystemet holder dem krypterte, mens gits innebygde `store`-helper skriver dem i klartekst.

### 2. Initialiser prosjektet ditt med pluginen

Expand All @@ -67,7 +67,7 @@ Hvis `claude`-CLI-et er på PATH, installeres pluginen automatisk via:
1. `claude plugin marketplace add https://plugins.archgate.dev/archgate.git` (registrerer Archgate-markedsplassen)
2. `claude plugin install archgate@archgate` (installerer pluginen)

Markedsplass-URL-en inneholder ingen legitimasjon -- git autentiserer mot `plugins.archgate.dev` med tokenet `archgate login` lagret i operativsystemets legitimasjonsbehandler.
Markedsplass-URL-en inneholder ingen legitimasjon -- git autentiserer mot `plugins.archgate.dev` med tokenet `archgate login` ga til git credential-helperen din.

Hvis `claude`-CLI-et ikke finnes, skriver kommandoen ut de manuelle kommandoene du må kjøre.

Expand Down
8 changes: 4 additions & 4 deletions docs/src/content/docs/nb/guides/copilot-cli-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ Installasjonen er deklarativ: CLI-en skriver markedsplass- og plugin-deklarasjon
## Installasjon

:::note[Betatilgang kreves]
GitHub Copilot-pluginet er for øyeblikket i beta. Kjør `archgate login` for å registrere deg og autentisere før du følger trinnene nedenfor.
GitHub Copilot-pluginet er for øyeblikket i beta. Kjør `archgate login` for å logge inn før du følger trinnene nedenfor.
:::

### 1. Logg inn med GitHub
### 1. Logg inn på Archgate-plattformen

Autentiser med GitHub-kontoen din for å få et plugin-token:
Logg inn for å få tilgang til pluginene:

```bash
archgate login
```

Dette starter en GitHub Device Flow. CLI-en viser en engangskode og URL -- åpne URL-en i nettleseren din, skriv inn koden, og autoriser. Når det er fullført, lagres legitimasjonen sikkert i operativsystemets legitimasjonsbehandler via `git credential approve`.
Dette starter en OAuth 2.0 Device Authorization Grant mot Archgate-plattformen. CLI-en viser en engangskode og URL -- åpne URL-en i nettleseren din, skriv inn koden, og autoriser. Når det er fullført, gis tokenene til den git credential-helperen du har konfigurert via `git credential approve`; en helper som bruker operativsystemet holder dem krypterte, mens gits innebygde `store`-helper skriver dem i klartekst.

### 2. Initialiser prosjektet ditt med pluginet

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/nb/guides/cursor-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ archgate init --editor cursor
```

:::note[Betatilgang kreves]
Cursor-pluginet er for øyeblikket i beta. Kjør `archgate login` for å registrere deg og autentisere.
Cursor-pluginet er for øyeblikket i beta. Kjør `archgate login` for å logge inn.
:::

Hvis du har logget inn via `archgate login`, installerer init-kommandoen også Archgate-pluginet for Cursor. Pluginet tilbyr ferdigbygde agenter, skills og hooks som gir Cursors AI-agent en komplett guardrails-arbeidsflyt.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/nb/guides/opencode-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ archgate init --editor opencode
```

:::note[Betatilgang kreves]
opencode-agentpakken er for øyeblikket i beta. Kjør `archgate login` for å registrere deg og autentisere.
opencode-agentpakken er for øyeblikket i beta. Kjør `archgate login` for å logge inn.
:::

opencode-agentene og -ferdighetene skrives **ikke til prosjekttreet ditt** -- i motsetning til Cursor, som også installerer sine agenter og ferdigheter på brukernivå, men likevel skriver `afterFileEdit`-hooken sin i prosjektets `.cursor/hooks.json`. For opencode havner ingenting editorspesifikt i repositoriet: alt bor på maskinen din og er tilgjengelig på tvers av alle prosjekter du åpner med opencode.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/content/docs/nb/guides/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ Når du kloner eller forker et repositorium som bruker Archgate, håndhever sikk

### Legitimasjon

Kommandoen `archgate login` lagrer autentiseringstokenet ditt i operativsystemets legitimasjonsbehandler (macOS Keychain, Windows Credential Manager eller Linux libsecret) via `git credential approve`. Ingen legitimasjon skrives til disk som klartekstfiler. Tokenet brukes for plugin-installasjon og sendes aldri til tredjeparter utover Archgate plugins-tjenesten.
Kommandoen `archgate login` gir tokenene dine til den git credential-helperen du har konfigurert, via `git credential approve`. En helper som bruker operativsystemets legitimasjonsbehandler (macOS Keychain, Windows Credential Manager eller Linux libsecret) holder dem krypterte; gits innebygde `store`-helper skriver dem til `~/.git-credentials` i klartekst, så sjekk din med `git config --global credential.helper`. Tokenet brukes for plugin-installasjon og sendes aldri til tredjeparter utover Archgate plugins-tjenesten.

- Plugin-installasjonskommandoer legger aldri tokenet inn i en URL eller sender det som et kommandolinjeargument: git-baserte installasjoner autentiserer gjennom OS-legitimasjonsbehandleren, og API-nedlastinger sender tokenet i en `Authorization`-header. Ingen av delene er synlige i prosesslister.
- Plugin-installasjonskommandoer legger aldri tokenet inn i en URL eller sender det som et kommandolinjeargument: git-baserte installasjoner autentiserer gjennom git credential-helperen din, og API-nedlastinger sender tokenet i en `Authorization`-header. Ingen av delene er synlige i prosesslister.
- For å tilbakekalle tilgang, kjør `archgate login logout`.

### Selvoppdateringsintegritet
Expand Down
Loading
Loading