Get started in minutes

Codewalk is open source and runs locally. Install the Python backend, start the API server, and analyze any repo from its working directory.

git clone https://github.com/gupta29470/codewalk.git

Quick Start

1

Clone Codewalk

Clone the open-source repo and create a Python virtual environment.

git clone https://github.com/gupta29470/codewalk.git
cd codewalk
python3 -m venv .codewalk-env
2

Install Dependencies

Install Python requirements. Configure LLM keys only if using a cloud provider.

source .codewalk-env/bin/activate
pip install -r requirements.txt
cp env.local.example.txt .env
3

Start the API

Run the FastAPI server on port 8000.

source .codewalk-env/bin/activate
uvicorn src.codewalk.api.main:app --reload --port 8000
4

Analyze a Repo

Run from inside the repo you want to analyze. The repo is discovered from cwd via codewalk.yaml.

cd /path/to/target-repo
curl -X POST http://localhost:8000/analyze -H "Content-Type: application/json" -d '{"index_mode":"auto"}'

Interface Options

Cloud Indexing

Indexing on your server. Query everywhere.

Codewalk is open source, so you can deploy the cloud component to your own infrastructure. Connect a GitHub App to your Codewalk server, push to any repo, and the server builds the index incrementally. Every team member downloads the index via MCP and queries it locally — no per-user embedding cost, no stale local indexes, no code leaving the team unless you want it to.

1. Deploy Codewalk server to your infra
2. Install GitHub App on the repo
3. Push triggers register + index
4. Server atomic-swaps the new index
5. Per-repo tokens secure downloads
6. MCP pulls index → local query

Because the index lives on your server, you can centralize compute for the team: one machine embeds, everyone else pulls and queries. The MCP client still runs locally, so actual code questions are answered on the user's laptop using the downloaded index.

MCP Tools

Codewalk exposes 38 tools through the Model Context Protocol. The AI agent (Copilot, Claude, Cursor) calls most of them automatically; a few are approval or voice steps for the human.

Setup & Query

ToolWhat it does
codewalk_analyze_codebaseScan, chunk, embed, and build the dependency graph in one call.
codewalk_get_overviewProject summary, tech stack, modules, riskiest files, and dependency diagram.
codewalk_search_codebaseSemantic code search over embedded chunks.
codewalk_lookup_symbolFind definitions and references of a named function, class, or method.
codewalk_get_module_infoInspect a module: files, languages, dependencies, blast radius.
codewalk_explain_functionAI explanation of what a function does.
codewalk_explain_classAI explanation of what a class does.
codewalk_get_blast_radius_mapFiles and modules affected by changing a target file or module.
codewalk_find_circular_dependenciesDetect import cycles and suggested fixes.
codewalk_get_reading_orderOptimal file reading sequence via topological sort.
codewalk_get_execution_flowModule/file dependency chains and entry points.
codewalk_get_architecture_healthGraph stats, bottlenecks, PageRank, cycle detection.
codewalk_call_chainTrace the shortest import path between two files.
codewalk_show_knowledge_graphExport graph data for visualization.
codewalk_index_docsIndex team docs (.md, .pdf, .txt) into the vector store.
codewalk_search_docsSearch indexed team docs.
codewalk_ask_docsRAG answer grounded in indexed docs with citations.

Review & Human-in-the-Loop

ToolWhat it does
codewalk_run_reviewReview git diff with architecture context and security checks.
codewalk_review_fileRun the full review pipeline on a single file.
codewalk_get_stack_infoDetect language/framework stack signals.
codewalk_get_review_detailsRetrieve persisted findings for a review session.
codewalk_load_guidelinesLoad team coding standards into the review context.
codewalk_finding_verdictAccept or reject a review finding.
codewalk_apply_acceptedApply all accepted findings from a session.
codewalk_approve_actionHuman-in-the-loop approval gate; returns approval token.
codewalk_apply_fixApply a single fix using an approval token.
codewalk_verify_fixRun static analysis and tests after applying fixes.

Maintenance

ToolWhat it does
codewalk_generate_configCreate a stack-specific codewalk.yaml with sensible excludes.
codewalk_incremental_reindexRe-embed only changed files using content hashes.
codewalk_refresh_analysisRe-scan files and rebuild graph without re-embedding.
codewalk_run_static_analysisRun ruff/mypy/eslint/etc. on given files.
codewalk_run_testsAuto-detect and run pytest/npm test/etc. for given files.

Cloud & Voice

ToolWhat it does
codewalk_pull_indexDownload the latest index from your Codewalk server.
codewalk_connect_repoOne-step cloud setup for a repo.
codewalk_index_statusCompare local vs cloud index version.
codewalk_check_versionServer health and version check.
codewalk_voice_askRecord voice, transcribe, and route to the right tool.
codewalk_speakSpeak a summary aloud via text-to-speech.

API Endpoints

Base URL: http://localhost:8000 (or your deployed Codewalk server).

Analysis

MethodEndpointDescription
POST/analyzeIndex a codebase. Repo discovered from cwd via codewalk.yaml.
POST/analyze/streamIndex a codebase with Server-Sent Events progress.
GET/index-statusCheck whether the current workspace is indexed.

Views, Chat & Search

MethodEndpointDescription
GET/overviewProject overview with tech stack, modules, and riskiest files.
GET/modulesList all modules.
GET/modules/{name}Details for one module.
GET/blast-radiusTop 15 riskiest files.
GET/blast-radius/{module}Blast radius for a module or file.
GET/reading-orderRecommended reading order via topological sort.
GET/execution-flowModule/file dependency flow.
GET/architectureArchitecture health: centrality, cycles, bottlenecks.
GET/cyclesCircular dependencies.
POST/chatAsk the AI agent a question.
POST/chat/streamStreaming chat response.
POST/semantic-searchSemantic search over embedded code chunks.
POST/rag/expand-queryLLM query expansion for RAG.
POST/rag/rerankLLM chunk reranking.
POST/rag/symbol-lookupSymbol lookup via DuckDB.

Review & Voice

MethodEndpointDescription
POST/reviewReview git diff. Works with or without an index.
POST/review/streamReview git diff with SSE progress.
POST/review/cancelCancel a running review.
POST/review/fileReview a single file.
POST/review/guidelinesLoad team coding guidelines.
POST/review/verdictAccept or reject a finding.
POST/review/apply-acceptedApply all accepted findings.
POST/review/applyApply a single fix after approval.
POST/voice/askVoice-in, voice-out Q&A.

Docs & Maintenance

MethodEndpointDescription
POST/docs/indexIndex team docs.
POST/docs/searchSearch indexed docs.
POST/docs/askAsk a question over indexed docs.
POST/refreshRe-scan without re-embedding.
POST/incremental-reindexRe-embed only changed files.
POST/tools/static-analysisRun ruff/mypy/eslint/etc.
POST/tools/run-testsRun pytest/npm test/etc.
POST/chat/approveApprove or reject an interrupted agent action.
POST/researchDeep research over the codebase.
GET/versionCodewalk version and commit info.
GET/stalenessLocal vs cloud index staleness.
GET/healthHealth check.

Common patterns

First-time setup
POST /analyze {"index_mode":"auto"}

Scans files, chunks, embeds, and builds the dependency graph. On subsequent runs, auto skips unchanged work.

Ask a question
POST /chat {"message":"Explain auth","thread_id":"t1"}

Multi-turn agent with memory. Answers cite real files and line numbers.

Review before merge
POST /review {"target_branch":"main"}

Works with or without an index. Returns severity, categories, and fix suggestions.

After code changes
POST /refresh then POST /incremental-reindex

Refresh rebuilds graph metadata without re-embedding. Incremental reindex only re-embeds changed files by content hash.

Next steps