Skip to content

firmis init - Set Up Firmis in Your Project

You just heard about Firmis and you want to know if your AI stack is safe. firmis init answers that question in under 30 seconds - no config, no docs, no signup.

Terminal window
firmis init [path]

If [path] is omitted, Firmis initializes in the current directory.

firmis init is the fastest path from zero to your first security result. It detects every AI platform in your project, runs a full scan against all 324 detection rules across 21 threat categories, writes a .firmisrc.json config file, and shows you what to do next based on what was found.

If .firmisrc.json already exists, init uses the existing file rather than overwriting it, so it is safe to re-run.

After firmis init, your workflow continues with firmis scan for deeper analysis, firmis fix to apply remediations, and firmis ci to add a security gate to your pipeline.

  1. Detects your AI tools - auto-discovers Claude Skills, MCP Servers, Cursor Rules, and more platforms
  2. Runs a security scan - all detection rules across threat categories
  3. Shows your results - finding counts by bucket (confirmed, hardening, unverified)
  4. Generates .firmisrc.json - config file with your detected platforms and sensible defaults
  5. Captures MCP server baselines - records the current state of your MCP servers for drift detection
  6. Offers to install security hooks - optional pre-commit hooks that scan before each commit
  7. Generates HTML report - auto-generates firmis-report.html and opens it in your browser
  8. Syncs to cloud - if you are logged in, results are synced to your workspace
  9. Shows next steps - what to do based on your results, free and pro
Terminal
npx firmis-cli init

Initialize in a specific project directory

Section titled “Initialize in a specific project directory”
Terminal
npx firmis-cli init ./my-agent-project

Re-run after deleting config to reset detected platforms

Section titled “Re-run after deleting config to reset detected platforms”
Terminal
rm .firmisrc.json
npx firmis-cli init
Terminal
Firmis Scanner
Detecting AI tools...
✓ Claude Skills: 5 components
✓ MCP Servers: 3 components
✓ Cursor Extensions: 2 components
Scanning...
12 findings
3 known vulnerabilities 5 fixable 4 findings
✓ Config written to .firmisrc.json
12 patterns need verification
firmis login to get 50 AI credits/month
Then run firmis scan --deep to verify patterns
Scan complete. Run firmis scan --html for the full report.
Next: firmis fix .

firmis init writes a .firmisrc.json in your project root:

.firmisrc.json
{
"platforms": ["claude", "mcp", "cursor"],
"severity": "low",
"failOn": "high",
"exclude": ["node_modules", ".git", "dist", "build"]
}

This file is picked up automatically by firmis scan and firmis ci on subsequent runs.

If .firmisrc.json already exists, firmis init prints a note and uses the existing config rather than overwriting it. The scan and summary still run.

Delete the file first if you want to regenerate the config from scratch based on re-detected platforms.

firmis init takes no flags beyond the optional path argument. Configuration happens in .firmisrc.json after the first run.

CodeMeaning
0Init completed. Config written (or existing config used).
1No platforms detected, or scan error.

After running firmis init, your most useful next steps depend on what was found:

SituationNext commandWhy
You want to see the full reportfirmis scan --htmlInteractive HTML with evidence and remediation
You want CI protectionfirmis ciFails builds on high/critical threats
You want a README badgefirmis badgeShows your security grade publicly
You want to fix threatsfirmis fixAuto-remediates fixable findings
You want runtime monitoringfirmis monitor --installWatches tool calls in real-time
  • scan - run subsequent scans with full options
  • fix - apply remediations after your first scan
  • ci - add a security gate to your CI pipeline