Files
bruno 6ebfb24fd9 fix: Update runner Docker socket configuration and Gitea instance URL
- Changed docker-compose.yml to mount OrbStack Docker socket path (/Users/brunogao/.orbstack/run/docker.sock)
- Updated GITEA_INSTANCE_URL to use 192.168.1.83:33000 instead of gitea:3000 for proper DNS resolution
- Both runner-docker and runner-k8s now correctly point to OrbStack Docker daemon
- This resolves the 'Cannot connect to the Docker daemon' error and DNS resolution failures
2025-11-13 17:59:28 +08:00
..
2025-11-13 17:59:28 +08:00
2025-11-13 17:59:28 +08:00

LJWX AI CLI - Your Intelligent Development Companion

LJWX AI CLI is a powerful command-line tool that brings AI assistance directly to your terminal. It supports multiple AI providers (OpenRouter, Ollama) and maintains context across sessions, making it perfect for sustained development work.

Features

  • Multi-Provider Support: Works with OpenRouter (Claude 4.5*, GPT-4, etc.) and Ollama (local models)
  • Persistent Context: Maintains conversation history across CLI sessions
  • Project Awareness: Automatically reads git diffs, file trees, and project structure
  • Multiple Commands: Chat, edit, review, plan, and configure
  • Claude-Style Interface: Familiar experience similar to Claude Code

*Note: Claude 4.5 models may require special access. Claude 3.5 models are generally available.

Installation

  1. Clone or download this repository
  2. Run the installation script:
    chmod +x install.sh
    ./install.sh
    

The installation script will:

  • Install Python dependencies
  • Create a symlink to make ljwx-ai globally available
  • Provide instructions to update your shell configuration

Manual Installation

  1. Clone or download this repository
  2. Make the CLI executable:
    chmod +x ljwx-ai
    
  3. Install Python dependencies:
    pip3 install -r requirements.txt --break-system-packages
    
  4. Make globally available by adding to your PATH:
    • Add the script's directory to your PATH in ~/.zshrc or ~/.bashrc:
    export PATH="$PATH:/path/to/ljwx-ai/directory"
    
    • Or create a symlink in a directory already in PATH:
    ln -s /full/path/to/ljwx-ai ~/.local/bin/ljwx-ai
    

Setup

Initialize the CLI with default configuration:

./ljwx-ai init

This creates a configuration file at ~/.ai-cli/config.yaml.

Configuration

Update your ~/.ai-cli/config.yaml with your API keys:

default_provider: openrouter
default_model: anthropic/claude-sonnet-4.5  # Note: Claude 4.5 may require special access
max_context_messages: 10
providers:
  openrouter:
    base_url: https://openrouter.ai/api/v1/chat/completions
    api_key: sk-or-xxx  # Replace with your OpenRouter API key
  ollama:
    base_url: http://192.168.1.83:11434/api/chat  # Internal IP address
    model: qwen3-coder:30b-a3b-q8_0

Note on Claude 4.5 Access: The Claude 4.5 models (sonnet-4.5 and haiku-4.5) may be in restricted access. If you encounter issues accessing them, consider using Claude 3.5 models as alternatives:

  • anthropic/claude-3.5-sonnet
  • anthropic/claude-3.5-haiku

Note on Ollama Configuration: The default Ollama configuration uses internal IP address 192.168.1.83 and the qwen3-coder:30b-a3b-q8_0 model. Update these values based on your Ollama setup.

Usage

Chat

Chat with the AI assistant:

./ljwx-ai chat "Explain how this function works"

Edit

Get AI assistance for editing files:

./ljwx-ai edit src/main.py
./ljwx-ai edit src/main.py --prompt "Refactor this to improve performance"

Review

Review code for issues and improvements:

./ljwx-ai review src/
./ljwx-ai review src/main.py --prompt "Check for security issues"

Plan

Generate development plans:

./ljwx-ai plan "Implement user authentication system"

Configuration Management

Manage CLI configuration:

./ljwx-ai config list                    # List current configuration
# For Claude 4.5 Haiku (if available):
./ljwx-ai config set model anthropic/claude-haiku-4.5
# Or for Claude 4.5 Sonnet (if available):
# ./ljwx-ai config set model anthropic/claude-sonnet-4.5
# Or for generally available Claude 3.5 Sonnet (recommended):
./ljwx-ai config set model anthropic/claude-3.5-sonnet
./ljwx-ai config reset                 # Reset configuration

Provider Override

You can override the default provider/model for any command:

./ai --provider ollama chat "Explain this Python code"
./ai --model anthropic/claude-4.5-haiku chat "Short response needed"

Commands

init

Initialize configuration and cache directories.

chat

Start a conversation with the AI assistant. The AI has access to your project context.

edit

Get AI assistance for editing specific files or directories.

review

Review code for potential issues, improvements, and best practices.

plan

Generate detailed development plans for features or tasks.

config

Manage configuration settings.

Context Management

The CLI maintains conversation context in .aicache/context.json in your project directory. This allows for sustained conversations with memory of previous interactions.

Project Awareness

When interacting with the AI, it automatically understands your project structure:

  • Git diffs
  • File tree
  • Current working directory

Providers

OpenRouter

Supports Claude 4.5* (Sonnet, Haiku), GPT-4, and many other models through OpenRouter's unified API.

*Note: Claude 4.5 models may require special access from OpenRouter. Claude 3.5 models (sonnet, haiku) are generally available.

Ollama

Run local models through Ollama for privacy-focused development.

Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

License

MIT License