TypeScript
Detected from tsconfig.json. Linter: Biome.
Maina is the verification layer for AI-generated code. 19+ tools. 7 languages. One command. Zero config.
curl -fsSL https://api.mainahq.com/install | bashDetects your OS + package manager, installs maina globally, and runs maina setup in the current repo. Exits with a shell-profile-specific remediation if maina doesn’t land on PATH afterwards. See Getting Started.
bun add -g @mainahq/climaina setuppnpm add -g @mainahq/climaina setupnpm install -g @mainahq/climaina setupbunx @mainahq/cli@latest setupRuns the wizard from a cached copy. Setup warns that maina may not be on PATH after exit (unless you already had it installed globally), so AI-agent subshells may not find it — prefer one of the global install paths above when you want a permanent install.
Initialize your project
maina setup # recommended — one command# or, if you prefer the lower-level primitives:maina init --install # detects stack, installs verification toolsmaina setup is the zero-friction wizard. maina init is the lower-level bootstrap it delegates to; it remains available for scripting and snapshot tests.
Make changes and commit
git add .maina commitmaina commit runs the full 19+ tool verification pipeline — syntax guard, parallel analysis, diff-only filtering — then commits if everything passes.
Compile codebase knowledge
maina wiki init # compile codebase knowledgemaina wiki query "how does auth work?"Run verification standalone
maina verifymaina verify --deep # Add AI semantic reviewmaina verify --visual # Add Playwright screenshot regressionmaina verify --cloud # Submit to Maina CloudStart a feature with the full workflow
maina brainstorm # Explore the idea, create a ticketmaina plan my-feature # Create branch with structured spec/plan# ... implement ...maina commit # Verify and commitmaina pr # Create PR with verification proofCheck your setup
maina doctorShows 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.
| Layer | What you add | What you get |
|---|---|---|
| L0 — Git-native | Nothing beyond Git + Bun | Core commands, deterministic verification, context engine |
| L1 — Add AI | MAINA_API_KEY or Ollama | AI-powered reviews, commit messages, explanations, fix generation |
| L2 — Add tools | Semgrep, Trivy, Secretlint, SonarQube | Deeper SAST, CVE scanning, secret detection, quality gates |
| L3 — Add PM | GitHub Issues | Sync to Huly, Linear, Plane, or any GitHub-syncing PM tool |
maina commitSyntax guard — Language-aware linting (Biome/ruff/go vet/clippy/dotnet format/Checkstyle/PHPStan). Under 500ms. Rejects immediately on failure.
Parallel analysis — 19+ tools run in parallel: slop, Semgrep, Trivy, Secretlint, SonarQube, Stryker, diff-cover, typecheck, consistency, ZAP, Lighthouse, AI review, and more.
Diff-only filter — Only findings on changed lines. No pre-existing noise.
AI fix (if AI configured) — Context-aware fix suggestions.
Git commit — If everything passes, your changes are committed.
Workflow tracking — Step recorded in workflow context + async RL feedback for prompt evolution.
maina setup wires this automatically for every AI coding tool it detects. Manual reference:
Automatic — setup writes .claude/CLAUDE.md and configures MCP.
Automatic — setup writes .cursor/rules/maina.mdc and .mcp.json.
Automatic — setup writes .windsurf/rules/maina.md and configures ~/.codeium/windsurf/mcp_config.json.
{"mcpServers":{"maina":{"command":"bunx","args":["@mainahq/cli","--mcp"]}}}- uses: mainahq/maina/.github/actions/verify@main with: token: ${{ secrets.MAINA_TOKEN }}- uses: mainahq/maina/.github/actions/verify@main with: base: mainBoth 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:
maina login # authenticate with Maina Cloudmaina sync pull # get team promptsmaina sync push # share your promptsRun the full pipeline in the cloud — no local tool installs required:
maina login # authenticate (one-time)maina verify --cloud # submit diff to Maina Cloud