Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.
The ScanDrix CLI runs the same AST + LLM review engine locally, in pre-commit/pre-push git hooks, via an interactive TUI, or inside any CI runner.
Install
curl -fsSL https://scandrix.dev/install | bash
The installer places scandrix on your PATH (macOS, Linux, WSL). Or build from source via make build. Verify:
scandrix version
Team API keys
CLI and CI runs authenticate via browser login (scandrix auth login) or team API keys generated in the dashboard under Settings → API Keys (scandrix_* prefix):
# Export for the current shell (SCANDRIX_API_KEY, SCANDRIX_TEAM_KEY, or SCANDRIX_TOKEN)export SCANDRIX_API_KEY="scandrix_..."
Or pass a key directly for a single run:
scandrix review --key "scandrix_..." --staged
Treat team keys like passwords. Keep them in CI secret stores and untracked environment files only — never commit them to source code or client-side bundles. Rotate immediately from the dashboard if a key is exposed.
Local reviews
Review your working tree or staging area before committing:
scandrix review --staged
Other common invocations:
# Review uncommitted changes against mainscandrix review --branch main# Review using only deterministic + custom rules (no LLM calls)scandrix review --rules-only --offline# Inspect effective merged repository/global configurationscandrix config show
Use --json for machine-readable output or --prompt-only for coding-agent prompts.
CI usage
Run reviews headlessly in your pipeline using scandrix ci run or scandrix review --fail-on:
With --fail-on, the CLI exits with code 1 when findings meet or exceed the configured severity (info, warning, error, critical).
Pre-commit & pre-push hooks
scandrix hook install
This non-destructively installs delimited review guards in .git/hooks/pre-commit and .git/hooks/pre-push. Skip temporarily with SCANDRIX_SKIP_HOOK=1 or git commit --no-verify.
Command overview
Command
Purpose
scandrix review
Review working tree, --staged, --branch, --commit, or --file diffs
scandrix dry-run
Preview findings without modifying PR/cloud state (--base-branch, --staged, --commit)
List configured rules (validate, create, update, generate, init also supported)
scandrix config show
Show effective global, repository, and environment configuration
scandrix hook install
Install pre-commit and pre-push git hooks
scandrix auth login
Interactive browser auth or scandrix auth team-key
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ScanDrix","colors":{"primary":"#EF8557","light":"#F5A07A","dark":"#226192"},"logo":{"light":"https://mintcdn.com/scan-drix/BDKe3nzKChTtzCuX/logo/logo.png?fit=max\u0026auto=format\u0026n=BDKe3nzKChTtzCuX\u0026q=85\u0026s=e9e0574c10fe414930e9a5c8c77a5d38","dark":"https://mintcdn.com/scan-drix/BDKe3nzKChTtzCuX/logo/logo.png?fit=max\u0026auto=format\u0026n=BDKe3nzKChTtzCuX\u0026q=85\u0026s=e9e0574c10fe414930e9a5c8c77a5d38","href":"https://scandrix.dev"},"favicon":"https://mintcdn.com/scan-drix/BDKe3nzKChTtzCuX/favicon.ico?fit=max\u0026auto=format\u0026n=BDKe3nzKChTtzCuX\u0026q=85\u0026s=7f3800a55074f2388c034304fd80dd6b","navbar":{"links":[{"href":"mailto:support@scandrix.dev","label":"Support"},{"href":"https://github.com/Santosh-Prasad-Verma/ScanDrix","label":"GitHub"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.scandrix.dev"}},"footer":{"socials":{"github":"https://github.com/Santosh-Prasad-Verma/ScanDrix","website":"https://scandrix.dev"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"scan-drix","hasAudioNarration":false,"actualSubdomain":"scan-drix","customDomains":["docs.scandrix.dev"],"gitSource":{"type":"github","owner":"santosh-prasad-verma","repo":"scandrix","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":"","_id":"6b1251087c30f9dc1255cb0b"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b125e8b8753f39e75d3759c","clientVersion":"0.0.4448","searchFilterCounts":[]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"how-to-use/cli","slug":"/how-to-use/cli","pageMetadata":{"title":"CLI \u0026 Team Keys","description":"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.","href":"/how-to-use/cli"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The ScanDrix CLI runs the same AST + LLM review engine locally, in pre-commit/pre-push git hooks, via an interactive TUI, or inside any CI runner.`}),`\n`,_jsx(Heading,{level:`2`,id:`install`,children:`Install`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -fsSL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://scandrix.dev/install`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` bash`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The installer places `,_jsx(_components.code,{children:`scandrix`}),` on your `,_jsx(_components.code,{children:`PATH`}),` (macOS, Linux, WSL). Or build from source via `,_jsx(_components.code,{children:`make build`}),`. Verify:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`scandrix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` version`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`team-api-keys`,children:`Team API keys`}),`\n`,_jsxs(_components.p,{children:[`CLI and CI runs authenticate via browser login (`,_jsx(_components.code,{children:`scandrix auth login`}),`) or `,_jsx(_components.strong,{children:`team API keys`}),` generated in the dashboard under `,_jsx(_components.strong,{children:`Settings → API Keys`}),` (`,_jsx(_components.code,{children:`scandrix_*`}),` prefix):`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Export for the current shell (SCANDRIX_API_KEY, SCANDRIX_TEAM_KEY, or SCANDRIX_TOKEN)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` SCANDRIX_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"scandrix_...\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Or pass a key directly for a single run:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`scandrix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` review`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --key`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scandrix_...\"`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --staged`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Treat team keys like passwords. Keep them in CI secret stores and untracked environment files only — never commit them to source code or client-side bundles. Rotate immediately from the dashboard if a key is exposed.`})}),`\n`,_jsx(Heading,{level:`2`,id:`local-reviews`,children:`Local reviews`}),`\n`,_jsx(_components.p,{children:`Review your working tree or staging area before committing:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`scandrix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` review`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --staged`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Other common invocations:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Review uncommitted changes against main`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`scandrix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` review`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --branch`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` main`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Review using only deterministic + custom rules (no LLM calls)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`scandrix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` review`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --rules-only`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --offline`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Inspect effective merged repository/global configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`scandrix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` config`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` show`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`--json`}),` for machine-readable output or `,_jsx(_components.code,{children:`--prompt-only`}),` for coding-agent prompts.`]}),`\n`,_jsx(Heading,{level:`2`,id:`ci-usage`,children:`CI usage`}),`\n`,_jsxs(_components.p,{children:[`Run reviews headlessly in your pipeline using `,_jsx(_components.code,{children:`scandrix ci run`}),` or `,_jsx(_components.code,{children:`scandrix review --fail-on`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`12`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`scandrix_review`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` stage`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`test`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` image`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`alpine:latest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` only`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`merge_requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` before_script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`apk add --no-cache curl git bash`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`curl -fsSL https://scandrix.dev/install | bash`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`scandrix review --branch \"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME\" --fail-on critical --json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` variables`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` SCANDRIX_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$SCANDRIX_API_KEY`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`--fail-on`}),`, the CLI exits with code `,_jsx(_components.code,{children:`1`}),` when findings meet or exceed the configured severity (`,_jsx(_components.code,{children:`info`}),`, `,_jsx(_components.code,{children:`warning`}),`, `,_jsx(_components.code,{children:`error`}),`, `,_jsx(_components.code,{children:`critical`}),`).`]}),`\n`,_jsx(Heading,{level:`2`,id:`pre-commit-\u0026-pre-push-hooks`,children:`Pre-commit \u0026 pre-push hooks`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`scandrix`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` hook`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`This non-destructively installs delimited review guards in `,_jsx(_components.code,{children:`.git/hooks/pre-commit`}),` and `,_jsx(_components.code,{children:`.git/hooks/pre-push`}),`. Skip temporarily with `,_jsx(_components.code,{children:`SCANDRIX_SKIP_HOOK=1`}),` or `,_jsx(_components.code,{children:`git commit --no-verify`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`command-overview`,children:`Command overview`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Command`}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scandrix review`})}),_jsxs(_components.td,{children:[`Review working tree, `,_jsx(_components.code,{children:`--staged`}),`, `,_jsx(_components.code,{children:`--branch`}),`, `,_jsx(_components.code,{children:`--commit`}),`, or `,_jsx(_components.code,{children:`--file`}),` diffs`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scandrix dry-run`})}),_jsxs(_components.td,{children:[`Preview findings without modifying PR/cloud state (`,_jsx(_components.code,{children:`--base-branch`}),`, `,_jsx(_components.code,{children:`--staged`}),`, `,_jsx(_components.code,{children:`--commit`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scandrix ci run`})}),_jsx(_components.td,{children:`Headless CI runner exporting SARIF / JUnit / GitLab Code Quality`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scandrix rules list`})}),_jsxs(_components.td,{children:[`List configured rules (`,_jsx(_components.code,{children:`validate`}),`, `,_jsx(_components.code,{children:`create`}),`, `,_jsx(_components.code,{children:`update`}),`, `,_jsx(_components.code,{children:`generate`}),`, `,_jsx(_components.code,{children:`init`}),` also supported)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scandrix config show`})}),_jsx(_components.td,{children:`Show effective global, repository, and environment configuration`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scandrix hook install`})}),_jsx(_components.td,{children:`Install pre-commit and pre-push git hooks`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`scandrix auth login`})}),_jsxs(_components.td,{children:[`Interactive browser auth or `,_jsx(_components.code,{children:`scandrix auth team-key`})]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"CLI \u0026 Team Keys","description":"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.","href":"/how-to-use/cli"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Install","slug":"install","depth":2,"children":[]},{"title":"Team API keys","slug":"team-api-keys","depth":2,"children":[]},{"title":"Local reviews","slug":"local-reviews","depth":2,"children":[]},{"title":"CI usage","slug":"ci-usage","depth":2,"children":[]},{"title":"Pre-commit \u0026 pre-push hooks","slug":"pre-commit-\u0026-pre-push-hooks","depth":2,"children":[]},{"title":"Command overview","slug":"command-overview","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"scan-drix","siteName":"ScanDrix","title":"CLI \u0026 Team Keys - ScanDrix","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-04T06:32:49.252Z","originalFileLocation":"how-to-use/cli.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ScanDrix\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"CLI \u0026amp; Team Keys - ScanDrix\">\u003cmeta data-mint-head property=\"og:description\" content=\"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ScanDrix\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.scandrix.dev/how-to-use/cli\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://scan-drix.mintlify.site/_mintlify/api/og/v2?division=CLI\u0026amp;title=CLI+%26+Team+Keys\u0026amp;description=Install+the+ScanDrix+CLI%2C+authenticate+with+team+API+keys%2C+and+run+reviews+locally+or+in+CI.\u0026amp;theme=e22f71881eafb38c6197992e\u0026amp;signature=db6343abb5ddc2ca9a09f0b04bed0b8c59d858ef58df130b962a2a6e50ae7007\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"CLI \u0026amp; Team Keys - ScanDrix\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://scan-drix.mintlify.site/_mintlify/api/og/v2?division=CLI\u0026amp;title=CLI+%26+Team+Keys\u0026amp;description=Install+the+ScanDrix+CLI%2C+authenticate+with+team+API+keys%2C+and+run+reviews+locally+or+in+CI.\u0026amp;theme=e22f71881eafb38c6197992e\u0026amp;signature=db6343abb5ddc2ca9a09f0b04bed0b8c59d858ef58df130b962a2a6e50ae7007\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/scan-drix/fUG8-iwhWO9FV5Hm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ScanDrix\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EF8557\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.scandrix.dev/how-to-use/cli\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/how-to-use/cli.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.scandrix.dev/#organization\",\"name\":\"ScanDrix\",\"url\":\"https://docs.scandrix.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/scan-drix/BDKe3nzKChTtzCuX/logo/logo.png?fit=max\u0026auto=format\u0026n=BDKe3nzKChTtzCuX\u0026q=85\u0026s=e9e0574c10fe414930e9a5c8c77a5d38\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.scandrix.dev#website\",\"name\":\"ScanDrix\",\"url\":\"https://docs.scandrix.dev\",\"publisher\":{\"@id\":\"https://docs.scandrix.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.scandrix.dev/how-to-use/cli#webpage\",\"url\":\"https://docs.scandrix.dev/how-to-use/cli\",\"name\":\"CLI \u0026 Team Keys\",\"description\":\"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.\",\"dateModified\":\"2026-12-04T06:32:49.252Z\",\"isPartOf\":{\"@id\":\"https://docs.scandrix.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.scandrix.dev/how-to-use/cli#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.scandrix.dev/how-to-use/cli#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"ScanDrix\",\"item\":\"https://docs.scandrix.dev\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CLI \u0026 Team Keys\",\"item\":\"https://docs.scandrix.dev/how-to-use/cli\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.scandrix.dev/how-to-use/cli#article\",\"headline\":\"CLI \u0026 Team Keys\",\"name\":\"CLI \u0026 Team Keys\",\"description\":\"Install the ScanDrix CLI, authenticate with team API keys, and run reviews locally or in CI.\",\"url\":\"https://docs.scandrix.dev/how-to-use/cli\",\"mainEntityOfPage\":{\"@id\":\"https://docs.scandrix.dev/how-to-use/cli#webpage\"},\"dateModified\":\"2026-12-04T06:32:49.252Z\",\"publisher\":{\"@id\":\"https://docs.scandrix.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.scandrix.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ScanDrix\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ScanDrix\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/how-to-use/cli.md","siteName":"ScanDrix","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":""},{"title":"Introduction","href":"/how-to-use/overview"},{"title":"Quickstart","href":"/how-to-use/quickstart"}]},{"group":"Billing \u0026 BYOK","pages":[{"title":"Billing \u0026 Plans","href":"/how-to-use/pricing"},{"title":"Bring Your Own Key (BYOK)","href":"/how-to-use/byok"}]},{"group":"AI Code Review","pages":[{"title":"Review Flow","href":"/how-to-use/code-review/flow"},{"title":"Drixy Rules","href":"/how-to-use/code-review/drixy-rules"},{"title":"Configuration File (.scandrix.yaml)","href":"/how-to-use/code-review/scandrix-yaml"},{"title":"scandrix.yml Reference","href":"/how-to-use/code-review/configuration"},{"title":"Dry Run Testing","href":"/how-to-use/code-review/dry-run"},{"title":"Business Logic Validation","description":"Connect Jira and Linear to verify that pull requests fulfill issue requirements and acceptance criteria before merge.","href":"/how-to-use/code-review/business-logic"}]},{"group":"CLI","pages":[{"title":"CLI \u0026 Team Keys","href":"/how-to-use/cli"},{"title":"CLI Command Reference","description":"Complete command-line interface documentation for scandrix review, rules, dry-run, and authentication.","href":"/how-to-use/cli/commands"},{"title":"CI/CD Pipeline Integration","href":"/how-to-use/cli/ci-cd"}]},{"group":"Integrations","pages":[{"title":"GitHub App Setup","href":"/how-to-use/integrations/github"},{"title":"GitLab CI/CD","href":"/how-to-use/integrations/gitlab"},{"title":"Bitbucket \u0026 Azure Repos","href":"/how-to-use/integrations/bitbucket-azure"},{"title":"Jira \u0026 Linear Integration","href":"/how-to-use/integrations/jira-linear"}]},{"group":"Security \u0026 Governance","pages":[{"title":"Data Handling","href":"/how-to-use/security/data-handling"},{"title":"Single Sign-On (SAML) \u0026 RBAC","href":"/how-to-use/security/sso-rbac"}]}]},{"tab":"Self-Hosting","icon":"server","pages":[{"title":"Self-Hosting","href":"/how-to-deploy/architecture"}]},{"tab":"Knowledge Base","icon":"circle-question","pages":[{"title":"Knowledge Base","href":"/knowledge-base/introduction"}]},{"tab":"Cookbook","icon":"utensils","pages":[{"title":"Cookbook","href":"/cookbook/monorepos"}]},{"tab":"API Reference","icon":"terminal","pages":[{"title":"API Reference","href":"/api-reference/system-probes/health-diagnostics-probe"}]},{"tab":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"CLI \u0026 Team Keys - ScanDrix","deploymentId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","buildId":"dpl_XLevHnGPjzxq9mbREha5Faad63Sp","dynamics":[],"chunks":[]}