Skip to content

Latest commit

 

History

History
246 lines (175 loc) · 6.37 KB

File metadata and controls

246 lines (175 loc) · 6.37 KB

Offeline

Offeline is a local-first AI desktop application that runs entirely on your machine. Have private, secure conversations with open-source AI models using Ollama or llama.cpp - no cloud, no tracking, just you and AI.

Note

This is the electron build of offeline, see the web version here web-version

DEMO

Offeline.mp4

Features

  • Multiple AI Backends - Choose between Ollama and llama.cpp for model inference
  • 100% Local & Private - All conversations and inference happen on your machine
  • Export Conversations - Save your chats as JSON or Markdown
  • Easy Model Selection - Switch between different open-source models with one click
  • Lightning Fast - Near-instant responses with local inference
  • Dark Mode - Beautiful dark/light themes
  • Keyboard Shortcuts - Power user features throughout
  • Markdown Support - Rich formatting in messages with code highlighting

Tech Stack

  • Electron - Cross-platform desktop app
  • React 18 - UI framework with TypeScript
  • Monaco Editor - VSCode-powered code highlighting
  • Ollama - Easy model management and inference
  • llama.cpp - High-performance CPU/GPU inference
  • Tailwind CSS - Styling
  • Zustand - State management

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Choose one or both:

Installation

  1. Clone the repository:
git clone https://github.com/iBz-04/offeline_app.git
cd offeline
  1. Install dependencies:
npm install

Important: You must use npm. Other package managers are not currently supported.

  1. Install a backend (choose one):

Option A: Ollama (Recommended for beginners)

# macOS/Linux
curl -fsSL https://ollama.ai/install.sh | sh

# Windows: Download from https://ollama.ai

Then pull a model:

ollama pull llama3.2

Option B: llama.cpp

# Follow instructions at https://github.com/ggerganov/llama.cpp
# Download GGUF models to a folder
  1. Run in development mode:
npm run dev
  1. Build for production:
npm run build
npm run dist

Usage

  1. Start a Conversation - Click "New Chat" or press Cmd/Ctrl+N
  2. Select a Model - Choose from available models in the sidebar
  3. Start Chatting - Type your message and press Cmd/Ctrl+Enter to send
  4. Export - Save conversations as JSON or Markdown from the menu

Development

Project Structure

offeline/
├── src/
│   ├── main/              # Electron main process
│   │   ├── index.ts       # Main entry point
│   │   ├── ollama.ts      # Ollama backend integration
│   │   └── llamacpp.ts    # llama.cpp integration
│   ├── renderer/          # React app
│   │   ├── components/    # UI components
│   │   ├── views/         # Page views
│   │   ├── stores/        # Zustand stores
│   │   ├── services/      # Backend services
│   │   └── utils/         # Utilities
│   └── preload/           # Preload scripts
├── dist/                  # Compiled output
└── release/               # Packaged apps

Available Scripts

  • npm run dev - Start development server with hot reload
  • npm run build - Build for production
  • npm run dist - Package the app for distribution
  • npm run test - Run tests

Keyboard Shortcuts

  • Cmd/Ctrl+N - New conversation
  • Cmd/Ctrl+Enter - Send message
  • Cmd/Ctrl+M - Change model
  • Cmd/Ctrl+E - Export conversation
  • Cmd/Ctrl+, - Open settings
  • Cmd/Ctrl+K - Command palette
  • Cmd/Ctrl+B - Toggle sidebar

Supported Models

Works with any model supported by your chosen backend:

Ollama Models:

  • Llama 3.2, 3.1, 3
  • Mistral & Mixtral
  • Phi-3
  • Gemma 2
  • Qwen
  • And many more at ollama.ai/library

llama.cpp Models:

  • Any GGUF format model
  • Optimized for CPU and GPU inference

Privacy & Security

  • 100% Local - No data leaves your machine
  • No Telemetry - We don't track anything
  • Open Source - Audit the code yourself
  • Your Data - All conversations stored locally

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your 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

License

MIT License - see LICENSE file for details

Acknowledgments

Built on the foundation of modern web technologies and the amazing open-source AI community.

  • Ollama team for making local AI accessible
  • llama.cpp contributors for performance optimization
  • The entire open-source LLM community

Note: This is a complete rewrite/rebrand of Bottleneck, transforming it from a GitHub PR tool into a local AI chat application. See OFFELINE_MIGRATION.md for the full migration plan.

Keyboard Shortcuts

Global

  • Cmd/Ctrl + B - Toggle sidebar
  • Cmd/Ctrl + Shift + B - Toggle right panel
  • Cmd/Ctrl + Shift + P - Command palette
  • Cmd/Ctrl + / - Show keyboard shortcuts

Navigation

  • Cmd/Ctrl + P - Go to PR
  • Cmd/Ctrl + T - Go to file
  • Cmd/Ctrl + [ - Previous PR
  • Cmd/Ctrl + ] - Next PR
  • Alt + Up - Previous file
  • Alt + Down - Next file

Review

  • Cmd/Ctrl + Enter - Submit comment
  • Cmd/Ctrl + Shift + A - Approve PR
  • Cmd/Ctrl + Shift + R - Request changes
  • V - Mark file as viewed
  • D - Toggle diff view
  • W - Toggle whitespace

Performance

Targets

  • PR list render: <300ms from cache, <1.5s cold fetch
  • First diff paint: <150ms for typical files
  • Handle 1k+ files / 50k+ changed lines smoothly
  • 60 FPS scrolling in all views

Optimizations

  • Virtualized lists and diff rendering
  • Web workers for diff computation
  • Incremental syntax highlighting
  • Smart caching with ETags
  • Concurrent API requests with rate limiting

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT

Acknowledgments

  • Built with Electron, React, and Monaco Editor
  • Inspired by the need for faster PR reviews
  • Optimized for teams using agent-based development