Skip to content

Raxcore-dev/rax-offline-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Rax CLI - Next-Gen Offline AI

CI Release License

Fast, secure, and context-aware offline AI assistant powered by Llama 3.2.

Features

  • πŸ€– Claude Code-style Interface - Just type and chat, no need to prefix every message
  • πŸ’Ύ Persistent Chat History - All conversations auto-saved locally
  • πŸ“ Project Context - Automatically includes relevant files from your project
  • 🎨 Interactive TUI - Beautiful full-screen chat interface
  • πŸ”’ 100% Offline - No data leaves your machine
  • 🧠 CPU Optimized - Runs on CPU with Llama-3.2-1B (~650MB model)

Installation

Option 1: Official apt Repository (Recommended for Ubuntu/Debian)

# Add the repository key
curl -fsSL https://raxcore-dev.github.io/rax-offline-cli/repo.key | \
    sudo gpg --dearmor -o /usr/share/keyrings/rax-archive-keyring.gpg

# Add the repository
echo "deb [signed-by=/usr/share/keyrings/rax-archive-keyring.gpg] https://raxcore-dev.github.io/rax-offline-cli/ /" | \
    sudo tee /etc/apt/sources.list.d/rax.list

# Update and install
sudo apt update
sudo apt install rax

Option 2: Download .deb Package

# Download the latest release
wget https://github.com/Raxcore-dev/rax-offline-cli/releases/latest/download/rax_0.1.0_amd64.deb

# Install
sudo apt install ./rax_0.1.0_amd64.deb

Option 3: Official Installer Script

# Download and run the installer
curl -fsSL https://raw.githubusercontent.com/Raxcore-dev/rax-offline-cli/main/install-official.sh | bash

Option 4: Build from Source

# Clone the repository
git clone https://github.com/rax-cli/rax-cli.git
cd rax-cli

# Build
cargo build --release

# Run
./target/release/rax

# Or install system-wide
./install.sh

Quick Start

After installation, just run:

rax

The first run will:

  1. Show a welcome screen
  2. Download the AI model (~650 MB, one-time)
  3. Start the interactive chat

Usage

Basic Chat

rax                          # Start interactive chat
rax "What is Rust?"          # Quick single question
rax -c "Fix this code"       # Include project context
rax -i                       # Full TUI mode

Interactive Commands

/help          # Show commands
/clear         # Clear chat history
/list          # List saved conversations
/save          # Save current chat
/quit          # Exit

CLI Options

rax -i                       # Full TUI mode
rax -c "Question"            # Include project context
rax --list-chats             # List all conversations
rax --resume 3               # Resume conversation #3
rax --delete-chat 2          # Delete conversation #2
rax --status                 # Show install status
rax --uninstall              # Remove model & data
rax --export chat.md         # Export chat to Markdown

Examples

Chat about code

❯ What does this Rust code do?
πŸ€– This code implements a thread-safe counter using Arc and Mutex...

Get help with errors

❯ I'm getting a borrow checker error
πŸ€– The borrow checker is complaining because you're trying to...

Project context

# Automatically includes relevant files
rax -c "How can I improve this architecture?"

Data Storage

All data stored locally in ~/.local/share/RaxCli/:

  • model.gguf - The Llama model (downloaded once)
  • chat_history.json - All conversations
  • config.json - Settings
  • context_cache.json - Cached project files

Uninstall

# Remove package (keeps chat history)
sudo apt remove rax

# Remove completely (including chat history)
sudo apt purge rax

# Or manually
rm -rf ~/.local/share/RaxCli

Requirements

For apt Installation

  • Ubuntu 20.04+ or Debian 11+
  • curl or wget

For Source Installation

  • Rust 1.70+
  • build-essential, libssl-dev, pkg-config
  • ~700MB disk space for model
  • 4GB+ RAM recommended

Keyboard Shortcuts

Key Action
Enter Send message
Ctrl+C Exit
Esc Exit (TUI mode)
↑/↓ Scroll history (TUI)

Troubleshooting

Model download fails

# Retry by running rax again
rax

Check installation status

rax --status

Re-download model

rax --update-model

Permission denied

# Make sure the binary is executable
chmod +x ~/.local/bin/rax

Development

Build

cargo build --release

Test

cargo test

Build .deb package

./build-deb.sh

Update apt Repository

./update-repo.sh

CI/CD

The project uses GitHub Actions for:

  • CI: Build and test on every push/PR
  • Release: Create GitHub releases with artifacts
  • Deploy: Automatically deploy apt repository to GitHub Pages

Project Structure

rax-cli/
β”œβ”€β”€ src/
β”‚   └── main.rs          # Main application code
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”‚       β”œβ”€β”€ ci.yml       # Continuous integration
β”‚       β”œβ”€β”€ release.yml  # Release automation
β”‚       └── deploy-repo.yml  # apt repository deployment
β”œβ”€β”€ repo/
β”‚   └── ...              # apt repository structure
β”œβ”€β”€ build-deb.sh         # Debian package builder
β”œβ”€β”€ install-official.sh  # Official installer script
└── README.md            # This file

License

MIT License - see LICENSE for details.

Credits

Built with:

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Support