Skip to content

CXR (Sixer) - Comment-Driven Code Editor A web-based code editor that converts comments into functional code, analyzes existing code for errors, and supports multiple programming languages. 🚀

Notifications You must be signed in to change notification settings

raunak0400/Flask-CXR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

CXR (Sixer): Comment-Driven Code Editor

Introduction

Welcome to CXR (Comment eXecution and Review), pronounced "Sixer," a unique web-based code editor powered by CPGI (Comment Programmer Generative AI). , revolutionizing the way you approach coding by allowing you to express your logic in simple comments and then translating them into functional code. It also doubles as a code analyzer, identifying and correcting errors in existing code.

The CPGI Advantage

Traditional AI-powered code generation often provides code based on the AI's own internal logic and understanding. CPGI, a technology conceived and developed by our team, empowers you to dictate the logic with your comments, ensuring the generated code aligns precisely with your intentions. Think of it as providing the blueprint for the code instead of relying on the AI's interpretation. This makes CPGI a powerful tool for learning new programming languages, prototyping ideas, and ensuring that generated code adheres to your specifications.

Key Features

  • Comment-to-Code Conversion: Input your code logic in comments and CXR will generate corresponding code.
  • Code Analysis & Correction: Input your existing code, and CXR will analyze and correct any errors. If no errors are found, it provides a sample execution output.
  • Multi-Language Support: Choose from various programming languages.
  • Downloadable Code: Save your generated code to a file.
  • Customizable Themes: Toggle between light and dark themes.

How to Use CXR

  1. Accessing CXR: Open your web browser and navigate to the provided URL (usually http://127.0.0.1:5001/ or the URL provided after deploying).

  2. Interface Overview: The CXR interface consists of:

    • Header: Displays the name "CXR" along with the Theme button and a language selection dropdown.
    • Main Area: This section is divided into two main parts:
      • Input (Code Editor) Section:
        • Input Label: Displays "Input :".
        • Input Text Area: Where you input comments for code generation or code for analysis and correction.
        • Run Button: Trigger code generation or analysis.
      • Output (Generated Code) Section:
        • Output Label: Displays "Output :".
        • Output Text Area: Where the generated code or the analysis output is shown.
        • Download Button: Downloads the generated code as a file with the appropriate extension.
        • Clear Button: Clears the content of the input and output text areas.
        • Guide Button: Opens the user guide in a new tab.
    • Footer: Contains no content.
  3. Selecting a Language:

    • Use the dropdown menu located at the top of the page to select the desired programming language.
    • If your language isn't listed, select "other" and a modal will appear so you can enter your language.
  4. Generating Code from Comments (CPGI):

    • In the input text area, enter your instructions or logic using comments (start with //). For example:
      • // create a function that adds two numbers
      • // create a list and find the maximum value
      • // print hello world
    • Click the "Run" button.
    • The corresponding code generated by CPGI will appear in the output text area.
  5. Code Analysis and Correction:

    • In the input text area, paste your existing code.
    • Click the "Run" button.
    • CXR will analyze the code and:
      • If errors are found, corrected code with comments indicating changes will appear in the output text area.
      • If no errors are found, a sample execution output (if any) will appear in the output text area.
  6. Using the Action Buttons (in output section):

    • Download Button:
      • Once you have generated code or received the corrected code, click the Download button to save it.
      • The file is saved with the appropriate extension based on the selected language, named project.[extension].
    • Clear Button: Click the Clear button to erase the contents of both input and output text areas and start over.
    • Guide Button: Click the Guide button to open this guide in a new tab.
  7. Theme Button:

    • Click the Theme button at the top of the page to toggle between a dark theme and a light theme.

Tips for Best Results

  • Clear Comments: Use simple and clear comments that clearly describe the logic or functionality you want in the code.
  • Language Specificity: Specify function names and class names to get specific results from the comment.
  • Code Review: Always review the generated or corrected code to ensure it meets your requirements.
  • Experiment: Explore different types of instructions and code to fully understand the capabilities of CPGI in CXR.

Conclusion

CXR, pronounced "Sixer," provides a powerful and intuitive way to work with code. it is powered by CPGI, CXR empowers you to achieve your goals whether you're learning a new language, exploring complex algorithms, or need to analyze existing code. Happy coding!


Made With ❤️ By A Passionate Programmer

Raunak Kumar Jha

About

CXR (Sixer) - Comment-Driven Code Editor A web-based code editor that converts comments into functional code, analyzes existing code for errors, and supports multiple programming languages. 🚀

Resources

Stars

Watchers

Forks

Languages