Basic Usage
The most common way to use KafkaCode is with thescan command:
Scanning Your Project
- Current Directory
- Specific Directory
- With npx
Scan the current directory and all subdirectories:
Understanding the Output
Scan Summary
Every scan starts with a summary section:- Directory: Path that was scanned
- Timestamp: When the scan was performed
- Files Scanned: Number of source files analyzed
- Total Issues: Count of all findings
- Privacy Grade: Overall grade (A+ to F)
Issue Listings
Issues are grouped by severity:- File path: Location of the issue
- Line number: Exact line where issue was found
- Description: What was detected
- Code snippet: The problematic code
- Recommendation: How to fix it
Verbose Mode
Get detailed progress information during scanning:Verbose mode is helpful for:
- Understanding what KafkaCode is doing
- Debugging issues
- Monitoring progress on large codebases
Exit Codes
KafkaCode uses exit codes to indicate results:
Use in scripts:
Common Scenarios
Scenario 1: Quick Project Check
Scenario 2: Scan Before Commit
Scenario 3: Focus on Specific Directory
Scenario 4: Multiple Directory Scan
What Files Are Scanned?
Included Files
KafkaCode automatically scans these file types:Python
*.pyJavaScript
*.js, *.jsxTypeScript
*.ts, *.tsxJava
*.javaGo
*.goRuby
*.rbPHP
*.phpExcluded Files & Directories
Automatically skipped: Version Control:.git/.svn/.hg/
node_modules/vendor/bower_components/
venv/.venv/env/__pycache__/.pytest_cache/.mypy_cache/
build/dist/target/out/.next/.nuxt/
coverage/.coverage/
.gitignore
Gitignore Support
KafkaCode automatically respects your.gitignore file:
Performance Tips
Scan Specific Directories
Scan Specific Directories
Instead of scanning the entire project, target specific directories:
Use .gitignore Effectively
Use .gitignore Effectively
Add large directories to
.gitignore:Monitor Scan Time
Monitor Scan Time
Use Typical performance:
time to measure performance:- Small project (< 100 files): 2-5 seconds
- Medium project (100-1000 files): 10-30 seconds
- Large project (> 1000 files): 30-120 seconds
Interpreting Results
No Issues Found
Minor Issues Found
Critical Issues Found
Next Steps
CLI Options
Explore all command-line options
Interpreting Results
Learn to read and act on reports
CI/CD Integration
Automate scanning in your pipeline
Examples
See real-world usage examples

