Skip to content

feat: Support offline and static-only analysis mode (--no-ai / --static) #30

Description

@CodeMaverick-143

Feature Request

Add a --no-ai (or --static) flag to allow running Insight completely offline without requiring any Google API key or network connection.

Rationale

  • Users often want to quickly inspect a codebase for static metrics (lines of code, functions, classes, imports, comments) without calling an external LLM.
  • Useful for air-gapped environments, CI pipelines, and developers who don't have or don't want to use an AI API key.

Proposed CLI Usage

insight . --no-ai
# or
insight . --static

Implementation Details

  • Add --no-ai / --static argument to insight/cli.py.
  • In analyzer.py, if no_ai=True, skip calling explain_code() and set explanation = "AI explanation disabled (--no-ai flag used)." and ai_score = None.
  • Do not check or require GOOGLE_API_KEY when this flag is active.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions