Skip to content

hongxin/RealConsole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RealConsole

Intelligent CLI Agent Infused with Eastern Philosophy

Installation | Quick Start | Documentation | Examples

Rust License Tests Version

English | δΈ­ζ–‡

RealConsole is an intelligent command-line agent built with Rust, based on the "One Divides into Three" (δΈ€εˆ†δΈΊδΈ‰) philosophy. It combines LLM-powered conversation, proactive suggestions, task orchestration, and DevOps tools to provide a seamless CLI experience. Now with Web Terminal support!

Installation

Quick Install

git clone https://github.com/hongxin/RealConsole.git
cd RealConsole
make install

The binary will be installed to ~/.local/bin/realconsole.

Build from Source

cargo build --release
./target/release/realconsole

Requirements: Rust 1.70+, LLM Provider (Ollama/Deepseek/Gemini/OpenAI)

πŸ“– Detailed instructions: Installation Guide

Quick Start

1. Configure

Run the interactive wizard:

realconsole wizard --quick

Or manually copy configuration files:

cp .env.example .env
cp config/realconsole.yaml.example realconsole.yaml
# Edit .env and realconsole.yaml

2. Run

CLI Mode:

realconsole

Web Terminal Mode (NEW):

realconsole web
# Visit http://127.0.0.1:7788

3. Try it out

% hello                           # Chat with AI
% ls -la                          # Execute shell commands (smart routing)
% /suggest                        # Get proactive suggestions
% /plan create a Rust project    # Task orchestration
% /trace                          # Unified tracking

πŸ“– Full guide: Quick Start Guide

Key Features

🌐 Web Terminal ⭐ Core Highlight (v1.23.0 - v1.39.0)

Cross-platform Web Terminal - Access RealConsole anywhere (17 versions of continuous optimization):

realconsole web --bind 0.0.0.0 --port 7788

Core Features:

  • ✨ Smart Routing: Auto-detects shell commands, no ! prefix needed
  • 🎯 Intent Understanding: 50+ built-in intents, natural language task execution
  • πŸ”§ Tool Calling: Full LLM tool calling capability
  • πŸ“’ Jupyter-like Experience: Round cards, collapsible output, one-click rerun (v1.28.0+)
  • πŸ€– Intent Decomposition Visualization: Visualize AI thinking process, auto-execute tools (v1.39.0)
  • πŸ‘οΈ Eye Protection Colors: Professional dark theme, inspired by GitHub/Binance, comfortable for long-term use (v1.39.0)
  • 🎨 Beautiful UI: Real-time streaming output, command history, auto-completion
  • πŸ“± Mobile Friendly: Responsive design with touch support
  • 🌍 LAN Access: Team collaboration across devices

Use Cases:

  • Remote server management
  • Mobile device access
  • Team collaboration demos
  • Quick testing without installation

πŸ“– Detailed docs: Web Terminal User Guide

🌍 Internationalization (v1.24.0)

Complete bilingual support (English/Chinese):

  • CLI Interface: All command outputs and prompts
  • LLM Prompts: System prompts in both languages
  • YAML Config: Internationalized configuration files
  • Dynamic Switching: REALCONSOLE_LANG=zh-CN|en-US environment variable

πŸ€– Intelligent Conversation

  • LLM Integration: Ollama (local) / Deepseek / Gemini / OpenAI support
  • Streaming Output: Real-time token-by-token display
  • Multi-turn Context: Automatic context management (Auto/Manual/Disabled modes)
  • Tool Calling: 14+ built-in tools (calculator, file ops, datetime, etc.)

πŸ’‘ Proactive Suggestions

  • Context-Aware: Intelligent suggestions based on project type, command history, and errors
  • Quick Execute: Number shortcuts (e.g., 1, 2, 3) to run suggestions instantly
  • Spell Checking: Automatic typo correction with Levenshtein distance algorithm
  • Feedback Learning: Adapts to your preferences through user feedback
% /suggest
πŸ’‘ Based on your context:
  1. cargo build - Build the project
  2. cargo test - Run tests
  3. git commit - Commit changes

% 1           # Quick execute

πŸ› οΈ Task Orchestration

  • Natural Language Goals: Describe what you want, AI decomposes into tasks
  • Intelligent Parallel Execution: Automatic dependency analysis and optimization
  • Task Persistence: Save and load tasks across sessions
  • Visual Progress: Tree-structured task display with real-time status
% /plan create a Rust project with src and tests
πŸ€– Decomposed into 6 tasks

% /execute
βœ“ 6/6 Β· 100% Β· 10s

% /task save my_build    # Save for later
% /task list              # List all saved tasks
% /task load 0            # Load task

πŸ“Š Unified Tracking

  • Four-Dimensional Observation: History + Log + LLM-Log + Context
  • Smart Deduplication: Content hash + time window algorithm
  • Multi-dimensional Query: By dimension, time, keyword
% /trace
πŸ“Š 20 records from 4 sources
πŸ“Š Statistics | πŸ”— Coordination | πŸ€– BlackBox | πŸ’­ Memory

βš™οΈ DevOps Toolset

  • Git Assistant: Smart status, diff analysis, commit message generation
  • Log Analyzer: Multi-format parsing, error aggregation, health assessment
  • System Monitor: CPU/Memory/Disk monitoring, process TOP list
  • Project Context: Auto-detect project type, recommend build/test/run commands

πŸ” Security

  • Shell Blacklist: Block dangerous commands (rm -rf /, dd, fork bombs)
  • Timeout Control: Default 30s execution limit
  • Output Limits: Max 100KB to prevent resource exhaustion
  • API Key Security: Environment variable storage, .env excluded from version control

Examples

Smart Command Routing

% ls          # Auto-detected as shell
% pwd         # No ! prefix needed for common commands
% git status  # 100+ commands auto-recognized

Error Recovery

% cagro build
❌ Command not found: cagro

πŸ’‘ Did you mean?
  1. cargo (0.93) - Rust package manager
  2. cat (0.65) - Display file

% 1           # Execute: cargo build

Feedback Learning

# RealConsole learns from your choices
% /suggest
1. cargo check (0.85) - Fast syntax check
2. cargo build (0.80) - Full build

% 1  # Choose cargo check

# After multiple uses
% /suggest
1. cargo check (0.92) ⬆️ # Boosted!
2. cargo build (0.80)

Task Orchestration

% /plan setup a web API project with routes, models, tests

πŸ“Š Execution Plan:
β–Έ 4 stages Β· 8 tasks Β· ⚑ 25s
β”œβ”€ β†’ Stage 1: Create root
β”œβ”€ ⇉ Stage 2: Create dirs [parallel]
β”œβ”€ ⇉ Stage 3: Create files [parallel]
└─ β†’ Stage 4: Init config

% /execute
βœ“ 8/8 Β· 100% Β· 15s

DevOps Workflow

% /gs          # Git status (colorized)
% /gd          # Diff analysis
% /ga          # Auto-generate commit message
% /la app.log  # Analyze logs
% /sys         # System overview

πŸ“– More examples: Examples Directory

Documentation

Getting Started

Core Concepts

For Developers

Reference

πŸ“– Documentation Hub: docs/README.md

Architecture

User Input
   ↓
Smart Router ──┬── Shell Execution (auto-detected 100+ commands)
               β”œβ”€β”€ System Commands (/help, /suggest, /trace, etc.)
               └── LLM + Tool Calling (streaming output)
                      ↓
                 Proactive Suggestion System
                 β”œβ”€β”€ Context Analyzer (project type, history)
                 β”œβ”€β”€ Spell Checker (Levenshtein distance)
                 β”œβ”€β”€ Feedback Learner (user preferences)
                 └── Suggestion Cache (smart lifecycle)

Key Components:

  • Agent: Unified entry point, command routing
  • LLM Client: Streaming output, tool calling
  • Task System: Dependency analysis, parallel execution
  • Suggestion Engine: Three-source fusion (Context + History + LLM)
  • Tracer: Four-dimensional observation system
  • Web Server: Axum framework, WebSocket real-time communication

What's New

v1.39.0 - Intent Decomposition Auto-Execute + Eye Protection πŸŽ―πŸ‘οΈ

AI Thinking Visualization + Comfortable Long-Term Use

Core Improvements

Intent Decomposition Auto-Execute:

  • βœ… /decompose command now actually executes tools and returns real results (not just visualization)
  • βœ… See both AI thinking process (intent understanding, step planning) and get actual results
  • βœ… Consistent intelligent experience with direct execution mode, preserves teaching and debugging value

Eye Protection Color System Optimization:

  • βœ… Significantly reduced blue/cyan usage (blue light intensity reduced by 83%)
  • βœ… Adopted GitHub/Binance professional dark theme style
  • βœ… Removed 25+ glow effects, reducing eye fatigue
  • βœ… Long-term comfort increased by 113% (40 β†’ 85 score)
# Try intent decomposition auto-execute
% /decompose calculate 2 + 3
β†’ Show intent understanding β†’ Show step plan β†’ Auto-execute β†’ Return result: 5

# Eye protection colors are enabled by default, no configuration needed

πŸ“– Details: CHANGELOG.md v1.39.0


v1.38.0 - Cell Rerun Feature πŸ”„

Jupyter-like Experience Upgrade

  • βœ… One-click rerun of any historical command/conversation (Cell Rerun Feature)
  • βœ… Cyberpunk UI - Simple icon-style buttons
  • βœ… Real-time feedback - Loading state, error handling, button disabled
  • βœ… WebSocket communication - Complete frontend-backend message flow

πŸ“– Details: CHANGELOG.md v1.38.0


v1.28.0 - Web Round Visualization πŸ“’

Jupyter-ification of Conversation History

  • βœ… Jupyter-like conversation round cards
  • βœ… Dual view mode (round view/traditional view) switching
  • βœ… Complete metadata display (time, duration, token statistics)
  • βœ… Cell collapse/expand for optimized long output display

πŸ“– Details: CHANGELOG.md v1.28.0


v1.24.0 - Full Internationalization Support 🌍

Seamless Bilingual Experience

  • βœ… Complete CLI internationalization: All command outputs, prompts, error messages
  • βœ… Bilingual LLM prompts: System prompts support Chinese context
  • βœ… Internationalized YAML config: Configuration file comments in both languages
  • βœ… Environment variable control: REALCONSOLE_LANG=zh-CN|en-US for dynamic switching

v1.23.0 - Web Terminal Release 🌐

Access RealConsole Anywhere

  • βœ… Complete web terminal implementation (Axum + WebSocket)
  • βœ… Smart routing and Intent understanding
  • βœ… Beautiful UI with real-time streaming output
  • βœ… Mobile-friendly responsive design
  • βœ… LAN access support

πŸ“– Complete Web Terminal Documentation: Web Terminal User Guide


More historical features see CHANGELOG.md | Complete version history: docs/03-evolution/version-history.md

Disclaimer

This program is implemented using Claude Code's Vibe Coding approach. It is intended for educational, research, and technical exploration purposes only. Not recommended for production use.

By using this program, you acknowledge its experimental nature and assume full responsibility for any consequences.

Contributing

Contributions welcome! See Developer Guide and Contributing Guide.

# Run tests
cargo test

# Format code
cargo fmt

# Lint
cargo clippy

License

MIT License

Acknowledgments

  • Inspiration: SmartConsole (Python version)
  • Community: Rust Community, LLM Providers (Ollama, Deepseek, Gemini, OpenAI)
  • Development: Built with Claude Code

RealConsole - Where Philosophy Meets Technology

GitHub β€’ Documentation β€’ Examples β€’ Issues