mirror of
https://github.com/aljazceru/Auditor.git
synced 2025-12-18 03:44:20 +01:00
Initial commit: TheAuditor v1.0.1 - AI-centric SAST and Code Intelligence Platform
This commit is contained in:
25
theauditor/commands/tool_versions.py
Normal file
25
theauditor/commands/tool_versions.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""Detect and record tool versions."""
|
||||
|
||||
import click
|
||||
|
||||
|
||||
@click.command("tool-versions")
|
||||
@click.option("--out-dir", default="./.pf/audit", help="Output directory")
|
||||
def tool_versions(out_dir):
|
||||
"""Detect and record tool versions."""
|
||||
from theauditor.tools import write_tools_report
|
||||
|
||||
try:
|
||||
res = write_tools_report(out_dir)
|
||||
click.echo(f"[OK] Tool versions written to {out_dir}/")
|
||||
click.echo(" - TOOLS.md (human-readable)")
|
||||
click.echo(" - tools.json (machine-readable)")
|
||||
|
||||
# Show summary
|
||||
python_found = sum(1 for v in res["python"].values() if v != "missing")
|
||||
node_found = sum(1 for v in res["node"].values() if v != "missing")
|
||||
click.echo(f" - Python tools: {python_found}/4 found")
|
||||
click.echo(f" - Node tools: {node_found}/3 found")
|
||||
except Exception as e:
|
||||
click.echo(f"Error: {e}", err=True)
|
||||
raise click.ClickException(str(e)) from e
|
||||
Reference in New Issue
Block a user