Skip to main content

Quick Start Example

The simplest way to use KafkaCode:

Example 1: First Scan

Let’s scan a simple project:
Run the scan:
Output:

Example 2: Fixing Issues

Before (Grade: B-)

src/config.js:

After (Grade: A+)

Create .env file:
Update src/config.js:
Rescan:
New Output:

Example 3: Verbose Mode

For detailed progress information:
Output:

Example 4: CI/CD Integration

package.json Script

Usage:

Pre-commit Hook

Create .git/hooks/pre-commit:
Make it executable:

Example 5: Using npx

No installation required:

Common Scenarios

Scenario 1: New Project Setup

Scenario 2: Before Deployment

Scenario 3: Scan Specific Files

Next Steps

GitHub Actions

Automate with GitHub Actions

GitLab CI

Integrate with GitLab CI

Pre-commit Hook

Set up pre-commit scanning

CLI Options

Explore all options