Hybrid Node + Python toolkit for repository analysis and code quality.
TypeScript on the outside, Python on the inside.
@kazekaze93/repo-inquisitor is a comprehensive audit and analysis toolkit that:
- Bridges Node ↔ Python via a thin
child_processwrapper (PythonBridge). - Bootstraps a Python venv on install (
scripts/install.js+requirements.txt). - Exposes a CLI entrypoint
inquisitorwith multiple analysis commands. - Provides code analysis tools (dead code detection, dependency cleanup, style checking).
- Includes AI-powered code review using Gemini API.
- Features dependency visualization and context packing for AI models.
The goal is to keep the integration minimal and explicit, not to build Yet Another Framework™.
- Node side: TypeScript, compiled to
dist/. Public surface is insrc/index.ts. - Python side: Plain Python scripts in
python_src/(and subpackages), executed as child processes. - Bridge:
PythonBridgelooks for a localvenvfirst, then falls back topython/python3inPATH. - CLI:
bin.inquisitor -> dist/cli.js→ resolves a command → picks a Python script → runs it via the bridge.
No hidden daemons, no sockets, just spawn(python, script.py, args...) and a bit of JSON parsing.
Install from npm (or from Git if you prefer):
npm install @kazekaze93/repo-inquisitor
# or
npm install git+ssh://[email protected]:YOUR_ORG/repo-inquisitor.gitOn install, the postinstall hook will try to set up Python via scripts/install.js.
If that fails (no Python, corporate laptop, etc.), you can run it manually:
npm run setup:pythonThe setup script will:
- Check that Python 3 is available in
PATH. - Create a
venvin the project root. - Install dependencies from
requirements.txt(if/when you add them).
import { PythonBridge } from "@kazekaze93/repo-inquisitor";
const bridge = new PythonBridge();
async function run() {
const result = await bridge.executeScript("/absolute/path/to/script.py", [
"arg1",
"arg2",
]);
if (result.success) {
console.log("Python data:", result.data);
} else {
console.error("Python error:", result.error);
}
}
run().catch((err) => {
console.error("Bridge failure:", err);
});The bridge assumes that the Python script:
- Prints logs as normal stdout lines.
- Prints JSON on the last line (parsed into
result.data).
After installing, you get an inquisitor binary on your PATH:
npx inquisitor <command> [...args]-
analyze- Analyze file statistics and types (Python)inquisitor analyze ./src
-
police- Scan for forbidden patterns & styles (Python)inquisitor police ./src
-
review- AI Code Reviewer using Gemini + GitHub (Python)# Requires GEMINI_API_KEY and GITHUB_TOKEN environment variables inquisitor review
-
audit- Find dead code and over-abstractions (Node)inquisitor audit
-
detox- Analyze and clean unused dependencies (Node)inquisitor detox
-
viz- Start interactive dependency visualizer (Node)inquisitor viz
-
ctx- Pack full project context for Gemini 2.5 (Node)inquisitor ctx:pack
Run inquisitor --help to see all available commands with descriptions.
- Node.js: v18+
- Python: 3.10+ recommended, available in
PATHaspython(Windows) orpython3(Unix). - OS: Works on Windows, macOS, and Linux.
-
Clone the repo.
-
Run
npm install(installs TS deps and runs Python setup). -
If Python setup fails, run
npm run setup:pythonmanually. -
Build TypeScript:
npm run build
-
Do not commit
venv/or__pycache__/.
repo-inquisitor/
├── src/ # TypeScript source
│ ├── cli.ts # CLI entrypoint and command registry
│ ├── bridge.ts # PythonBridge implementation
│ ├── ai/ # AI context packing utilities
│ ├── analysis/ # Node.js analysis tools (audit, detox)
│ └── viz/ # Dependency visualization server
├── python_src/ # Python scripts
│ ├── analyzer.py # File statistics analyzer
│ ├── police.py # Pattern/style scanner
│ └── reviewer/ # AI code reviewer
├── bin/ # Binary symlinks (inq-audit, inq-detox, etc.)
└── dist/ # Compiled TypeScript output
- If Python is not in
PATH, the install/setup scripts will fail fast on purpose. - The
reviewcommand requiresGEMINI_API_KEYandGITHUB_TOKENenvironment variables. - Commands can be extended or modified in
src/cli.tsby updating theCOMMANDSregistry. requirements.txtshould contain only the Python dependencies you actually use.