Skip to content

Getting Started

Maina is the verification layer for AI-generated code. 19+ tools. 7 languages. One command. Zero config.

Terminal window
curl -fsSL https://api.mainahq.com/install | bash

Detects your OS, installs maina, finds your AI tools, configures MCP automatically.

  1. Initialize your project

    Terminal window
    maina init --install

    This detects your stack, creates .maina/ with a constitution and custom prompts, and installs missing verification tools.

    Then run guided setup:

    Terminal window
    maina setup # guided setup — detects IDE, configures MCP
  2. Make changes and commit

    Terminal window
    git add .
    maina commit

    maina commit runs the full 19+ tool verification pipeline — syntax guard, parallel analysis, diff-only filtering — then commits if everything passes.

  3. Compile codebase knowledge

    Terminal window
    maina wiki init # compile codebase knowledge
    maina wiki query "how does auth work?"
  4. Run verification standalone

    Terminal window
    maina verify
    maina verify --deep # Add AI semantic review
    maina verify --visual # Add Playwright screenshot regression
    maina verify --cloud # Submit to Maina Cloud
  5. Start a feature with the full workflow

    Terminal window
    maina brainstorm # Explore the idea, create a ticket
    maina plan my-feature # Create branch with structured spec/plan
    # ... implement ...
    maina commit # Verify and commit
    maina pr # Create PR with verification proof
  6. Check your setup

    Terminal window
    maina doctor

    Shows which of the 19+ tools are installed, engine health, and install commands for anything missing.

Maina auto-detects your project language and adapts the verification pipeline:

TypeScript

Detected from tsconfig.json. Linter: Biome.

Python

Detected from pyproject.toml, requirements.txt. Linter: ruff.

Go

Detected from go.mod. Linter: go vet.

Rust

Detected from Cargo.toml. Linter: clippy.

C# / .NET

Detected from .sln, .csproj. Linter: dotnet format.

Java / Kotlin

Detected from pom.xml, build.gradle. Linter: Checkstyle.

PHP

Detected from composer.json. Linter: PHPStan, Psalm.

Maina works with zero config and scales up as you add capabilities.

LayerWhat you addWhat you get
L0 — Git-nativeNothing beyond Git + BunCore commands, deterministic verification, context engine
L1 — Add AIMAINA_API_KEY or OllamaAI-powered reviews, commit messages, explanations, fix generation
L2 — Add toolsSemgrep, Trivy, Secretlint, SonarQubeDeeper SAST, CVE scanning, secret detection, quality gates
L3 — Add PMGitHub IssuesSync to Huly, Linear, Plane, or any GitHub-syncing PM tool
  1. Syntax guard — Language-aware linting (Biome/ruff/go vet/clippy/dotnet format/Checkstyle/PHPStan). Under 500ms. Rejects immediately on failure.

  2. Parallel analysis — 19+ tools run in parallel: slop, Semgrep, Trivy, Secretlint, SonarQube, Stryker, diff-cover, typecheck, consistency, ZAP, Lighthouse, AI review, and more.

  3. Diff-only filter — Only findings on changed lines. No pre-existing noise.

  4. AI fix (if AI configured) — Context-aware fix suggestions.

  5. Git commit — If everything passes, your changes are committed.

  6. Workflow tracking — Step recorded in workflow context + async RL feedback for prompt evolution.

Add Maina to your IDE:

Automatic — maina init creates .claude/settings.json

- uses: mainahq/maina/.github/actions/verify@main
with:
token: ${{ secrets.MAINA_TOKEN }}

Both options run the full verification pipeline on every PR, posting findings as inline review comments. Exit codes: 0 (passed), 1 (findings), 2 (tool failure), 3 (config error). See the CI Integration docs for full configuration.

Share prompts and feedback across your team:

Terminal window
maina login # authenticate with Maina Cloud
maina sync pull # get team prompts
maina sync push # share your prompts

Run the full pipeline in the cloud — no local tool installs required:

Terminal window
maina login # authenticate (one-time)
maina verify --cloud # submit diff to Maina Cloud