An expanded, feature-rich Bun-native CLI assistant and toolsuite with local & cloud multi-provider LLM support (Ollama, Google Gemini, Anthropic Claude, xAI Grok, OpenAI ChatGPT), 100% offline local voice processing (STT Speech-to-Text & TTS Text-to-Speech), pure JavaScript Markdown/PDF conversion tools, persistent memory management, Kanban task board, custom character profiles, chat session management, agentic web tools, and Telegram & WhatsApp Bridges!
-
π€ Multi-Provider LLM Engine:
- Ollama (Local):
llama3,mistral,qwen2.5,phi3,deepseek-r1 - Google Gemini:
gemini-2.5-flash,gemini-2.5-pro,gemini-2.0-flash,gemini-1.5-pro,gemini-1.5-flash - Anthropic Claude:
claude-3-7-sonnet-20250219,claude-3-5-sonnet-20241022,claude-3-5-haiku-20241022,claude-3-opus-20240229 - xAI Grok:
grok-2-latest,grok-2-1212,grok-2-vision-1212,grok-beta - OpenAI ChatGPT:
gpt-4o,gpt-4o-mini,gpt-4-turbo,gpt-3.5-turbo,o1,o3-mini - Dynamic provider auto-routing and streaming responses.
- Ollama (Local):
-
π 100% Local STT & TTS Voice Processing (Offline):
- Speech-To-Text (STT): Local Whisper ONNX model (
Xenova/whisper-tiny.en) transcribes voice attachments and audio files locally. - Text-To-Speech (TTS): Local MMS-TTS ONNX model (
Xenova/mms-tts-eng) synthesizes text answers into speech audio files (.wav/.ogg). - Automatic local voice note responses for Telegram and WhatsApp voice messages!
- Speech-To-Text (STT): Local Whisper ONNX model (
-
π Dagowan Real-Time WebSocket Voice Bridge & Web UI (
src/voice_socket.js):- Bun-native WebSocket server listening on
ws://127.0.0.1:8767/wsand serving Web UI athttp://127.0.0.1:8767. - Interactive Dagowan dark-mode interface with a glowing reactive voice orb & live spectrum visualizer.
- Real-time local Whisper STT transcription, LLM query processing, and local MMS-TTS audio playback in the browser.
- Supports "Hold to Speak" and "Continuous Duplex Voice" conversation modes.
- Launch via CLI command
/web(or/voice-socket,/dagowan) or launch flagbun run index.js --web.
- Bun-native WebSocket server listening on
-
π Pure JavaScript PDF & Markdown Tools:
- Convert Markdown notes in date ranges to PDF files using pure JS (
pdfkit+marked). - Extract text from PDF files back into Markdown notes (
pdf-parse).
- Convert Markdown notes in date ranges to PDF files using pure JS (
-
βοΈ Telegram Bot Integration (src/telegram.js):- Long-polling Telegram bot runner.
- Processes incoming text and voice messages using active character profiles, memory context, and workspace notes.
- Sends text replies and native Telegram voice note responses (
sendVoice).
-
π± WhatsApp HTTP Bridge (
src/whatsapp.js):- Baileys Web Socket bridge with pairing code & QR code web viewer (
http://127.0.0.1:8766/qr). - Automatic local Whisper transcription for incoming WhatsApp voice notes and native voice note replies (
ptt: true).
- Baileys Web Socket bridge with pairing code & QR code web viewer (
-
β± Proactive Chat Timers & Background Check-Ins:
- Configurable proactive chat idle timers in minutes (
/set-proactive-timer <minutes>). - Automatic background activity tracking per chat session (CLI, Telegram, WhatsApp).
- Sends background check-ins when user has been inactive for the set idle duration.
- Status and check interval configuration (
/proactive-status,/set-proactive-check <seconds>).
- Configurable proactive chat idle timers in minutes (
-
π§ Persistent Memory & Context Injection:
- Persistent memory snippets (
/remember <text>) saved tomemory.json. - Auto-refreshes active conversation context immediately upon memory updates.
- Query-relevance search and fallback to recent memories during conversation.
- Persistent memory snippets (
-
π Kanban Task Board:
- Task statuses: Processing (
p), Ongoing (o), Finished (f). - Automatic task numbering and background reminders (
/set-task-reminder).
- Task statuses: Processing (
-
π Character Profiles & System Prompts:
- Custom character personas in
characters.json. - Configurable system prompt templates and per-character LLM models.
- Custom character personas in
-
πΎ Backup & Restore State:
- Export/import full application state, settings, memories, tasks, and sessions (
/export-settings,/import-settings).
- Export/import full application state, settings, memories, tasks, and sessions (
We provide automated setup scripts for both Android PRoot-Distro Ubuntu and Standard Ubuntu Desktop / Server:
Universal installer for all Android devices running PRoot-Distro Ubuntu. Automatically installs system packages (ffmpeg, espeak, python3-pip, build-essential), Node.js 20, Bun, Python dependencies, bypasses native C++ compilation issues on Android (--ignore-scripts), and applies ONNX WASM, @napi-rs/canvas, pdf-parse, and sharp compatibility patches (patch_onnx.js):
chmod +x install.sh starter.sh
./install.shFor regular Ubuntu desktop machines, server environments, and cloud VPS instances. Automatically detects sudo privileges, installs system packages (libvips-dev, ffmpeg, espeak, python3-pip), Node.js 20, Bun, Python dependencies, and configures runtime patches (patch_onnx.js):
chmod +x install_ubuntu.sh starter.sh
./install_ubuntu.shAfter running either installer script, you can start the application using the startup wrapper or directly via Bun:
./starter.shOr manually:
bun startIf you prefer to install prerequisites manually:
- Bun Runtime (v1.0 or higher)
curl -fsSL https://bun.sh/install | bash - FFmpeg (Required for audio/voice conversion)
- Linux:
sudo apt install ffmpeg - macOS:
brew install ffmpeg
- Linux:
- Ollama Daemon (Optional, for local LLM models)
- Install from ollama.com and start daemon:
ollama serve ollama pull llama3
You can set provider API keys via environment variables, a .env file, or using slash commands inside the application.
Create a .env file in the root directory:
OPENAI_API_KEY=sk-proj-...
GEMINI_API_KEY=AIzaSy...
CLAUDE_API_KEY=sk-ant-...
GROK_API_KEY=xai-...Inside the running application:
/set-api-key openai sk-proj-...
/set-api-key gemini AIzaSy...
/set-api-key claude sk-ant-...
/set-api-key grok xai-...
bun startSet your Telegram token and launch:
TELEGRAM_TOKEN="your_bot_token" bun start(Or save token via /set-telegram-token <token> inside the CLI)
Start CLI with real-time WebSocket voice server & web interface enabled (suppressing ONNX log notices):
bun run web- Web UI Access: Open
http://127.0.0.1:8767in your browser. - In-App Slash Command: Type
/webinside the running CLI.
/web(or/voice-socket,/voice-server,/dagowan) β Launch real-time duplex voice web interface (http://127.0.0.1:8767)./voice <audio_file_path>β Transcribe audio file locally (Whisper STT), process question with LLM, and synthesize response./tts <text>β Synthesize text locally into a speech.wavfile using local MMS-TTS model./voice-reply [on|off](or/voicereply) β Toggle automatic local voice note response generation for answers.
/modelsβ List all available models across local Ollama, OpenAI, Gemini, Claude, and Grok./model [model-name]β View active model or switch model (e.g.,/model gemini-2.5-flash,/model claude-3-5-sonnet-20241022,/model grok-2-latest,/model gpt-4o,/model llama3)./set-api-key <provider> <api_key>(or/set-key <provider> <key>) β Set API key foropenai,gemini,claude, orgrok./api-keys(or/keys) β View status and source of configured provider API keys.
/convert-pdf [from_date] [to_date](or/pdf 2026-07 2026-08) β Batch convert Markdown notes to PDF files inpdfs/./pdf-to-md <filename.pdf>(or/convert-md notes.pdf) β Extract PDF text into Markdown note files innotes/./fetch-note-about <topic>(or/write-about <topic>) β Search notes for topic and synthesize response.
/register-task <description>(or/task <desc>) β Register a new task into Processing status (p)./get-tasks(or/tasks) β List active (unfinished) tasks./all-tasksβ List all tasks including finished./move-task-<id>-(p|o|f)(or/move-task <id> <p|o|f>) β Move task status (p: processing, o: ongoing, f: finished)./delete-task-<id>(or/delete-task <id>) β Delete task by ID./set-task-reminder <minutes>β Enable automatic background task reminders./stop-task-reminderβ Disable task reminders./task-reminder-statusβ Show current task reminder configuration.
/set-proactive-timer <minutes>(or/proactive-timer <mins>) β Set proactive chat idle timer in minutes (and enable proactive chat)./proactive-chat [on|off](or/proactive [on|off]) β Enable, disable, or toggle proactive chat check-ins./proactive-status(or/proactive-timer-status) β View current proactive chat timer & check-in settings./stop-proactive-timer(or/stop-proactive) β Disable proactive chat check-ins./set-proactive-check <seconds>(or/proactive-check <secs>) β Set background check frequency in seconds (default 60s).
/remember <text>β Save a persistent memory tomemory.json(auto-refreshes active conversation context)./memories(or/list-memories) β List all saved memories./delete-memory <index|timestamp>β Delete a memory entry./update-memory <index|timestamp> <new text>β Update memory content.
/character [name|id]β View or switch active character persona profile./charactersβ List available character profiles./create-character <Name> | <Model> | <Prompt>β Create a custom character persona./set-persona-prompt <prompt>β Set system prompt template for active character./set-telegram-token <token>β Save Telegram bot token to character profile./whatsapp-pair <phone_number>β Generate WhatsApp 8-digit phone pairing code./set-whatsapp-phone <phone_number>(or/whatsapp-number) β Set default WhatsApp phone number./reset-whatsapp-authβ Clear stale WhatsApp auth keys to reconnect.
/sessionsβ List saved conversation sessions./session <id>β Switch to session by ID./new-sessionβ Start a fresh chat session./delete-session <id>β Delete session by ID./rename-session <title>β Rename active session.
/export-settings [filename](or/backup) β Export application state, memories, tasks, and sessions tobackups/./import-settings [filename](or/restore) β Restore application state from a backup file./list-backupsβ List available backup files.
/search-youtube-for <query>β Search YouTube in default browser./search-google-for <query>β Search Google in default browser./search-giphy-for <query>β Search Giphy in default browser./open-browserβ Open system web browser.
/get-commands(or/commands,/help) β Display full command manual./clearβ Clear active conversation context window.exit/quitβ Save state and exit application.
.
βββ index.js # Main CLI entry point with interactive REPL & streaming
βββ package.json # Bun dependencies
βββ app_settings.json # Active application configuration
βββ memory.json # Memory persistence store
βββ tasks.json # Kanban tasks persistence store
βββ characters.json # Character profiles & system prompts
βββ chat_sessions.json # Chat sessions store
βββ whatsapp_qr.html # Web view for WhatsApp QR code & pairing
βββ voice_interface.html # Dagowan real-time voice web UI
βββ backups/ # Exported JSON backups
βββ notes/ # Workspace Markdown notes directory
βββ pdfs/ # Output directory for generated PDF files
βββ whatsapp_bridge/ # Node.js Baileys web socket bridge for WhatsApp
βββ src/
βββ config.js # Settings manager, export & import settings
βββ memory.js # Memory store & relevance search
βββ tasks.js # Kanban task board & reminder manager
βββ proactive.js # Proactive chat timers & idle check-in manager
βββ characters.js # Character profile manager & system prompt templates
βββ sessions.js # Chat sessions manager & cross-session context retrieval
βββ workspace.js # Workspace note file reader & relevance search
βββ pdf_utils.js # Pure JavaScript Markdown-to-PDF & PDF-to-Markdown tools
βββ providers.js # Unified Multi-Provider LLM engine (Ollama, Gemini, Claude, Grok, OpenAI)
βββ audio.js # 100% Local STT (Whisper) & Local TTS (MMS-TTS) audio models
βββ voice_socket.js # Real-Time WebSocket Voice Bridge & Server
βββ telegram.js # Telegram bot runner integration with voice attachment support
βββ whatsapp.js # WhatsApp HTTP bridge server integration
βββ commands.js # Slash commands dispatcher & help manual
This error occurs when the active model (or fallback model) is set to Ollama (http://127.0.0.1:11434), but the Ollama daemon process is not running or unreachable:
- Start the Ollama background daemon:
ollama serve & - Download your preferred model (e.g.
llama3ormistral):ollama pull llama3
- Test connection:
curl http://127.0.0.1:11434/api/tags
If you don't want to host local heavy models in PRoot-Distro, use a cloud provider:
- Save your API key:
/set-api-key gemini YOUR_GEMINI_API_KEY - Switch model:
/model gemini-2.5-flash
- DNS Resolution Failure: In PRoot-Distro, if external API calls (
api.telegram.orgorweb.whatsapp.com) fail, verify/etc/resolv.conf:echo "nameserver 8.8.8.8" > /etc/resolv.conf
- WhatsApp Session Desync: Reset stale WhatsApp pairing keys:
Then rescan QR at
/reset-whatsapp-authhttp://127.0.0.1:8766/qror request phone pairing code with/whatsapp-pair <phone_number>.
MIT License Β© Andrius Pratusis