CodeForgeAI

The Next Generation AI-Powered IDE

About CodeForgeAI

CodeForgeAI is revolutionizing the way developers work with advanced AI assistance for everyday coding tasks. Our CLI tool leverages the power of local and cloud AI models to help you analyze code, generate solutions, and improve your workflow.

Built with a focus on developer productivity, CodeForgeAI integrates seamlessly with your existing tools while adding powerful AI capabilities that adapt to your specific needs.

Key Features

Project Analysis

Analyze your project structure and get insights about your codebase with AI-powered tools.

terminal
$codeforgeai analyze

AI Code Completion

Get intelligent code suggestions and completions powered by advanced AI models.

terminal
$codeforgeai suggestion

Code Explanation

Get detailed explanations of complex code to understand functionality and logic.

terminal
$codeforgeai explain filename.py

Smart Contract Analysis

Analyze Web3 smart contracts for security vulnerabilities and optimization opportunities.

terminal
$codeforgeai web3 analyze-contract

Git Integration

Generate meaningful commit messages with appropriate emojis based on your changes.

terminal
$codeforgeai commit-message

Command Processing

Generate terminal commands for complex tasks using natural language instructions.

terminal
$codeforgeai command "setup project"

Get In Touch

Installation

Prerequisites

  • Python 3.8 or higher
  • Git
  • Ollama (for local AI models)

Step-by-Step Installation

1. Clone the repository:

Clone the repository and navigate to the project directory

terminal
$git clone https://github.com/codeforge-ide/codeforgeai.git && cd codeforgeai

2. Install in development mode:

Install the package in development mode

terminal
$pip install -e .
Successfully installed codeforgeai-0.1.0

3. Verify your installation:

Check if the installation was successful

terminal
$codeforgeai --help
Usage: codeforgeai [OPTIONS] COMMAND [ARGS]...  Options: --help  Show this message and exit.  Commands: analyze          Analyze project structure command          Generate terminal commands commit-message   Generate commit messages config           View or modify configuration explain          Explain code in a file prompt           Send a prompt to the AI suggestion       Get code suggestions web3             Web3 development commands

Configuration

CodeForgeAI uses a configuration file stored at ~/.codeforgeai.json. The first time you run a command, this file will be created with default settings.

View Current Configuration

View your current configuration settings

terminal
$codeforgeai config
{ \u0022general_model\u0022: \u0022tinyllama\u0022, \u0022code_model\u0022: \u0022qwen2.5-coder:0.5b\u0022, \u0022format_line_separator\u0022: 5 }

Update Configuration

Update a specific configuration setting

terminal
$codeforgeai config --set code_model=qwen2.5-coder:2b
Configuration updated successfully!

Key Configuration Options

  • general_model: The AI model for general prompts (default: "tinyllama")
  • code_model: The AI model for code-specific tasks (default: "qwen2.5-coder:0.5b")
  • format_line_separator: Number of newlines between extracted code blocks (default: 5)

Quick Start

Basic Commands

Analyze your project structure:

Get an overview of your project codebase

terminal
$codeforgeai analyze
Analyzing project structure... Found 42 files in 8 directories Main technologies: Python, JavaScript, HTML/CSS Project type: Web Application with API

Get AI assistance for coding tasks:

Ask the AI for code solutions

terminal
$codeforgeai prompt "Create a function to calculate Fibonacci numbers"
def fibonacci(n): \u0022\u0022\u0022 Calculate the nth number in the Fibonacci sequence.  Args: n: A positive integer  Returns: The nth Fibonacci number \u0022\u0022\u0022 if n <= 0: raise ValueError(\u0022Input must be a positive integer\u0022) elif n == 1: return 0 elif n == 2: return 1  # Initialize the first two Fibonacci numbers a, b = 0, 1  # Calculate the nth Fibonacci number for _ in range(3, n+1): a, b = b, a + b  return b

Get explanations for code in a file:

Get a detailed explanation of code functionality

terminal
$codeforgeai explain path/to/file.py
# Code Explanation for file.py  This file contains a Flask web application that serves as a REST API. Here's a breakdown:  1. Imports and setup: - Flask framework and related modules - Database connection utilities - Authentication helpers  2. Routes: - GET /api/users - Returns a list of users (requires authentication) - POST /api/login - Handles user authentication and returns JWT tokens - PUT /api/users/:id - Updates user information  3. Key functionality: - JWT-based authentication - Database connection pooling - Request rate limiting