In this practical tutorial, we walk through using Repowise to create repository-level intelligence for the itsdangerous Python project. Starting with a cloned repository, we configure Repowise with LLM credentials, initialize the indexing pipeline, and explore the generated artifacts.
Setting Up Repowise
First, we import required libraries, set the target repository path, and move into the project directory. A helper function sh() runs shell commands and captures output cleanly. We check for available API keys (Anthropic or OpenAI) and write a configuration file:
provider: anthropic
model: claude-sonnet-4-5
embedding_model: voyage-3
reasoning: auto
git:
co_change_commit_limit: 200
blame_enabled: true
dead_code:
enabled: true
safe_to_delete_threshold: 0.7
maintenance:
cascade_budget: 10
We then run repowise init . to kick off indexing.
Graph Intelligence
After indexing, we inspect the .repowise artifact tree and load the repository graph using NetworkX. The graph reveals nodes and edges representing code dependencies. We compute PageRank to identify the most influential nodes and run community detection to understand codebase structure:
- PageRank highlights critical files.
- Community detection groups related modules.
Git & Document Intelligence
repowise status provides Git-aware insights. With an LLM key, we can search the codebase naturally ("URL-safe token signing") and ask questions like "How does Signer detect tampered payloads?"
Dead-Code Detection
We run repowise dead-code to find unused code, then --safe-only to list only high-confidence removals.
Architectural Decisions
We add an inline decision in signer.py:
# DECISION: Signers are stateless by design — secrets are passed at
# construction so signing can be parallelised safely.
After committing, we run repowise update . and check the decision list and health.
CLAUDE.md Generation
repowise generate-claude-md produces a structured summary of the repository, useful for AI assistants.
MCP Tools via CLI
Finally, we test MCP-style tools like get_dead_code, search_codebase, and get_overview through the command line, enabling interactive code intelligence.
This tutorial demonstrates how Repowise turns a static codebase into a navigable, queryable knowledge graph — essential for large-scale code maintenance and collaboration.