{"id":18227,"library":"codeant-cli","title":"CodeAnt CLI","description":"A command-line tool for code review and secret scanning that integrates with the CodeAnt platform. Current version is 0.4.7. It is actively developed with weekly releases. Key differentiators include: staged-only scanning, confidence-level-based exit codes (HIGH/MEDIUM/FALSE_POSITIVE), flexible file filtering via glob patterns, and easy setup as a Git pre-commit hook. The tool supports scanning staged, uncommitted, last-commit, or all changed files, and provides a login-based authentication flow with configurable API base URL.","status":"active","version":"0.4.7","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","cli","code-review","secrets"],"install":[{"cmd":"npm install codeant-cli","lang":"bash","label":"npm"},{"cmd":"yarn add codeant-cli","lang":"bash","label":"yarn"},{"cmd":"pnpm add codeant-cli","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is a CLI tool, not a library. Use via npx or global install.","wrong":"node codeant-cli.js secrets","symbol":"codeant (CLI)","correct":"npx codeant-cli secrets"}],"quickstart":{"code":"# Install globally\nnpm install -g codeant-cli\n\n# Login to CodeAnt (opens browser)\ncodeant login\n\n# Scan staged files for secrets\ncodeant secrets\n\n# Scan all changed files\ncodeant secrets --all\n\n# Scan last commit\ncodeant secrets --last-commit\n\n# Fail on MEDIUM or HIGH confidence secrets\ncodeant secrets --fail-on MEDIUM\n\n# Only scan JavaScript files\ncodeant secrets --include '**/*.js'\n\n# Exclude test files and node_modules\ncodeant secrets --exclude 'node_modules/**,*.test.*'","lang":"javascript","description":"Demonstrates global install, login, and common scanning commands with file filtering and severity threshold options."},"warnings":[{"fix":"Use --all to scan all changed files, or --uncommitted, --last-commit as appropriate.","message":"Running 'codeant secrets' without arguments only scans staged files by default.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use separate patterns per extension: --include '**/*.js' --include '**/*.ts'","message":"The --exclude and --include patterns are comma-separated and do not support multi-extension syntax correctly? Verified: works with '**/*.{js}' but not with '*.{js,ts}' as shown?","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Do not rely on FALSE_POSITIVE for blocking; set --fail-on to HIGH or MEDIUM to block real secrets.","message":"Confidence level FALSE_POSITIVE is always ignored and never blocks the build.","severity":"gotcha","affected_versions":">=0.4.7"},{"fix":"Use CODEANT_API_BASE_URL env var instead of set-base-url command for CI/CD.","message":"The config file is stored in ~/.codeant/config.json; environment variables override config values.","severity":"gotcha","affected_versions":">=0.4.7"},{"fix":"Set CODEANT_API_TOKEN environment variable directly to bypass login.","message":"Login requires a browser; headless environments may fail.","severity":"gotcha","affected_versions":">=0.4.7"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install -g codeant-cli' or use 'npx codeant-cli'","cause":"CLI not installed globally or not in PATH.","error":"codeant: command not found"},{"fix":"Run 'codeant login' or set CODEANT_API_TOKEN environment variable.","cause":"User is not logged in and no token is set.","error":"Error: Not authenticated. Please run 'codeant login'."},{"fix":"Verify internet connectivity and check API URL with 'codeant get-base-url' or set CODEANT_API_BASE_URL env var.","cause":"Network issue or incorrect API base URL.","error":"Error: Failed to fetch api endpoint. Please check your internet connection."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}