Local code complexity tracking and analytics VS Code extension
CodePulse is a VS Code extension that tracks cyclomatic and cognitive complexity in real-time as you write and save code. It parses your files locally using Tree-sitter WASM and stores historical trends in a lightweight SQLite database, offering actionable refactoring suggestions and interactive visual dashboards.
- Node.js 24 or higher
- pnpm 9.0.0 or higher
- VS Code 1.125.0 or higher
-
Clone the repository:
git clone https://github.com/BleckWolf25/CodePulse.git cd CodePulse -
Install dependencies:
pnpm install
-
Start the compilation/build process:
pnpm run compile
-
Launch the extension in VS Code:
- Open the project in VS Code:
code . - Press
F5to open a Development Host window with the extension loaded.
- Open the project in VS Code:
pnpm compile- Compile TypeScript and build the Svelte webview using Vitepnpm watch- Start TypeScript compiler in watch modepnpm lint- Run ESLint on the codebasepnpm test- Run automated VS Code integration and unit tests
CodePulse/
├── .vscode-test/ # Compiled tests (generated)
├── out/ # Compiled files (generated)
├── src/
│ ├── database/ # SQLite/sql.js local storage manager
│ ├── editor/ # CodeLens and Hover providers
│ ├── parser/ # Tree-sitter WASM runtime, AST walking & complexity analyzer
│ ├── webview/ # Svelte-based real-time analytics dashboard
│ ├── extension.ts # Extension lifecycle activation & message broker
│ └── types.ts # Shared Type definitions
├── .editorconfig # EditorConfig configuration
├── .gitignore # gitignore configuration
├── .npmrc # node configuration
├── .prettierrc # prettier configuration
├── .vscode-test.mjs # vscode tests configuration
├── .vscodeignore # vscode ignore configuration
├── package.json
├── tsconfig.json # Typescript configuration
└── eslint.config.mjs # ESLint configurationThe project uses VS Code test harnesses to run unit and integration tests.
pnpm testContributions are welcome! Please read our Contributing Guidelines before submitting a pull request.
By participating in this project, you agree to abide by our Code of Conduct.
This project is licensed under the MIT License - see the LICENSE file for details.
For security concerns, please review our Security Policy.
For questions or support, please open an issue on GitHub or contact joao.coutinho08@icloud.com.
Built with ❤️ using Svelte, Vite, TypeScript, and Tree-sitter