Flattening for AI, Context for understanding, and Grading for quality.
RikaiCode is a sophisticated, browser-based tool designed to turn complex codebases into structured, actionable data. Whether you need to feed code into an LLM, audit a project's quality, or simply understand a new architecture, RikaiCode provides the insights you need in a beautiful, dark-themed interface.
Seamlessly analyze public GitHub or GitLab repositories, or upload local files and ZIP folders. It handles large repositories by automatically skipping binary files and non-text assets to ensure optimal performance.
RikaiCode assigns a unified grade (A++ to C) to every project. This isn't just a random score; it's calculated using a weighted algorithm based on industry standards for software health.
Integrated with the GLM-4.7-Flash model, RikaiCode acts as your personal code architect. It can summarize entire projects, explain complex functions, and generate onboarding guides.
Automatically scans code for potential vulnerabilities, including:
- Hardcoded AWS Access Keys.
- Generic API Keys/Secrets.
- Private SSH Keys (RSA, DSA, EC, OpenSSH).
Transforms raw git data into interactive visualizations:
- Treemaps: File extension distribution.
- Pie Charts: Code composition.
- Heatmaps: Commit activity by hour and day of the week.
Export your entire flattened codebase into a single file for LLM context. Supported formats: TXT, JSON, PDF, DOCX, HTML, Markdown, LaTeX.
- Select Source: Choose between GitHub URL, GitLab URL, or Upload Files.
- Analyze:
- If using a URL, click "Fetch Repository".
- If uploading, drag and drop your files.
- Explore: View the repository grade, architecture diagram, security alerts, and code statistics.
- AI Insights: Expand the "Rikai AI Analysis" section to generate architectural summaries.
- Export: Use the export buttons at the bottom to download the flattened context.
The following preview screenshots showing all the availbale features.

AI-generated architecture summary / code review and Repository code Flattener.

RikaiCode uses a 100-point scoring system. The grade is determined by summing points across five key categories. The system switches between Remote Analysis (for GitHub/GitLab) and Static Analysis (for local files).
| Category | Weight | Criteria & Calculation |
|---|---|---|
| Popularity | 30 pts | Based on Stars (0-20 pts) and Fork Ratio (0-10 pts). High stars indicate trust; a healthy fork ratio implies utility. |
| Activity | 25 pts | Measures Recency (0-15 pts) and Commit Frequency (0-10 pts). Recent commits score higher. |
| Maintenance | 20 pts | Analyzes Open Issues Ratio and PR/MR Merge Rate. Low open issues and high merge rates indicate active maintenance. |
| Community | 15 pts | Based on the number of Watchers. Higher watchers mean more community interest. |
| Stability | 10 pts | Penalizes archived repositories. Active projects get full points. |
| Category | Weight | Criteria & Calculation |
|---|---|---|
| Documentation | 30 pts | Checks for README files (10 pts) and Comment Density (20 pts). Higher comment-to-code ratios score better. |
| Structure | 30 pts | Modularity (avg lines per file) and Organization (presence of entry points like main.py or index.js). |
| Best Practices | 20 pts | Presence of dependency files (15 pts) and .gitignore (5 pts). |
| Scale | 10 pts | Total lines of code. Larger, mature projects score slightly higher. |
| Stability | 10 pts | Based on file count. More files often imply a structured, multi-module project. |
- A++ (95+): Exceptional quality, highly active, massive community trust.
- A+ (90-94): Excellent project, strong metrics.
- A (80-89): Great project, reliable.
- B+ (70-79): Good, but might lack activity or popularity.
- B (60-69): Fair quality.
- C+ (50-59): Average, potential maintenance issues.
- C (<50): Low score, use with caution.
RikaiCode leverages the GLM-4.7-Flash model to provide intelligent insights that go beyond simple statistics.
| AI Feature | Description |
|---|---|
| Architecture Overview | Analyzes the file tree and README to identify the architectural pattern (e.g., MVC, Microservices) and summarize the project's purpose. |
| Project Synopsis | Generates an "Executive Summary" including the problem statement, target audience, and key features. Perfect for quickly understanding a new codebase. |
| Interactive Code Review | Select any file to receive a detailed review covering strengths, improvements, security checks, and style tips. |
| Function Explainer | Specifically for Python code. Select a function, and Rikai will explain its inputs, outputs, logic, and potential edge cases. |
| Complexity Analysis | Estimates the technical debt and complexity level (Low to Critical) based on file sizes and structure. |
| Refactoring Ideas | Suggests design patterns (Factory, Singleton) and modern frameworks that could improve the codebase. |
| Developer Onboarding | Creates a "Getting Started" guide with installation steps, configuration, and run commands based on the detected infrastructure. |
| Dependency Insights | Analyzes requirements.txt or package.json to flag potential outdated packages or security risks. |
RikaiCode is versatile and built for developers, security researchers, and data scientists.
-
LLM Context Preparation: Flatten entire repositories into a single text file (TXT/JSON) to use as context for Large Language Models like ChatGPT, Claude, or Gemini. It strips away unnecessary binaries and formats the code perfectly for AI consumption.
-
Code Quality & Grading: Get an instant "Health Score" for any public repository. Analyze commit frequency, issue ratios, and maintenance activity before using an open-source dependency.
-
Security Audits: Run quick heuristic scans to detect hardcoded API keys, AWS secrets, or private keys before pushing code to a public platform.
-
Architecture Onboarding: New team members can visualize the file structure, detect dependencies, and read AI-generated summaries to understand a project's architecture in minutes rather than hours.
RikaiCode offers flexible deployment options to suit your workflow.
You can directly run the already hosted streamlit Online at: https://rikaicode.streamlit.app
- Note: Online deployments may have timeout limits for very large repositories.
For power users and large-scale analysis, hosting RikaiCode locally on your machine is recommended.
- Best for: Huge repositories (10,000+ lines), private codebases, and heavy AI analysis tasks.
- Privacy: Your code stays on your machine. No data is uploaded to third-party servers (unless you explicitly use the AI analysis features).
- Performance: No execution time limits; handle massive ZIP files and deep scanning without interruption.
Follow these steps to run RikaiCode locally on your machine.
- Python 3.11 or higher
- pip (Python package installer)
git clone https://github.com/aurumz-rgb/RikaiCode.git
cd RikaiCodeThis keeps your project dependencies isolated.
macOS / Linux:
python3 -m venv venv
source venv/bin/activateWindows:
python -m venv venv
.\venv\Scripts\activateInstall all required libraries using the requirements.txt file.
pip install -r requirements.txtTo enable AI features, you need a ZhipuAI API key.
- Create a file named
.envin the project root folder. - Add your API key to the file:
ZHIPUAI_API_KEY=your_actual_api_key_here
- Save the file.
Once the setup is complete, launch the app using the Streamlit command:
streamlit run app.pyThe application will open automatically in your default web browser at http://localhost:8501.
RikaiCode is built on a modular architecture designed for maintainability and scalability. The application is split into 5 core components:
app.py: The main entry point. Handles the Streamlit UI rendering, session state management, and user interactions.config.py: Centralized configuration. Manages CSS styling, page setup, constants (like file extensions to skip), and helper utilities.processing.py: The data layer. Responsible for fetching data from GitHub/GitLab APIs, handling ZIP extractions, and processing uploaded files.analysis.py: The logic layer. Contains the grading algorithms, security scanners, dependency detectors, and AI integration functions.export.py: The output layer. Generates downloadable reports in various formats (PDF, DOCX, JSON, etc.).
Z.ai GitHub: zai-org
I gratefully acknowledge the developers of GLM (Z.ai) for providing the open-source AI model used in RikaiCode.
For more information, please see the GLM-4.7-Flash Hugging Face.
This project is licensed under the AGPL 3.0 License - see the LICENSE file for details.
Questions, feedback, or collaboration ideas? Reach out at pteroisvolitans12@gmail.com or open an issue on GitHub.
Contributions are always welcome!
Made with π€ by Aurumz


