In today’s fast-paced software development environment, the demand for smarter and faster coding solutions is more significant than ever. This paper introduces CODEGENIE, a Visual Studio Code extension that enhances programming productivity by leveraging OpenAI’s state-of-the-art language models. From automatic code generation and context-aware autocompletion to real-time debugging and insightful code suggestions, CODEGENIE transforms the way developers interact with code.Using the Hugging Face API and the StarCoder model, the extension intelligently interprets selected code, improves structure, fixes bugs, and explains logic—all in real time. It is built for both novice and experienced developers, streamlining workflows and fostering deeper understanding through AI-powered support. CODEGENIE represents a practical step forward in AI-assisted software development and aims to be a daily companion for coders worldwide.
Introduction
1. Purpose and Motivation
CODEGENIE was developed to simplify and enhance the coding experience, especially for students and developers struggling with bugs, syntax errors, or unfamiliar code. It integrates AI (via Hugging Face's StarCoder model) directly into Visual Studio Code, offering:
Code generation via natural language
Real-time bug fixes
Code readability improvement
AI-generated code explanations
2. Literature Review
CODEGENIE builds on prior research and tools like ChatGPT, CodeBERT, and MetaCoder. It aims to bridge gaps found in current AI tools—particularly in code readability, maintainability, and real-world usability.
3. Tools & Platforms
VS Code: Central development platform
Node.js & npm: Backend runtime and package management
Git: Version control
PowerShell/CMD: Development scripting and deployment
4. Programming Languages
TypeScript: Core language for extension logic
JavaScript: For interactivity and UI behavior
JSON: For data exchange with Hugging Face API
5. Key Libraries & Dependencies
VSCode API: Extension development interface
Hugging Face API: Access to the StarCoder language model
node-fetch, ts-loader, Webpack, ESLint, dotenv: For HTTP calls, compiling, linting, and environment configuration
6. Methodology
Code Selection: User selects code in VS Code
Extension Activation: Captures selected code and prepares it
API Communication: Sends code to Hugging Face with an instruction prompt
AI Processing: StarCoder analyzes and improves the code
Output Display: Enhanced code appears in a new editor tab for comparison
Prompt Engineering: Guides AI behavior using natural language commands
Transformer-Based Model: StarCoder uses self-attention and fine-tuned training on code to deliver intelligent results
7. Implementation Structure
Module 1: extension.ts – Handles command registration, user input, and interaction with the editor
Module 2: ai.ts – Communicates with Hugging Face API, manages prompt generation and response parsing
Webpack: Bundles TypeScript code for deployment
Project Configs: package.json and tsconfig.json manage dependencies, build settings, and type safety
8. Discussion – Why StarCoder?
StarCoder, developed by the BigCode project, is trained on billions of lines of code and supports over 80 programming languages. It excels in:
Multi-line reasoning
Auto-documentation via docstrings
Bug fixing and code synthesis
Generating functions from comments
Its versatility and accuracy make it a powerful AI engine for educational and professional coding tasks.
Conclusion
CODEGENIE is the epitome of?future wise coding. By automating the repetitive tasks that developers perform to suggest copy code, it makes the coding experience much better, as well as provides a human-like?code suggestion with context awareness. Seamless Integration of AI into?Visual Studio CodeTransforming the way developers write, understand, and enhance code.
References
[1] Ghai, A. S., Rawat, V., Gupta, V. K., & Ghai, K. (2024, August). Artificial Intelligence in System and Software Engineering for Auto Code Generation. In 2024 International Conference on Electrical Electronics and Computing Technologies (ICEECT) (Vol. 1, pp. 1-5). IEEE. [https://ieeexplore.ieee.org/abstract/document/10738945]
[2] Muthazhagu, V. H., & Surendiran, B. (2024, January). Exploring the Role of AI in Web Design and Development: A Voyage through Automated Code Generation. In 2024 International Conference on Intelligent and Innovative Technologies in Computing, Electrical and Electronics (IITCEE) (pp. 1-8). IEEE.[https://ieeexplore.ieee.org/abstract/document/10467409]
[3] Sakib, F. A., Khan, S. H., & Karim, A. R. (2024, July). Extending the frontier of chatgpt: Code generation and debugging. In 2024 International Conference on Electrical, Computer and Energy Technologies (ICECET (pp. 1-6). IEEE.[https://ieeexplore.ieee.org/abstract/document/10698405]
[4] Yang, Z., Keung, J. W., Sun, Z., Zhao, Y., Li, G., Jin, Z., ... & Li, Y. (2024). Improving domain-specific neural code generation with few-shot meta-learning. Information and Software Technology, 166, 107365.[https://www.sciencedirect.com/science/article/abs/pii/S0950584923002203]
[5] Panayiotou, K., Doumanidis, C., Tsardoulias, E., & Symeonidis, A. L. (2024). SmAuto: A domain-specific-language for application development in smart environments. Pervasive and Mobile Computing, 101, 101931.[https://www.sciencedirect.com/science/article/abs/pii/S1574119224000579]
[6] Idrisov, B., & Schlippe, T. (2024). Program Code Generation with Generative AIs. Algorithms, 17(2), 62.[https://www.mdpi.com/1999-4893/17/2/62]
[7] Liu, F., Fu, Z., Li, G., Jin, Z., Liu, H., Hao, Y., & Zhang, L. (2024). Non-autoregressive line-level code completion. ACM Transactions on Software Engineering and Methodology, 33(5), 1-34. [https://dl.acm.org/doi/full/10.1145/3649594]
[8] Tan, H., Luo, Q., Jiang, L., Zhan, Z., Li, J., Zhang, H., & Zhang, Y. (2024). Prompt-based code completion via multi-retrieval augmented generation. ACM Transactions on Software Engineering and Methodology.[https://dl.acm.org/doi/abs/10.1145/3725812]