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
13 changes: 13 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
},
"attribution": { "commit": "", "pr": "" },
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "INPUT=$(cat); CMD=$(echo \"$INPUT\" | node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>process.stdout.write(JSON.parse(d).tool_input.command))\"); if echo \"$CMD\" | grep -qE 'git\\s+commit'; then bun run validate > /dev/null 2>&1; EXIT=$?; if [ $EXIT -ne 0 ]; then echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"bun run validate failed (exit '\"$EXIT\"'). Fix issues before committing.\"}}'; fi; fi",
"timeout": 300,
"statusMessage": "Running validation before commit..."
}
]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit",
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
required: true

permissions:
contents: read
contents: write
id-token: write

jobs:
Expand Down Expand Up @@ -80,3 +80,29 @@ jobs:

- name: Publish platform package
run: npm publish ./packages/${{ matrix.artifact }} --access public --provenance

- name: Prepare release asset (Unix)
if: runner.os != 'Windows'
run: |
cp dist/${{ matrix.artifact }} archgate
tar -czf ${{ matrix.artifact }}.tar.gz archgate
rm archgate

- name: Prepare release asset (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Copy-Item "dist/${{ matrix.artifact }}.exe" "archgate.exe"
Compress-Archive -Path "archgate.exe" -DestinationPath "${{ matrix.artifact }}.zip"
Remove-Item "archgate.exe"

- name: Upload release asset
env:
GH_TOKEN: ${{ github.token }}
run: |
TAG="${{ github.event.release.tag_name || inputs.tag }}"
if [ "${{ runner.os }}" = "Windows" ]; then
gh release upload "$TAG" "${{ matrix.artifact }}.zip" --clobber
else
gh release upload "$TAG" "${{ matrix.artifact }}.tar.gz" --clobber
fi
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ When a rule is violated, `archgate check` reports the file, line, and which ADR

## Installation

**Standalone** (no Node.js required):

```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/archgate/cli/main/install.ps1 | iex
```

**Via npm** (or any Node.js package manager):

```bash
# npm
npm install -g archgate
Expand All @@ -64,8 +76,8 @@ npx archgate check # run via package manager
## Quick start

```bash
# 1. Install (pick your package manager)
npm install -g archgate # or: bun install -g archgate
# 1. Install
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh # or: npm install -g archgate

# 2. Initialize governance in your project
cd my-project
Expand Down
10 changes: 7 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 29 additions & 5 deletions docs/public/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Archgate lets teams write an ADR once and enforce it everywhere. ADRs are Markdo

## Installation

Available via npm (`npm install -g archgate`), Homebrew, or standalone binary for macOS, Linux, and Windows.
Install standalone (no Node.js required): `curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh` (macOS/Linux) or `irm https://raw.githubusercontent.com/archgate/cli/main/install.ps1 | iex` (Windows PowerShell). Also available via npm (`npm install -g archgate`) or direct download from GitHub Releases.

## Documentation

Expand Down Expand Up @@ -115,9 +115,29 @@ Editor plugins are currently in beta. Sign up at [plugins.archgate.dev](https://

Source: https://cli.archgate.dev/getting-started/installation/

## Install globally
## Install standalone (recommended)

Install Archgate globally using your preferred package manager:
The fastest way to install Archgate — no Node.js or package manager required:

```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/archgate/cli/main/install.ps1 | iex
```

This downloads a pre-built binary for your platform and installs it to `~/.archgate/bin/`. The installer detects your shell profiles and offers to add the directory to your PATH.

You can customize the install with environment variables:
- `ARCHGATE_VERSION` — Install a specific version (e.g. `v0.11.2`). Default: latest release.
- `ARCHGATE_INSTALL_DIR` — Custom install directory. Default: `~/.archgate/bin`.

You can also download binaries directly from GitHub Releases: https://github.com/archgate/cli/releases

## Install via npm

Install Archgate globally using your preferred Node.js package manager:

```bash
# npm
Expand Down Expand Up @@ -235,13 +255,17 @@ Source: https://cli.archgate.dev/getting-started/quick-start/

## 1. Install Archgate

If you have not installed the CLI yet, install it globally via npm:
If you have not installed the CLI yet:

```bash
# Standalone (no Node.js required)
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh

# Or via npm
npm install -g archgate
```

See the [Installation](/getting-started/installation/) page for platform details and troubleshooting.
See the [Installation](/getting-started/installation/) page for all options, including Windows and custom install directories.

## 2. Initialize your project

Expand Down
2 changes: 1 addition & 1 deletion docs/public/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Archgate lets teams write an ADR once and enforce it everywhere. ADRs are Markdo

## Installation

Available via npm (`npm install -g archgate`), Homebrew, or standalone binary for macOS, Linux, and Windows.
Install standalone (no Node.js required): `curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh` (macOS/Linux) or `irm https://raw.githubusercontent.com/archgate/cli/main/install.ps1 | iex` (Windows PowerShell). Also available via npm (`npm install -g archgate`) or direct download from GitHub Releases.

## Documentation

Expand Down
29 changes: 26 additions & 3 deletions docs/src/content/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
---
title: Installation
description: Install the Archgate CLI on macOS, Linux, or Windows via npm, Homebrew, or standalone binary. Start enforcing ADRs as executable code rules in minutes.
description: Install the Archgate CLI on macOS, Linux, or Windows via a one-line installer, npm, or standalone binary. Start enforcing ADRs as executable code rules in minutes.
---

## Install globally
## Install standalone (recommended)

Install Archgate globally using your preferred package manager:
The fastest way to install Archgate — no Node.js or package manager required:

```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/archgate/cli/main/install.ps1 | iex
```

This downloads a pre-built binary for your platform and installs it to `~/.archgate/bin/`. The installer detects your shell profiles and offers to add the directory to your PATH.

You can customize the install with environment variables:

| Variable | Description | Default |
| ---------------------- | ------------------------------------------- | ----------------- |
| `ARCHGATE_VERSION` | Install a specific version (e.g. `v0.11.2`) | Latest release |
| `ARCHGATE_INSTALL_DIR` | Custom install directory | `~/.archgate/bin` |

You can also download binaries directly from [GitHub Releases](https://github.com/archgate/cli/releases).

## Install via npm

Install Archgate globally using your preferred Node.js package manager:

```bash
# npm
Expand Down
8 changes: 6 additions & 2 deletions docs/src/content/docs/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ description: Get started with Archgate in under 5 minutes. Initialize a project,

## 1. Install Archgate

If you have not installed the CLI yet, install it globally via npm:
If you have not installed the CLI yet:

```bash
# Standalone (no Node.js required)
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh

# Or via npm
npm install -g archgate
```

See the [Installation](/getting-started/installation/) page for platform details and troubleshooting.
See the [Installation](/getting-started/installation/) page for all options, including Windows and custom install directories.

## 2. Initialize your project

Expand Down
22 changes: 21 additions & 1 deletion docs/src/content/docs/guides/ci-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,26 @@ adr-compliance:
- archgate check
```

## Standalone installer (no Node.js)

If your CI environment does not have Node.js, use the standalone installer to download a pre-built binary directly from GitHub Releases:

```yaml
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh
- run: ~/.archgate/bin/archgate check --ci
```

This works in any environment with `curl` and `tar` — no runtime dependencies needed. You can pin a version with the `ARCHGATE_VERSION` environment variable:

```yaml
- run: curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | ARCHGATE_VERSION=v0.11.2 sh
```

## Bun-based CI

If your CI already uses Bun, install Archgate with `bun` instead of `npm`:
Expand All @@ -178,7 +198,7 @@ jobs:

Archgate works with any CI system that can run shell commands. The pattern is always the same:

1. Install: `npm install -g archgate` (or `bun install -g archgate`)
1. Install: `npm install -g archgate`, `bun install -g archgate`, or use the [standalone installer](/getting-started/installation/#install-standalone-recommended)
2. Run: `archgate check`
3. Check the exit code (0 = pass, 1 = violations, 2 = error)

Expand Down
29 changes: 26 additions & 3 deletions docs/src/content/docs/pt-br/getting-started/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
---
title: Instalação
description: Instale o Archgate CLI no macOS, Linux ou Windows via npm, Homebrew ou binário standalone. Comece a aplicar ADRs como regras de código executáveis em minutos.
description: Instale o Archgate CLI no macOS, Linux ou Windows via instalador, npm ou binário standalone. Comece a aplicar ADRs como regras de código executáveis em minutos.
---

## Instalar globalmente
## Instalação standalone (recomendado)

Instale o Archgate globalmente usando seu gerenciador de pacotes preferido:
A forma mais rápida de instalar o Archgate — sem necessidade de Node.js ou gerenciador de pacotes:

```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh

# Windows (PowerShell)
irm https://raw.githubusercontent.com/archgate/cli/main/install.ps1 | iex
```

Isso baixa um binário pré-compilado para sua plataforma e instala em `~/.archgate/bin/`. O instalador detecta os perfis do seu shell e oferece adicionar o diretório ao seu PATH.

Você pode personalizar a instalação com variáveis de ambiente:

| Variável | Descrição | Padrão |
| ---------------------- | ---------------------------------------------- | ----------------- |
| `ARCHGATE_VERSION` | Instalar uma versão específica (ex: `v0.11.2`) | Última versão |
| `ARCHGATE_INSTALL_DIR` | Diretório de instalação personalizado | `~/.archgate/bin` |

Você também pode baixar os binários diretamente das [GitHub Releases](https://github.com/archgate/cli/releases).

## Instalar via npm

Instale o Archgate globalmente usando seu gerenciador de pacotes Node.js preferido:

```bash
# npm
Expand Down
8 changes: 6 additions & 2 deletions docs/src/content/docs/pt-br/getting-started/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ description: Comece a usar o Archgate em menos de 5 minutos. Inicialize um proje

## 1. Instalar o Archgate

Se você ainda não instalou a CLI, instale-a globalmente via npm:
Se você ainda não instalou a CLI:

```bash
# Standalone (sem necessidade de Node.js)
curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh

# Ou via npm
npm install -g archgate
```

Veja a página de [Instalação](/pt-br/getting-started/installation/) para detalhes de plataforma e solução de problemas.
Veja a página de [Instalação](/pt-br/getting-started/installation/) para todas as opções, incluindo Windows e diretórios de instalação personalizados.

## 2. Inicializar seu projeto

Expand Down
22 changes: 21 additions & 1 deletion docs/src/content/docs/pt-br/guides/ci-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,26 @@ adr-compliance:
- archgate check
```

## Instalador standalone (sem Node.js)

Se seu ambiente de CI não possui Node.js, use o instalador standalone para baixar um binário pré-compilado diretamente das GitHub Releases:

```yaml
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | sh
- run: ~/.archgate/bin/archgate check --ci
```

Isso funciona em qualquer ambiente com `curl` e `tar` — sem dependências de runtime. Você pode fixar uma versão com a variável de ambiente `ARCHGATE_VERSION`:

```yaml
- run: curl -fsSL https://raw.githubusercontent.com/archgate/cli/main/install.sh | ARCHGATE_VERSION=v0.11.2 sh
```

## CI baseado em Bun

Se seu CI já usa Bun, instale o Archgate com `bun` ao invés de `npm`:
Expand All @@ -178,7 +198,7 @@ jobs:

O Archgate funciona com qualquer sistema de CI que consiga executar comandos shell. O padrão é sempre o mesmo:

1. Instalar: `npm install -g archgate` (ou `bun install -g archgate`)
1. Instalar: `npm install -g archgate`, `bun install -g archgate`, ou use o [instalador standalone](/pt-br/getting-started/installation/#instalação-standalone-recomendado)
2. Executar: `archgate check`
3. Verificar o código de saída (0 = aprovado, 1 = violações, 2 = erro)

Expand Down
Loading
Loading