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

telec

v0.1.4

Published

Scriptable Telegram CLI on top of TDLib.

Downloads

42

Readme

telec

Scriptable Telegram CLI on top of TDLib.

Install

Homebrew

brew tap buftio/tap
brew install telec

npm

npm install -g telec

or:

npx telec --help

Runtime dependency

Install TDLib first:

brew install tdlib

Supported prebuilt targets today:

  • macOS arm64
  • Linux x64

Development

  1. Install dependencies:
bun install
  1. Run the CLI:
bun run telec --help

First Launch

telec does not ship Telegram app credentials.

On the first command that needs Telegram access, the app will:

  1. Prompt you for your own api_id and api_hash
  2. Store them in your macOS Keychain
  3. Generate a TDLib database encryption key
  4. Store that encryption key in your macOS Keychain too

Create your Telegram app credentials here:

After that, the CLI reuses the stored values automatically.

Keychain service names use the telec.<env> namespace.

Development Overrides

For local development or CI, you can still provide values through environment variables or a local .env file:

TELEGRAM_APP_API_ID=12345
TELEGRAM_APP_API_HASH=your_hash
TDLIB_JSON_PATH=/opt/homebrew/opt/tdlib/lib/libtdjson.dylib

If TDLIB_DATABASE_ENCRYPTION_KEY is not provided, telec will create one and store it in Keychain on first interactive run.

  • TDLib session data is stored under ~/Library/Application Support/telec/<env>/.

Build

bun run build

Release binaries:

bun run build:release

Package release assets and render the Homebrew formula:

bun run release:prepare

Validate the generated Homebrew formula locally:

bun run validate:homebrew

The compiled binaries still require TDLib to be installed, or TDLIB_JSON_PATH to point at libtdjson.

File Attachments

Send a local file to a chat:

bun run telec send-file -c saved --file-path /absolute/path/to/file.pdf --caption "optional"

Download an attachment from a message to a chosen path:

bun run telec download -c saved --message-id 123456 --output-path /absolute/path/to/file.pdf