← All tools

Ferret

Small, fast, fetches anything. A Telegram bot that pipes Claude Code CLI straight into your chat - running on your own server, billed to your own subscription.

Beta Self-hosted · Telegram · Open source

What it does

Ferret runs Claude Code CLI as a subprocess on your VPS and connects it to a Telegram bot. Send a message - Ferret forwards it to Claude, streams the response back, and formats it cleanly for Telegram. You get named dialogs with persistent memory, per-dialog model selection (Opus, Sonnet, Haiku), and conversation logs - all from any device with Telegram installed.

Why I built it

I wanted Claude on my phone without a third-party app, without paying API markup on top of a subscription I already have, and without my conversation history sitting on someone else's server. Claude Code CLI is the right tool - it handles sessions, tool use, and auth - but it's terminal-only. Ferret is the missing Telegram wrapper.

How it works

  • Runs as a systemd service on any Linux VPS under a non-root user.
  • Each chat message spawns a short-lived claude -p subprocess and resumes the stored session.
  • Session IDs are stored in SQLite - dialogs survive restarts and can be switched on the fly.
  • Inline keyboard for switching, renaming, and deleting dialogs without typing commands.
  • Billing goes to your existing Claude subscription or ANTHROPIC_API_KEY - Ferret adds zero overhead.
  • Concurrency guard: one active Claude process per chat at a time.
  • Multi-user: ALLOWED_USER_IDS accepts a comma-separated list; each user gets isolated dialogs.

Get it

Open source · MIT license · Fork it, self-host it, make it yours

Feedback

Bugs and feature requests via GitHub Issues. Anything else: email.