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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const config = {
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/agent-sh/agnix/tree/main/website/',
showLastUpdateTime: true,
lastVersion: '0.46.0',
lastVersion: '0.47.0',
...(includedDocVersions ? { onlyIncludeVersions: includedDocVersions } : {}),
versions: {
current: {
Expand Down
88 changes: 88 additions & 0 deletions website/versioned_docs/version-0.47.0/api-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: API Reference
description: "agnix CLI flags, output formats, MCP server tools, and LSP capabilities."
---

# API Reference

## CLI

```bash
agnix [OPTIONS] [PATH]
```

### Options

| Flag | Description |
|------|-------------|
| `[PATH]` | Directory or file to validate (default: `.`) |
| `--target <TOOL>` | Single tool focus (`generic`, `claude-code`, `cursor`, `codex`, `kiro`) |
| `--fix` | Apply HIGH and MEDIUM confidence fixes |
| `--dry-run` | Preview fixes without modifying files |
| `--fix-safe` | Apply only HIGH confidence fixes |
| `--fix-unsafe` | Apply all fixes, including LOW confidence fixes |
| `--show-fixes` | Show proposed fix diffs in text output |
| `--format <FMT>` | Output format: `text` (default), `json`, `sarif` |
| `--strict` | Treat warnings as errors (exit code 1) |
| `--config <PATH>` | Config file path (default: `.agnix.toml`) |
| `--watch`, `-w` | Watch mode - re-validate on file changes |
| `--locale <LOCALE>` | Set output locale, e.g. `en`, `es`, `zh-CN` |
| `--list-locales` | List supported locales and exit |
| `--max-files <N>` | Maximum number of files to validate |
| `--verbose`, `-v` | Verbose output |
| `--version` | Print version |
| `--help` | Print help |

### Subcommands

| Command | Description |
|---------|-------------|
| `agnix validate [PATH]` | Validate agent configs explicitly |
| `agnix init` | Initialize a config file |
| `agnix eval <FILE>` | Evaluate rule efficacy against labeled test cases |
| `agnix schema [--output FILE] [--fix]` | Output or regenerate JSON Schema for `.agnix.toml` |
| `agnix tools check` | Check configured tool versions |
| `agnix tools detect` | Detect installed tool versions |
| `agnix telemetry <status\|enable\|disable>` | Manage telemetry settings |

### Output formats

- **text** - Human-readable terminal output with colors
- **json** - Machine-readable JSON object with diagnostics and summary metadata (e.g. version, files_checked, diagnostics, summary, category, rule_severity, applies_to_tool)
- **sarif** - SARIF format for GitHub Code Scanning integration

## MCP server

```bash
cargo install agnix-mcp
agnix-mcp
```

The MCP server exposes these tools:

| Tool | Description |
|------|-------------|
| `validate_file` | Validate a single configuration file |
| `validate_project` | Validate all config files in a project |
| `get_rules` | List all available validation rules |
| `get_rule_docs` | Get documentation for a specific rule |

## LSP server

```bash
cargo install agnix-lsp
agnix-lsp
```

Supported LSP capabilities:

- `textDocument/publishDiagnostics` - real-time validation
- `textDocument/codeAction` - auto-fix suggestions
- `textDocument/hover` - rule documentation on hover
- `workspace/didChangeConfiguration` - runtime config updates
- `workspace/executeCommand` - project-level validation (`agnix.validateProjectRules` command)

## References

- [SPEC.md](https://github.com/agent-sh/agnix/blob/v0.47.0/SPEC.md) - full technical specification
- [MCP Protocol](https://modelcontextprotocol.io) - MCP specification
63 changes: 63 additions & 0 deletions website/versioned_docs/version-0.47.0/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Configuration
description: "Configure agnix with .agnix.toml - target tools, disable rules, set output format, and more."
---

# Configuration

agnix works with zero configuration. To customize, add `.agnix.toml` to your project root.

## Example

```toml
target = "ClaudeCode"
tools = ["claude-code"]
max_files_to_validate = 10000
locale = "en"

[rules]
disabled_rules = []
```

## Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `target` | string | `Generic` | Legacy single tool focus: `Generic`, `ClaudeCode`, `Cursor`, `Codex`, `Kiro` |
| `tools` | string[] | `[]` | Multi-tool targeting. Overrides `target`. Use values like `claude-code`, `cursor`, `codex`, `kiro`, `github-copilot`, `cline`, `opencode`, `gemini-cli`, `amp`, `roo-code`, `windsurf`, `generic`. |
| `severity` | string | `Warning` | Minimum severity level: `Warning`, `Error`, or `Info` |
| `max_files_to_validate` | int | `10000` | Maximum files to scan |
| `locale` | string | `"en"` | Output locale |
| `[rules].disabled_rules` | string[] | `[]` | Rule IDs to skip (e.g. `["CC-MEM-005"]`) |
| `[rules].disabled_validators` | string[] | `[]` | Validator names to skip |
| `[files]` | table | default excludes | Include or exclude non-standard files |
| `[[overrides]]` | table array | `[]` | Per-file disabled rule overrides |

## CLI flags

CLI flags override `.agnix.toml` values:

```bash
# Target a specific tool
agnix --target cursor .

# Apply fixes
agnix --fix .

# JSON output for CI
agnix --format json .

# SARIF output for GitHub Code Scanning
agnix --format sarif .

# Strict mode
agnix --strict .
```

`--strict`, `--fix`, `--fix-safe`, `--fix-unsafe`, `--dry-run`, `--show-fixes`, and `--format` are CLI flags, not `.agnix.toml` keys.

## Full reference

For the complete configuration specification, see
[docs/CONFIGURATION.md](https://github.com/agent-sh/agnix/blob/v0.47.0/docs/CONFIGURATION.md)
in the repository.
49 changes: 49 additions & 0 deletions website/versioned_docs/version-0.47.0/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: Contributing
description: "How to contribute to agnix - report bugs, request rules, improve docs, or write code."
---

# Contributing

Contributions are welcome and appreciated.

## Found something off?

agnix validates against 447 rules, but the agent config ecosystem moves fast. If a rule is wrong, missing, or too noisy, I want to know.

- [Report a bug](https://github.com/agent-sh/agnix/issues/new)
- [Request a rule](https://github.com/agent-sh/agnix/issues/new)

Your real-world configs are the best test suite I could ask for.

## Contribute code

Good first issues are labeled and ready:
[good first issues](https://github.com/agent-sh/agnix/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)

Adding a new rule is one of the best ways to get started. Each rule is a self-contained unit with clear inputs, outputs, and test patterns. Find a similar existing rule to use as your template.

## Improve docs

This documentation site is in `website/`. To run locally:

```bash
npm --prefix website ci
npm --prefix website run generate:rules
npm --prefix website start
```

## Where canonical content lives

Long-form source-of-truth docs remain in the repository:

- `README.md`
- `SPEC.md`
- `knowledge-base/`

This website assembles and links that content for navigation and search.

## References

- [CONTRIBUTING.md](https://github.com/agent-sh/agnix/blob/v0.47.0/CONTRIBUTING.md) - full contribution guidelines
- [SECURITY.md](https://github.com/agent-sh/agnix/blob/v0.47.0/SECURITY.md) - security policy
69 changes: 69 additions & 0 deletions website/versioned_docs/version-0.47.0/editor-integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: Editor Integration
description: "Set up agnix real-time diagnostics in VS Code, Neovim, JetBrains, and Zed."
---

# Editor Integration

agnix ships an LSP server (`agnix-lsp`) that provides real-time diagnostics, code actions, and hover documentation in your editor.

## Capabilities

- Diagnostics on open, save, and change
- Code actions for fixable findings
- Hover details for rule explanations

## VS Code

Install the extension from the
[VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=avifenesh.agnix).

The extension bundles the LSP server. No additional setup needed.

For manual configuration, see the
[VS Code extension README](https://github.com/agent-sh/agnix/tree/v0.47.0/editors/vscode).

## JetBrains (IntelliJ, WebStorm, etc.)

Install from the
[JetBrains Plugin Marketplace](https://plugins.jetbrains.com/plugin/30087-agnix).

Configure the `agnix-lsp` binary path in plugin settings if not auto-detected.

For details, see the
[JetBrains plugin README](https://github.com/agent-sh/agnix/tree/v0.47.0/editors/jetbrains).

## Neovim

Install with lazy.nvim:

```lua
{ "agent-sh/agnix.nvim" }
```

Then in your config:

```lua
require('agnix').setup()
```

The plugin auto-detects and downloads the `agnix-lsp` binary. For full setup instructions, see the
[agnix.nvim README](https://github.com/agent-sh/agnix.nvim).

## Zed

Install the agnix extension from the
[Zed extension marketplace](https://zed.dev/extensions?query=agnix), or see the
[Zed extension README](https://github.com/agent-sh/agnix/tree/v0.47.0/editors/zed).

## Other editors

Any editor with LSP support can use `agnix-lsp`. Point your LSP client to the binary:

```bash
cargo install agnix-lsp
agnix-lsp
```

For the full editor support matrix, see
[docs/EDITOR-SETUP.md](https://github.com/agent-sh/agnix/blob/v0.47.0/docs/EDITOR-SETUP.md).
78 changes: 78 additions & 0 deletions website/versioned_docs/version-0.47.0/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: Getting Started
description: "Install agnix and validate your agent configuration files in under 60 seconds."
---

# Getting Started

:::tip No install needed?
[Try the playground](/playground) - paste your config and see diagnostics instantly, right in your browser.
:::

## 1. Run agnix

No installation needed. Use `npx` to run against your project:

```bash
npx agnix .
```

Expected output:

```
Validating: .

CLAUDE.md:15:1 warning: Generic instruction 'Be helpful and accurate' [fixable]
help: Remove generic instructions. Claude already knows this.

.claude/skills/review/SKILL.md:3:1 error: Invalid name 'Review-Code' [fixable]
help: Use lowercase letters and hyphens only (e.g., 'code-review')

Found 1 error, 1 warning
2 issues are automatically fixable

hint: Run with --fix to apply fixes
```

## 2. Auto-fix issues

```bash
npx agnix --fix .
```

agnix applies safe fixes automatically and reports what changed.

## 3. Install globally (optional)

If you use agnix regularly:

```bash
npm install -g agnix
```

Then run with:

```bash
agnix .
```

See [Installation](./installation.md) for Homebrew, Cargo, and binary options.

## 4. Target a specific tool

Validate only configs relevant to a single tool:

```bash
agnix --target claude-code .
agnix --target cursor .
agnix --target codex .
```

GitHub Copilot validation is enabled by default and can be targeted in config with `tools = ["github-copilot"]`.

## Next steps

- [Configuration](./configuration.md) - customize rules with `.agnix.toml`
- [Rules Reference](./rules/index.md) - browse all 447 rules
- [Editor Integration](./editor-integration.md) - get diagnostics in your editor
- [Troubleshooting](./troubleshooting.md) - common issues and fixes
Loading
Loading