|
2 | 2 |
|
3 | 3 | ## 📝 Introduction |
4 | 4 |
|
5 | | -AI Code Context Helper is a lightweight desktop application designed for anyone who needs to understand, learn, or develop code. Whether you're a programming beginner, professional developer, or educator, it helps you easily extract code context and communicate efficiently with AI assistants. Through visual project structure displays and one-click code export, it makes understanding complex code, getting AI programming suggestions, and conducting code reviews unprecedentedly simple. This powerful yet simple tool accelerates the learning curve for beginners while improving productivity for professional developers, regardless of whether you're learning code, developing new features, or seeking improvement suggestions. |
| 5 | +AI Code Context Helper is designed for anyone who needs to understand, learn, and develop code. Through visualized project structure display and one-click code export, whether you're a programming beginner, professional developer, or educator, whether you're learning to understand code, developing new features, or seeking code improvement suggestions, it helps you easily extract code context and communicate efficiently with AI assistants. |
6 | 6 |
|
7 | 7 | <p align="center"> |
8 | | - <img src="./_images/app_overview.png" width="50%" alt="Application overview screenshot"> |
| 8 | + <img src="./_images/app_en.gif" width="50%" alt="Demo GIF"> |
9 | 9 | </p> |
10 | 10 |
|
11 | | -<p align="center"> |
12 | | - <img src="./_images/app.gif" width="50%" alt="Animation"> |
13 | | -</p> |
14 | | - |
15 | | -## 👥 Target Users |
16 | | - |
17 | | -- **Programming Beginners**: Understand open-source project structures and code logic through AI, accelerating your learning curve |
18 | | -- **Software Developers**: Seamlessly integrate AI programming assistants into existing workflows to improve development efficiency |
19 | | -- **Code Reviewers**: Quickly extract project module code and leverage AI for quality reviews and optimization suggestions |
20 | | -- **Technical Educators**: Explain code structures and implementation details more effectively as teaching aids |
21 | | -- **Open Source Contributors**: Rapidly familiarize yourself with new project codebases, lowering barriers to contribution |
22 | | - |
23 | | -## 🎯 Key Application Scenarios |
24 | | - |
25 | | -This tool allows you to easily pass code context to AI assistants for: |
| 11 | +## 🎯 Main Application Scenarios |
26 | 12 |
|
27 | | -- **Code Learning**: Understanding complex project structures and mechanisms, improving learning efficiency |
28 | | -- **Development Assistance**: Getting more accurate code modification and feature implementation suggestions |
29 | | -- **Code Reviews**: Conducting automated quality checks and performance optimization analysis |
30 | | -- **Refactoring Guidance**: Receiving code improvement suggestions based on complete context |
31 | | -- **Problem Diagnosis**: Helping AI precisely locate issues by providing the complete environment |
| 13 | +This tool allows you to easily transfer code content to AI assistants for the following scenarios: |
32 | 14 |
|
33 | | -All features run locally without internet connection, ensuring the privacy and security of your code. |
| 15 | +- **Code Learning**: Understand complex project structures and operating principles, improving learning efficiency |
| 16 | +- **Development Assistance**: Get more accurate code modification and feature implementation suggestions |
| 17 | +- **Code Review**: Perform automated quality checks and performance optimization analysis |
| 18 | +- **Refactoring Guidance**: Get code improvement suggestions based on complete context |
| 19 | +- **Problem Diagnosis**: Help AI locate issues more accurately by providing the complete environment |
34 | 20 |
|
35 | | -## 💡 Core Use Cases |
| 21 | +> The software runs locally, doesn't require internet connection, and won't upload any code, ensuring your code privacy. You're free to choose which AI service to use, maintaining complete control over code sharing. |
36 | 22 |
|
37 | | -### 1. Code Learning & Analysis |
| 23 | +## 💡 Core Usage Scenarios |
38 | 24 |
|
39 | | -Easily let AI help you understand how complex codebases work: |
| 25 | +### 1. Code Learning and Analysis |
40 | 26 |
|
41 | 27 | 1. **Select Target Project Directory**: Open the project you want to analyze |
42 | 28 | 2. **Copy Complete Project Structure**: Use the "Copy Directory Tree" function to help AI understand the overall architecture |
43 | | -3. **Provide Core Code Files**: Select key files and use "Copy Path and Code" to provide all code at once |
44 | | -4. **Ask AI for Analysis**: Request AI to analyze code structure, explain how it works, or suggest a learning path |
| 29 | +3. **Provide Core Code Files**: Select key files, use "Copy Path and Code" to provide all code at once |
| 30 | +4. **Ask AI for Analysis**: Request AI to analyze the code structure, explain how it works, or provide a learning path |
45 | 31 |
|
46 | | -> Understanding a complex open-source project used to take days. Now you can get an overview and analysis of key parts from AI, greatly improving learning efficiency! |
| 32 | +### 2. Code Modification and Development |
47 | 33 |
|
48 | | -### 2. Code Modification & Development |
49 | | - |
50 | | -Get AI programming assistance without disrupting your existing workflow: |
51 | | - |
52 | | -1. **Locate Modules Needing Changes**: Find relevant files through the visual tree structure |
| 34 | +1. **Locate Modules to Modify**: Find related files through the visual tree structure |
53 | 35 | 2. **Export Related Code Context**: Select multiple related files simultaneously (e.g., models, controllers, and views) |
54 | | -3. **Describe Modification Requirements**: Clearly explain to AI what functionality you want to implement or what problem needs fixing |
55 | | -4. **Get Complete Implementation Plan**: AI will provide accurate code modification suggestions based on the complete context |
56 | | - |
57 | | -> Compared to single-file editor integrations, this approach provides more complete project context, resulting in more accurate and actionable code suggestions |
58 | | -
|
59 | | -### 3. Code Review & Refactoring |
60 | | - |
61 | | -Let AI become your code review assistant: |
62 | | - |
63 | | -1. **Select Module for Review**: Box-select all files in a functional module |
64 | | -2. **Copy All Related Code with One Click**: Include complete implementation details and file paths |
65 | | -3. **Request AI Review**: Get feedback on code quality, potential issues, and improvement suggestions |
66 | | -4. **Implement Refactoring Suggestions**: Apply optimization solutions provided by AI |
| 36 | +3. **Describe Modification Requirements**: Clearly describe to AI the functionality you want to implement or the problem to fix |
| 37 | +4. **Get Complete Implementation Solution**: AI will provide accurate code modification suggestions based on the complete context |
67 | 38 |
|
68 | | -> If the total code is under 5,000 lines, you can copy it all to mainstream AI assistants for comprehensive analysis, faster and more thorough than traditional code reviews |
69 | | -
|
70 | | -### Local Execution, Privacy Protection |
71 | | - |
72 | | -- **Completely Offline Operation**: The software runs locally, requires no internet connection, and never uploads any code |
73 | | -- **Privacy Protection**: Your code only leaves your computer when you actively copy it |
74 | | -- **Compatible with Any AI Assistant**: You're free to choose which AI service to use, with complete control over code sharing |
75 | | - |
76 | | -## ✨ Key Features |
| 39 | +## ✨ Main Features |
77 | 40 |
|
78 | 41 | ### Intelligent File Management |
79 | 42 |
|
80 | 43 | - **Directory Tree Visualization**: Tree view displays project file structure |
| 44 | +- **File Statistics**: Automatically shows file line count and size, making it easy to assess code volume |
81 | 45 | - **File Type Recognition**: Automatically detects text file encoding, distinguishes between text and binary files |
82 | | -- **Advanced Filtering**: Supports regular expression filtering, .gitignore rule application, and directory depth limits for handling large projects |
| 46 | +- **Advanced Filtering**: Supports regular expression filtering, .gitignore rules application, and directory depth limits for handling large projects |
83 | 47 |
|
84 | | -### Flexible Selection & Export |
| 48 | +### Flexible Selection and Export |
85 | 49 |
|
86 | | -- **Multi-selection Support**: Select single files, multiple files, or entire directories and their subdirectories |
87 | | -- **Mouse Box Selection Mode**: Select/deselect multiple files at once by dragging the mouse |
88 | | -- **Batch Export**: Export paths, code, or both for selected content |
89 | | -- **Context Menu**: Provides multiple copy options for different development scenarios |
| 50 | +- **Multi-selection Support**: Select individual files, multiple files, or entire directories and their subdirectories |
| 51 | +- **Mouse Selection Mode**: Select/deselect multiple files at once by dragging the mouse |
| 52 | +- **Batch Export**: Support exporting paths, code, or both for selected content |
| 53 | +- **Context Menu**: Provides various copy options suitable for different development scenarios |
| 54 | +- **Copy Content Statistics**: Status bar displays the number of files and total lines involved in the operation |
90 | 55 |
|
91 | | -### Integration & Convenience |
| 56 | +### Integration and Convenience |
92 | 57 |
|
93 | | -- **System Tray Integration**: Minimize to system tray, available anytime without occupying desktop space |
94 | | -- **Global Hotkey**: Press Ctrl+2 from any application to show/hide the application window |
95 | | -- **Window Always-on-Top Option**: Keep the window above other applications for convenience |
96 | | -- **File System Integration**: Open folders in file explorer or launch command-line terminals directly from the context menu |
| 58 | +- **System Tray Integration**: Minimize to system tray, always available without occupying desktop space |
| 59 | +- **Global Hotkey**: Press Ctrl+2 hotkey in any application to show/hide the application window |
| 60 | +- **Keep on Top Option**: Keep the window above other applications for easier operation |
| 61 | +- **File System Integration**: Open folders in explorer or launch command line terminals directly from the context menu |
| 62 | +- **Auto-save Mechanism**: Automatically saves settings every 30 seconds to prevent configuration loss |
97 | 63 |
|
98 | | -### Customization & Ease of Use |
| 64 | +### Customization and Ease of Use |
99 | 65 |
|
100 | | -- **Multi-language Support**: Switch between English and Chinese |
101 | | -- **Output Format Customization**: Configure prefixes and suffixes for code and paths |
| 66 | +- **Multi-language Support**: Supports switching between Chinese and English |
| 67 | +- **Output Format Customization**: Configure code and path prefix/suffix formats |
102 | 68 | - **Advanced Options Toggle**: Hide/show advanced settings to maximize directory tree display space |
103 | | -- **Lightweight Implementation**: Low resource usage, quick startup, seamlessly integrates into existing development workflows |
| 69 | +- **Lightweight Implementation**: Low resource usage, quick startup, seamless integration into existing development workflows |
104 | 70 |
|
105 | | -## 🔑 Shortcuts & Special Functions |
| 71 | +## 🔑 Keyboard Shortcuts |
106 | 72 |
|
107 | | -- **Ctrl+C**: Copy paths and code of selected files |
108 | | -- **Ctrl+B**: Copy filenames of selected files |
| 73 | +- **Ctrl+C**: Copy path and code of selected files |
| 74 | +- **Ctrl+B**: Copy filename of selected files |
109 | 75 | - **Ctrl+F**: Open selected folder in file explorer |
110 | | -- **Ctrl+T**: Open command-line terminal in selected folder |
| 76 | +- **Ctrl+T**: Open command line terminal in selected folder |
111 | 77 | - **Ctrl+2**: Global hotkey to show/hide the application from anywhere |
112 | | -- **Tree State Preservation**: The application remembers expansion state of each project directory between sessions |
| 78 | +- **Tree State Persistence**: The application remembers the expanded state of each project directory between sessions |
113 | 79 |
|
114 | | -## 📸 Application Screenshots |
| 80 | +## 🔧 Installation and Usage |
115 | 81 |
|
116 | | -### Directory Tree Menu |
117 | | - |
118 | | -<p align="center"> |
119 | | - <img src="./_images/context_menu.png" width="60%" alt="Right-click menu"> |
120 | | -</p> |
121 | | - |
122 | | -## 🔧 Installation & Usage |
123 | | - |
124 | | -### Download & Install |
| 82 | +### Download and Install |
125 | 83 |
|
126 | 84 | 1. Download the latest version from the [Releases page](https://github.com/sansan0/ai-code-context-helper/releases) |
127 | | -2. Extract the downloaded file to any location |
128 | | -3. Run `AI Code Context Helper.exe` to launch the application |
| 85 | +2. Extract the files to any location |
| 86 | +3. Run `AI Code Context Helper.exe` to start the application |
129 | 87 |
|
130 | 88 | ### How to Use |
131 | 89 |
|
132 | | -1. Click "Browse..." to select your project root directory |
| 90 | +1. Click the "Browse..." button to select a project root directory |
133 | 91 | 2. Check the files or folders you want to share in the directory tree |
134 | | -3. Right-click and select "Copy Path and Code" (or other copy options) |
135 | | -4. Paste the copied content into an AI assistant (like ChatGPT, Claude, etc.) |
| 92 | +3. Right-click and select "Copy Path and Code" (or use other copy options) |
| 93 | +4. Paste the copied content into an AI assistant (like ChatGPT, Claude, etc.) conversation |
136 | 94 | 5. Ask questions or request code modification suggestions based on the provided code context |
137 | 95 |
|
138 | | -## ⚙️ Configuration Options |
139 | | - |
140 | | -### Interface Options |
141 | | - |
142 | | -- **Show Hidden Files**: Whether to display hidden files and folders |
143 | | -- **Show Files/Show Folders**: Control what appears in the tree view |
144 | | -- **Use Relative Path**: Use paths relative to the root directory instead of absolute paths |
145 | | -- **Filter by .gitignore**: Apply rules from the project's .gitignore file |
146 | | -- **Mouse Box Selection Mode**: Enable drag selection for batch operations |
147 | | -- **Maximum Depth**: Limit the display depth of the directory tree |
148 | | -- **File Filter**: Filter displayed files using regular expressions |
149 | | -- **Keep on Top**: Keep the window above all other applications |
150 | | -- **Advanced Options Toggle**: Hide/show advanced settings to maximize tree display space |
151 | | - |
152 | 96 | ## 🛠️ Building from Source |
153 | 97 |
|
154 | 98 | ### Requirements |
155 | 99 |
|
156 | 100 | - Python 3.9+ |
157 | 101 | - Poetry package manager |
158 | 102 |
|
159 | | -### Installing Dependencies |
| 103 | +### Install Dependencies |
160 | 104 |
|
161 | 105 | ```bash |
162 | 106 | git clone https://github.com/sansan0/ai-code-context-helper.git |
163 | 107 | cd ai-code-context-helper |
164 | 108 | poetry install |
165 | 109 | ``` |
166 | 110 |
|
167 | | -### Building the Executable |
| 111 | +### Build Executable |
168 | 112 |
|
169 | 113 | ```bash |
170 | 114 | poetry run python -m cx_Freeze build |
|
0 commit comments