Overview

CLInvestigator is a powerful AI-driven Command Line Interface (CLI) tool designed to streamline the coding process for developers. It intelligently resolves dependency conflicts, ensuring smooth package installations and project setup. The tool offers in-depth code reviews, identifying potential errors, inefficiencies, and best practices to improve code quality. Additionally, it generates helpful code snippets, reducing development time and effort. Beyond that, CLInvestigator provides real-time linting to enforce coding standards, debugging assistance to quickly pinpoint and fix issues, and customizable shortcut management for an optimized workflow. It also features an intelligent terminal integration, allowing developers to interact seamlessly with AI-powered suggestions, making coding faster and more efficient. Whether you're working on a complex project or just need quick fixes, CLInvestigator enhances productivity by automating and simplifying key development tasks.

Installation Guide

Step 1: Check Prerequisites

Before installing CLInvestigator, ensure you have the following dependencies:

  • Node.js (version 14 or later)
  • npm (version 6 or later)

To check if they are installed, run:

node -v   # Displays the installed Node.js version
npm -v    # Displays the installed npm version

If missing, download the latest Node.js.

Step 2: Install CLInvestigator

Option 1: Global Installation (Recommended)

To install CLInvestigator globally, run:

npm install -g ohmyfix

βœ… This allows you to use ohmyfix from anywhere in your terminal.

Option 2: One-Time Execution

For a temporary run without installation, use:

npx ohmyfix --help

βœ… This runs the CLI without permanently installing it.

Step 3: Verify Installation

Check if CLInvestigator was installed successfully by running:

ohmyfix --version

If installed correctly, it will display the version number.

Now you're all set to use CLInvestigator for debugging, linting, and more!

Getting Started

Step 1: Accessing CLInvestigator

After installation, check available commands using:

npx ohmyfix --help

βœ… This command will display all available features and options.

Step 2: Running the CLI

πŸ”§ Fixing Errors in a Specific File

To automatically detect and fix errors in a JavaScript file, run:

npx ohmyfix file.js --shortcut

This applies intelligent fixes to common issues and optimizes the code structure.

πŸ€– Performing an AI-Powered Code Review

Analyze your code with AI-driven suggestions for improvement:

npx ohmyfix ai file.js

This scans the file for best practices, potential bugs, and optimizations.

🐞 Debugging a File

For real-time debugging insights, run:

npx ohmyfix debug file.js

This highlights issues and offers debugging suggestions.

Now you're ready to supercharge your development workflow with CLInvestigator! πŸš€

Commands & Usage

General Commands

Command Description
npx ohmyfix --help Display all available commands and options
npx ohmyfix -V Check the CLI version
npx ohmyfix setup Set up Google Generative AI API key

Code Fixing & Review

Command Description
npx ohmyfix ai file.js AI-powered code review and improvements
npx ohmyfix snippets Generate reusable code snippets
npx ohmyfix lint file.js Lint and fix syntax errors
npx ohmyfix debug file.js Debug and resolve common coding issues
npx ohmyfix snippetfix file.js Fix code errors in a selected snippet (any language)

Shortcut Management

Command Description
npx ohmyfix shortcuts Manage custom coding shortcuts and aliases

Terminal Integration

CLInvestigator also includes an AI-powered terminal that enhances the CLI experience with:

Installing the Terminal

Download the terminal from the official GitHub repository: Github Link

Follow the installation guide provided in the repository to set up and configure the terminal.

Troubleshooting

When using CLInvestigator, you might encounter certain issues while setting up or running commands. Below are some common problems along with their solutions.

πŸ›‘ Issue: "Command not found"

If you see a "command not found" error when trying to run ohmyfixit usually means the installation wasn't successful or npm isn't configured correctly.

βœ… Solution:

  • Ensure Node.js and npm are installed. You can check their versions:
node -v
npm -v
  • If missing, install the latest Node.js.
  • Reinstall CLInvestigator globally:
npm install -g ohmyfix
  • Verify the installation:
npx ohmyfix --help

πŸ”‘ Issue: API key setup failure

If you face errors while setting up the Google Generative AI API key, follow these steps:

βœ… Solution:

  • Double-check that your API key is valid and correctly entered.
  • Ensure you have an active internet connection.
  • Re-run the setup command:
npx ohmyfix setup
>

Contributions

We welcome and appreciate contributions from developers who want to enhance CLInvestigator. Whether you’re fixing bugs, adding features, or improving documentation, your help makes this tool better for everyone!

How to Contribute

  1. Fork the Repository: Visit our GitHub Repository and click "Fork".
  2. Create a New Branch: Use this naming convention:
    git checkout -b feature/new-feature
  3. Make Your Changes: Implement features, fix bugs, or update documentation.
  4. Commit Your Changes: Use a clear commit message:
    git commit -m "Added new feature: feature description"
  5. Push and Create a Pull Request:
    git push origin feature/new-feature
    Open a Pull Request (PR) on GitHub.

Support

If you encounter any issues or need assistance:

License

CLInvestigator is open-source and licensed under the MIT License. Feel free to use, modify, and distribute it while following the license terms.

πŸ”— Read the full MIT License.

πŸš€ Happy Coding with CLInvestigator! πŸŽ‰