whatisgithub

What is kklaw?

kkovacs/kklaw — explained in plain English

Analysis updated 2026-05-18

0TypeScriptAudience · developerComplexity · 2/5Setup · easy

In one sentence

A self-hosted Telegram bot that lets you chat with your Pi AI agent from your phone and feed it automated prompts from scripts.

Mindmap

mindmap
  root((kklaw))
    What it does
      Bridges Pi agent to Telegram
      Streams responses
      Watches inject directory
    Tech stack
      TypeScript
      Bun
      Telegram Bot API
    Use cases
      Chat from phone
      Automate prompts
      Chain instances
    Audience
      Developers
      Pi agent users
    Requirements
      Pi CLI installed
      Bun runtime
      Telegram bot token

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Chat with your Pi AI agent CLI from Telegram instead of a terminal.

USE CASE 2

Drop a file into a watched directory to automatically feed a prompt into your active Pi session, for example from a cron job.

USE CASE 3

Switch between named Pi sessions using Telegram slash commands to keep separate task contexts.

What is it built with?

TypeScriptBunTelegram Bot API

How does it compare?

kkovacs/kklaw0xradioac7iv/tempfsabboskhonov/hermium
Stars000
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity2/53/54/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires the Pi CLI and Bun installed, plus a Telegram bot token and user ID in a .env file.

So what is it?

kklaw is a lightweight, self-hosted Telegram bot that connects the Pi AI agent CLI to your phone. Pi is a command-line AI agent harness, kklaw acts as a personal gateway so you can chat with your Pi agent from Telegram, switch between sessions, run shell commands, and feed automated prompts to the agent, all without leaving your phone. The design philosophy is deliberately minimal: one user, one chat, one Pi instance. There is no multi-user support and no built-in scheduler. Instead, kklaw watches an inject directory on the filesystem. Any script, a cron job, a webhook, a monitoring alert, can drop a text file into that directory, and kklaw picks it up and fires its contents as a prompt into the active Pi session. The response streams back to Telegram. This makes it a general-purpose automation hook: you can schedule morning briefings, forward email notifications, or chain multiple kklaw instances together. You can switch between named Pi sessions from within Telegram using slash commands like /new, /resume, and /delete, keeping separate contexts for different tasks. Files sent as photos are passed directly to the Pi agent, files sent as documents are saved to a configurable upload directory instead. The runtime is TypeScript built with Bun. To use it, you install Pi and Bun, clone the repository, set a Telegram bot token and your Telegram user ID in a .env file, and run the bot. It can also be compiled into a standalone binary. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Set up kklaw to connect my Pi agent CLI to Telegram
Prompt 2
Explain how the inject directory automation hook works in kklaw
Prompt 3
Help me write a cron job that drops a prompt file for kklaw to pick up
Prompt 4
How do I compile kklaw into a standalone binary with Bun?

Frequently asked questions

What is kklaw?

A self-hosted Telegram bot that lets you chat with your Pi AI agent from your phone and feed it automated prompts from scripts.

What language is kklaw written in?

Mainly TypeScript. The stack also includes TypeScript, Bun, Telegram Bot API.

How hard is kklaw to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is kklaw for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.