Skip to main content

CLI Overview

Commands

CommandDescriptionAuth Required
npx depfixerSmart analysis with fix flowNo (audit) → Yes (fix)
npx depfixer migrateInteractive framework migrationYes
npx depfixer fixApply fixes from previous analysisYes
npx depfixer loginAuthenticate with DepFixerNo
npx depfixer logoutClear stored credentialsNo
npx depfixer whoamiShow account informationYes

Global Options

OptionDescription
--path <dir>Project directory (default: current directory)
--jsonOutput results as JSON
--ciCI mode with exit codes
-v, --versionShow version number
-h, --helpShow help

Environment Variables

VariableDescription
DEPFIXER_TOKENAPI key for CI/CD pipelines (see CI Mode)

Exit Codes

CodeMeaning
0Success - no issues or all issues fixed
1Issues found (critical/high severity in CI mode)
2Critical error (auth failure, network error)

Examples

Basic Analysis

# Analyze current directory
npx depfixer

# Analyze specific project
npx depfixer --path ./my-project

CI Integration

# Run in CI with exit codes
npx depfixer --ci

# JSON output for parsing
npx depfixer --json

Migration

# Interactive framework upgrade
npx depfixer migrate

Authentication

# Log in
npx depfixer login

# Check account
npx depfixer whoami

# Log out
npx depfixer logout

Requirements

  • Node.js: 18.0.0 or higher
  • npm: 8.0.0 or higher (for npx)