Skip to main content

R-Code AI-Powered Interactive Code Assistant - Advanced CLI tool with intelligent coding assistance

Project description

R-Code CLI

The Most Advanced AI Coding Assistant

Context-Aware โ€ข Never Break Code Again โ€ข Professional Grade

License: AGPL v3 Python 3.8+ Build Status PRs Welcome Security

๐Ÿš€ Quick Start โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿค Contributing โ€ข ๐Ÿ’ฌ Community

R-Code CLI Demo


๐ŸŽฏ What Makes R-Code CLI Different

R-Code CLI is not just another AI coding assistant. It's a context-aware, project-intelligent system that understands your entire codebase and prevents the common mistakes that plague other AI tools.

๐Ÿง  Revolutionary Context System

  • Complete Project Understanding: AST parsing, dependency mapping, architecture analysis
  • Never Create Duplicates: Context validation prevents file conflicts
  • Never Break Code: Dependency analysis prevents breaking changes
  • Smart Suggestions: Follows your project's naming conventions and patterns

โฐ Time Travel System

  • Checkpoint Management: Automatic and manual save points
  • Surgical Undo: Revert specific changes without losing other work
  • Change Visualization: See exactly what changed and when
  • Safe Experimentation: Try anything knowing you can always go back

๐Ÿ›ก๏ธ Human-in-the-Loop Security

  • Smart Approval: Only dangerous operations require confirmation
  • Risk Analysis: Automatic command safety assessment
  • Configurable Security: Customize approval policies for your needs
  • Persistent Learning: System learns from your approval patterns

โœจ Core Features

๐Ÿค– AI-Powered Development

  • Multi-Provider Support: OpenAI, Anthropic, custom models
  • Streaming Responses: Real-time AI feedback
  • Context-Aware: Understands your entire project
  • Natural Language: Chat naturally about your code

๐Ÿ—๏ธ Project Intelligence

  • AST Analysis: Deep code structure understanding
  • Dependency Mapping: Complete file relationship tracking
  • Architecture Detection: Identifies patterns and frameworks
  • Quality Metrics: Code complexity and maintainability scoring

โšก Developer Experience

  • Slash Commands: Quick actions with /help, /undo, /status
  • Configuration-Driven: Customize behavior via JSON config
  • Cross-Platform: Windows, macOS, Linux support
  • IDE Integration: Works with any development environment

๐Ÿ”’ Enterprise-Grade Security

  • Local-First: Your code stays on your machine
  • Encrypted Storage: Secure API key and data handling
  • Audit Logging: Complete operation history
  • Compliance Ready: GDPR, CCPA, SOC 2 aligned

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • AI Provider API Key (OpenAI, Anthropic, or others)

Installation

๐ŸŽฏ PyPI Installation (Recommended)

# Install from PyPI
pip install rcode-cli

# Set your API key
export ANTHROPIC_API_KEY="your-api-key-here"
# or
export OPENAI_API_KEY="your-api-key-here"

# Start R-Code
rcode

๐Ÿ”ง Development Installation

# Clone the repository
git clone https://github.com/RaheesAhmed/R-Code-CLI.git
cd R-Code-CLI

# Install dependencies
pip install -r requirements.txt

# Set your API key
export ANTHROPIC_API_KEY="your-api-key-here"
# or
export OPENAI_API_KEY="your-api-key-here"

# Start R-Code
python cli.py

First Run

$ python cli.py

๐Ÿš€ Welcome to R-Code CLI v1.0.0
๐Ÿง  Analyzing project structure...
๐Ÿ“ Found 42 files to analyze
โœ… Project analysis complete

โ”Œโ”€ R-Code Assistant
โ”‚ Hello! I'm your AI coding assistant with complete project understanding.
โ”‚ I can help you write, debug, and improve code while preventing conflicts.
โ”‚
โ”‚ Try asking me to:
โ”‚ โ€ข "Create a new user authentication module"
โ”‚ โ€ข "Fix the bug in user_service.py"
โ”‚ โ€ข "Add error handling to the API endpoints"
โ”‚
โ”‚ Type /help for commands or just start chatting!
โ””โ”€

โ€บ

๐Ÿ’ก Usage Examples

Context-Aware Development

โ€บ Create a new user service that follows our project patterns

๐Ÿ” Using get_project_context_summary...
๐Ÿ“Š Analyzing project structure and conventions...

I can see you're using:
โ€ข Flask with SQLAlchemy ORM
โ€ข Snake_case naming convention
โ€ข Service-Repository pattern
โ€ข JWT authentication

I'll create a user service that follows these patterns...

๐Ÿ“ Creating: src/services/user_service.py
๐Ÿ“ Creating: src/repositories/user_repository.py
๐Ÿ“ Creating: tests/test_user_service.py

Smart Validation

โ€บ Add a login function to auth.py

๐Ÿ” Using validate_file_operation...
โš ๏ธ Analysis found:
  โ€ข File auth.py already has login() function at line 23
  โ€ข Suggested: enhance existing function or create login_with_email()

๐Ÿ’ก Should I enhance the existing login function or create a new variant?

Safe Experimentation

โ€บ /save "Before refactoring auth system"
โœ… Checkpoint saved: cp_20250208_142301

โ€บ Refactor the authentication system to use JWT tokens

๐Ÿ” Working on authentication refactor...
๐Ÿ“ Modified: src/auth/auth_service.py
๐Ÿ“ Modified: src/models/user.py
๐Ÿ“ Created: src/utils/jwt_helper.py

โ€บ /undo
โœ… Reverted to checkpoint: cp_20250208_142301

๐Ÿ—๏ธ Architecture Overview

graph TB
    A[User Input] --> B[Command Parser]
    B --> C[Context Engine]
    C --> D[Project Analysis]
    C --> E[Validation System]
    C --> F[AI Orchestrator]
    F --> G[Multi-Provider AI]
    F --> H[Tool Execution]
    H --> I[Checkpoint System]
    I --> J[Human Approval]
    J --> K[File Operations]
    K --> L[Result Display]

Key Components

  • ๐Ÿง  Context Engine: Complete project understanding and analysis
  • ๐Ÿค– AI Orchestrator: Multi-provider AI integration with streaming
  • โฐ Checkpoint System: Time travel functionality with surgical undo
  • ๐Ÿ›ก๏ธ Validation System: Prevents duplicates and breaking changes
  • ๐Ÿ” Human Approval: Security-first approach to dangerous operations
  • โš™๏ธ Tool Ecosystem: Extensible tool framework for file and terminal operations

๐Ÿ“– Documentation

๐Ÿ“š Complete Documentation Suite

๐Ÿš€ Getting Started

๐Ÿ“‹ User Guides

๐Ÿ—๏ธ Advanced Topics

โšก Quick Reference

Command Description Example
/help Show available commands /help
/undo Undo last AI operation /undo
/save <desc> Create checkpoint /save "Before refactor"
/checkpoints List save points /checkpoints
/revert <id> Revert to checkpoint /revert cp_123456
/status Show session info /status

๐Ÿ“‹ Complete Command Reference โ†’

๐ŸŽฏ Popular Documentation

๐ŸŒŸ Most Helpful

๐Ÿ”ฅ For Developers

๐Ÿ“ž Need Help?


๐Ÿ”ง Development

Project Structure

R-Code-CLI/
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿค– agents/          # AI agent implementations
โ”‚   โ”œโ”€โ”€ โฐ checkpoint/      # Time travel system
โ”‚   โ”œโ”€โ”€ ๐Ÿ’ฌ commands/        # Slash command handlers
โ”‚   โ”œโ”€โ”€ โš™๏ธ config/          # Configuration management
โ”‚   โ”œโ”€โ”€ ๐Ÿง  context/         # Project context engine
โ”‚   โ”œโ”€โ”€ ๐Ÿ› ๏ธ tools/           # File & terminal operations
โ”‚   โ””โ”€โ”€ ๐Ÿ“Š types/          # Type definitions
โ”œโ”€โ”€ ๐Ÿ“‹ tests/              # Comprehensive test suite
โ”œโ”€โ”€ ๐Ÿ“š docs/               # Documentation
โ”œโ”€โ”€ ๐Ÿ”ง static/             # Assets and examples
โ””โ”€โ”€ ๐Ÿ“„ Legal Framework     # Complete legal protection

Development Setup

# Clone and setup development environment
git clone https://github.com/RaheesAhmed/R-Code-CLI.git
cd R-Code-CLI

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/macOS
.venv\Scripts\activate     # Windows

# Install development dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt

# Run tests
python -m pytest tests/

# Run with development settings
python cli.py --dev

๐Ÿค Contributing

We welcome contributions from the community! R-Code CLI is built with high standards and professional practices.

How to Contribute

  1. Read our Contributing Guide for detailed guidelines
  2. Check our Code of Conduct for community standards
  3. Review our Security Policy for security practices
  4. Understand our Legal Framework for IP requirements

Development Workflow

# 1. Fork and clone
git clone https://github.com/YOUR_USERNAME/R-Code-CLI.git

# 2. Create feature branch
git checkout -b feature/amazing-new-feature

# 3. Make changes with tests
# ... develop amazing features ...

# 4. Run quality checks
python -m pytest tests/
python -m black src/
python -m flake8 src/

# 5. Submit pull request
git push origin feature/amazing-new-feature

Contribution Types

  • ๐Ÿ› Bug Fixes: Help us maintain code quality
  • โœจ Features: Add new capabilities and tools
  • ๐Ÿ“š Documentation: Improve guides and examples
  • ๐Ÿงช Tests: Increase test coverage
  • ๐Ÿ”’ Security: Report and fix vulnerabilities
  • ๐ŸŒ Accessibility: Make R-Code more inclusive

๐Ÿ›ก๏ธ Legal Framework

R-Code CLI is protected by a comprehensive legal framework that ensures both open source collaboration and intellectual property protection:

๐Ÿ“‹ Legal Documents

๐Ÿท๏ธ Intellectual Property

  • Trademark: "R-Code" and related marks are protected trademarks
  • Copyright: All contributions are owned by the R-Code project
  • Patents: Contributors grant patent licenses to the project
  • Attribution: All derivatives must credit the original R-Code project

๐ŸŽ–๏ธ Recognition

Hall of Fame

We recognize our amazing contributors:

  • ๐ŸŒŸ Core Contributors: Major features and architectural improvements
  • โญ Regular Contributors: Multiple merged PRs and ongoing involvement
  • โœจ Community Champions: Outstanding community support and mentorship

[Be the first to contribute and get listed here!]

๐Ÿ“Š Project Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests


๐Ÿ’ฌ Community

Get Help

Stay Updated

  • โญ Star this repository for updates
  • ๐Ÿ‘€ Watch releases for new versions
  • ๐Ÿฆ Follow us on social media (coming soon)
  • ๐Ÿ“ง Subscribe to our newsletter (coming soon)

Enterprise Support

For organizations requiring professional support:


๐ŸŽฏ Roadmap

๐Ÿ“… Current Focus

  • ๐Ÿงช Beta Testing: Community feedback and improvements
  • ๐Ÿ”Œ Plugin System: Extensible architecture for third-party tools
  • ๐ŸŒ Web Interface: Optional web-based interface
  • ๐Ÿ“ฑ Mobile Support: iOS and Android companion apps

๐Ÿ”ฎ Future Vision

  • ๐Ÿค Team Collaboration: Multi-developer project support
  • โ˜๏ธ Cloud Sync: Optional cloud synchronization
  • ๐ŸŽจ Visual Editor: GUI interface for complex operations
  • ๐Ÿค– Custom Models: Train models on your codebase

๐Ÿ“„ Changelog

v1.0.0 (2025-02-08)

  • ๐ŸŽ‰ Initial Release: Core AI assistant functionality
  • ๐Ÿง  Context System: Complete project understanding
  • โฐ Time Travel: Checkpoint and undo system
  • ๐Ÿ›ก๏ธ Security: Human approval system
  • ๐Ÿ“š Documentation: Comprehensive guides and docs

โš–๏ธ License

R-Code CLI is licensed under the GNU Affero General Public License v3.0 with additional terms for trademark protection and commercial use.

What this means:

  • โœ… Use: Free to use for personal and commercial projects
  • โœ… Modify: Create and distribute modified versions
  • โœ… Distribute: Share with others freely
  • ๐Ÿ“‹ Requirements: Derivatives must be open source (AGPL v3.0)
  • ๐Ÿท๏ธ Trademarks: "R-Code" trademarks require permission for commercial use

For full details, see our License and Terms of Service.


๐Ÿ™ Acknowledgments

R-Code CLI is built on the shoulders of giants:

  • OpenAI & Anthropic: For providing world-class AI models
  • LangChain & LangGraph: For AI orchestration framework
  • Python Community: For the incredible ecosystem
  • Open Source Community: For inspiration and collaboration

โญ Star this repository โ€ข ๐Ÿค Contribute โ€ข ๐Ÿ“š Docs โ€ข ๐Ÿ’ฌ Community


Built with โค๏ธ by Rahees Ahmed and the R-Code community

"The Most Advanced AI Coding Assistant - Context-Aware, Never Break Code Again"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rcode_cli-1.0.1.tar.gz (192.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rcode_cli-1.0.1-py3-none-any.whl (110.5 kB view details)

Uploaded Python 3

File details

Details for the file rcode_cli-1.0.1.tar.gz.

File metadata

  • Download URL: rcode_cli-1.0.1.tar.gz
  • Upload date:
  • Size: 192.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for rcode_cli-1.0.1.tar.gz
Algorithm Hash digest
SHA256 66ca949bc8b688b3d448366b1101ce613d3c52e6ca00c8742ea2b906910f3832
MD5 318a5e7d27add3581cba6fe42cb30cd7
BLAKE2b-256 5e324e727ecaa879d4a6ef02bd789e4db5746894098ea4b4b522e886b7de84a5

See more details on using hashes here.

File details

Details for the file rcode_cli-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: rcode_cli-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 110.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for rcode_cli-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 781846214bd628280f09a1f4ec02233409a7fad85c0b277983d8ede463b28f02
MD5 0bcea45fe60737fe179efabf3bc940f7
BLAKE2b-256 2d1e5e12858211faf7522bf0104c6a98d4bd3afe79c048c41353ee74715b7625

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page