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

zelai-cli

v1.3.0

Published

Zelai — official CLI & SDK for the Zelapi Agent API. Chat with AI right from your terminal, Discord, or Telegram. Multi-turn sessions, slash commands, limit warnings, and a built-in Discord/Telegram connector.

Readme

Zelai

Official CLI & SDK buat Zelapi Agent API — chat sama AI langsung dari terminal kamu, atau jalanin sebagai bot di Discord & Telegram.

  ███████╗███████╗██╗      █████╗ ██╗     by ZELAPI
  ╚══███╔╝██╔════╝██║     ██╔══██╗██║
    ███╔╝ █████╗  ██║     ███████║██║
   ███╔╝  ██╔══╝  ██║     ██╔══██║██║
  ███████╗███████╗███████╗██║  ██║██║
  ╚══════╝╚══════╝╚══════╝╚═╝  ╚═╝╚═╝

zelai adalah CLI bergaya Claude/Gemini CLI: tinggal panggil zelai di terminal, masuk chat REPL, ngobrol sama model AI Zelapi (opus, sonnet, haiku) lewat satu unified endpoint /api/v1/agent. Session persistent (otomatis disimpan di folder ./session), ada slash command (/status, /usage, /activity, dll), warning kalau quota habis, plus connector Discord & Telegram di folder connector/.

Install

Lewat npm (paling gampang):

npm install -g zelai-cli
zelai --version

Setelah install, command zelai langsung available di terminal lo.

Atau clone dari source:

git clone https://github.com/zelapi/zelai.git
cd zelai
npm install
npm link        # bikin command `zelai` global

Atau jalanin tanpa link:

node bin/zelai.js

Quickstart

zelai login        # masukin API key zel_…
zelai              # masuk chat REPL

Chat REPL look:

zelai by ZELAPI · v1.0.0
● Zelai Agent CLI  •  online  •  zelapioffciall.dpdns.org
  Ketik /help buat lihat command. /exit buat keluar.

you (haiku) › halo!
zelai(haiku) ›
hai juga! ada yang bisa aku bantu?

you (haiku) › /status
─────────────────────────────────────────
Server Status  ·  https://zelapioffciall.dpdns.org/api/status
  status     OK
  uptime     34h12m
  version    1.0.0
─────────────────────────────────────────

One-shot mode

zelai -p "ringkasin paper attention is all you need dalam 3 poin"

Slash commands

| Command | Fungsi | | ------------------ | --------------------------------------------------- | | /help | Tampilin daftar command | | /status | Cek https://zelapioffciall.dpdns.org/api/status | | /usage | Cek pemakaian + kuota API key | | /activity | Activity logs akun | | /model <name> | Ganti model: opus, sonnet, haiku | | /endpoint <path> | Ganti AI endpoint (mis. /ai/claila, /ai/spawn) | | /system <prompt> | Set system prompt | | /new | Mulai sesi baru | | /session <id> | Set / lihat session ID manual | | /sessions | List semua sesi tersimpan di ./session | | /load <id│nomor> | Load sesi tersimpan | | /forget <id│all> | Hapus sesi tersimpan | | /save | Paksa simpan sesi sekarang | | /login | Set / ganti API key | | /logout | Hapus API key | | /config | Tampilin path & isi config | | /clear | Bersihin layar | | /exit | Keluar (alias: /quit, /q) |

Session persistence

Folder ./session otomatis dibikin pas pertama kali zelai jalan, di working directory tempat kamu nge-run. Setiap sesi disimpan sebagai ./session/<session-id>.json — turn history, model, endpoint, system prompt semuanya lengkap.

Reload sesi otomatis: kalau kamu jalanin zelai lagi, last session di-resume dari file, jadi context tetap kebawa.

zelai --session zelapi-026391vehak07   # langsung load sesi tertentu
zelai sessions                          # list semua sesi tersimpan
zelai resume zelapi-026391vehak07       # lanjutin sesi spesifik
zelai resume 1                          # lanjutin sesi nomor 1 dari `zelai sessions`
zelai resume                            # lanjutin sesi paling baru (default)

Warning ketika limit habis

Kalau API key kamu kena rate limit / quota habis (HTTP 429 atau body yang nyebut limit/quota/exhausted), Zelai bakal nge-render box warning merah dengan info used, limit, plan, dan link upgrade. Plus, di awal sesi interaktif, Zelai cek soft kalau pemakaian udah ≥ 90% — ngasih heads-up.

Programmatic SDK

const { Zelai } = require('zelai');

const z = new Zelai({ apiKey: process.env.ZELAPI_KEY });

const { reply, sessionId } = await z.chat('halo!');
console.log(reply);

// Lanjutan sesi:
const next = await z.chat('lanjutin obrolannya', { sessionId });
console.log(next.reply);

// User endpoints:
console.log(await z.status());
console.log(await z.usage());
console.log(await z.activityLogs());

Connectors (Discord + Telegram)

Lihat connector/README.md. Singkatnya:

# Discord
npm install discord.js
ZELAPI_KEY=… DISCORD_TOKEN=… node connector/discord.js

# Telegram (zero extra deps)
ZELAPI_KEY=… TELEGRAM_TOKEN=… node connector/telegram.js

Session map antar-channel disimpan di ./session/_connector-map.json — chat di bot Discord tetap nyambung kalau sebelumnya lo udah ngobrol via CLI.

API spec ringkas

| Field | Type | Notes | | -------------------- | -------- | ------------------------------------------- | | endpoint | string | wajib — mis. /ai/claila | | model | string | opsional — opus/sonnet/haiku | | system | string | opsional — system prompt | | messages | array | wajib[{role, content, session?}] | | messages[].session | string | opsional — lanjutin sesi sebelumnya |

Auth: Authorization: Bearer zel_xxxxxxx.

Docs lengkap: https://zelapioffciall.dpdns.org

Env vars

| Variable | Fungsi | | ------------------ | -------------------------------------------- | | ZELAPI_KEY | Default API key | | ZELAI_MODEL | Default model untuk connectors | | ZELAI_ENDPOINT | Default AI endpoint untuk connectors | | ZELAI_SYSTEM | Default system prompt untuk connectors | | ZELAI_DEBUG | Print stack trace kalau error | | DISCORD_TOKEN | Token bot Discord | | DISCORD_PREFIX | Prefix command Discord (default !zelai) | | TELEGRAM_TOKEN | Token bot Telegram | | TELEGRAM_ALLOW | Comma-separated chat/user IDs (whitelist) |

License

MIT © Zelapi