npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jc4649/telegram-remote

v0.1.0

Published

pi coding-agent extension: lightweight Telegram remote control — configure a bot token and drive a session from anywhere. Pure outbound HTTPS, no inbound port.

Readme

telegram-remote

Drive this pi session from anywhere via a Telegram bot. DM your bot a prompt → it's injected into your live session → the agent's reply is sent back to the chat.

Pure outbound HTTPS to api.telegram.org (long-poll getUpdates + sendMessage). No inbound port, no public URL, no hosting — works behind home NAT. Telegram's servers are the relay.

Architecture

  • core.ts — pure, unit-tested logic: parseUpdates, extractReplyText, chunkMessage. No I/O.
  • index.ts — the I/O shell: config load, the polling loop, and the session_start / agent_end / session_shutdown wiring.

Run the tests with npm test (Node's built-in test runner via tsx).

Setup (~2 min)

  1. In your normal Telegram app, message @BotFather, send /newbot, follow the prompts, and copy the bot token it gives you (123456789:AA...).

  2. Send your new bot any message (so it has a chat to reply to).

  3. Find your numeric chat id: open https://api.telegram.org/bot<TOKEN>/getUpdates in a browser and read result[].message.chat.id.

  4. Create ~/.pi/telegram-remote.json (gitignored) — see telegram-remote.example.json:

    {
      "botToken": "123456789:AA...",
      "chatId": 123456789,
      "deliverAs": "steer",
      "pollTimeoutSec": 30
    }
  5. Start (or restart) pi. Activity is logged to ~/.pi/telegram-remote.log.

If the config file is absent or invalid, the extension stays completely inert.

Config

| Key | Default | Meaning | |---|---|---| | botToken | — (required) | Bot token from @BotFather | | chatId | — (required) | Your numeric chat id; messages from any other chat are ignored | | deliverAs | "steer" | "steer" injects into the current turn (submits immediately when idle); "followUp" queues after the current turn instead of interrupting | | pollTimeoutSec | 30 | Long-poll hold time for getUpdates |

Behaviour notes

  • Backlog is drained on startup — messages you sent while pi was offline are discarded, not replayed, so stale prompts don't auto-run.
  • Only remote-initiated turns reply back. Work you start at the local terminal is not mirrored to Telegram; only turns triggered by a Telegram message send their reply to the chat.
  • Replies over 4096 chars are split into multiple messages on newline boundaries (Telegram's per-message limit).
  • Only the chat id in your config is honored — a stranger who finds the bot is ignored. The token is the only secret; keep telegram-remote.json out of git.