Skip to main content

Authentication

login

Authenticate with CodeAnt AI. Opens a browser window for login.
codeant login

logout

Log out from CodeAnt AI.
codeant logout

Secret Scanning

secrets

Scan your code for exposed secrets, API keys, and credentials.
codeant secrets [options]
Options:
OptionDescription
--stagedScan only staged files (default)
--allScan all changed files compared to base branch
--uncommittedScan all uncommitted changes
--last-commitScan files from the last commit
--fail-on <level>Fail only on HIGH, MEDIUM, or all (default: HIGH)
Examples: Scan staged files (default):
codeant secrets
Scan all changed files:
codeant secrets --all
Scan the last commit:
codeant secrets --last-commit
Only fail on HIGH confidence secrets (default):
codeant secrets --fail-on HIGH
Fail on HIGH and MEDIUM confidence secrets:
codeant secrets --fail-on MEDIUM
Fail on all secrets except false positives:
codeant secrets --fail-on all
Exit Codes:
  • 0 - No blocking secrets found (or only false positives)
  • 1 - Secrets detected that match the --fail-on threshold
Confidence Levels:
  • HIGH - High confidence, likely a real secret
  • MEDIUM - Medium confidence, may need review
  • FALSE_POSITIVE - Detected but likely not a real secret (always ignored)

Configuration

set-base-url

Set a custom API base URL.
codeant set-base-url https://api.example.com

get-base-url

Show the current API base URL and its source.
codeant get-base-url

Global Options

codeant --version    # Show version
codeant --help       # Show help

Example Output

Secrets Found (Blocking):
✗ 2 secret(s) found!

src/config.js
  Line 5: AWS Access Key (HIGH)
  Line 12: API Key (HIGH)

Remove secrets before committing.
Only False Positives (Non-blocking):
⚠ 1 potential secret(s) found (ignored)

Ignored (false positives):
  src/example.js
    Line 10: Generic Secret (FALSE_POSITIVE)

✓ Commit allowed (only false positives found)
No Secrets:
✓ No secrets found

Configuration File

Configuration is stored in ~/.codeant/config.json. You can also use environment variables:
VariableDescription
CODEANT_API_URLAPI base URL (overrides config)
CODEANT_API_TOKENAuthentication token (overrides config)
Priority Order:
  1. Environment variables (highest)
  2. Config file (~/.codeant/config.json)
  3. Default values