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

@amanm/disk-agent

v2.1.1

Published

OpenClaw/Hermes-style personal AI agent gateway powered by Pi — Telegram, memory, cron, SuperGrok

Readme

Disk Agent

OpenClaw / Hermes-style personal AI agent gateway, powered by the Pi coding-agent SDK.

Chat from Telegram (or a local CLI), with persistent memory, cron/heartbeat automations, browser/web tools, and per-peer session management — running on your machine.

You (Telegram / CLI)
        │
        ▼
   ┌─────────┐     sessions · memory · cron · browser
   │ Gateway │──────────────────────────────────────────┐
   └────┬────┘                                          │
        │  agentic loop (Pi SDK)                        │
        ▼                                               ▼
   LLM + tools                              ~/.disk-agent/
   (read/bash/edit/… + memory/cron/web)     workspace · skills · sessions

Install & setup (v1)

Requirements: Node.js ≥ 20.6

# 1) Install
npm install -g @amanm/disk-agent

# 2) Interactive setup (does everything)
disk-agent setup

That single setup wizard:

  1. Creates the standardized home directory (~/.disk-agent or $XDG_DATA_HOME/disk-agent)
  2. Seeds workspace identity files + built-in skills
  3. Prompts for agent name, model, Telegram bot token (from @BotFather), owner id, coding cwd
  4. Installs the Pi CLI if missing (@earendil-works/pi-coding-agent)
  5. Installs Pi extensions: pi-supergrok, pi-agent-browser-native, @tavily/pi-extension
  6. Installs agent-browser globally and runs agent-browser install (Chrome)
  7. Walks you through SuperGrok / X Premium OAuth (or skips if tokens / XAI_API_KEY already exist)

For Tavily web search, set TAVILY_API_KEY in ~/.disk-agent/.env (or the process env).

Non-interactive (CI / scripted):

disk-agent setup --yes --skip-login \
  --telegram-token "123456:ABC..." \
  --owner "your_telegram_user_id" \
  --tavily-key "tvly-..."
# later:
disk-agent login

Flags:

disk-agent setup \
  --name Disk \
  --model supergrok/grok-4.5 \
  --telegram-token "123456:ABC..." \
  --owner "your_telegram_user_id" \
  --tavily-key "tvly-..."   # optional: Tavily web_search / web_fetch \
  --skip-browser   # optional: skip agent-browser
  --skip-login     # optional: skip SuperGrok OAuth

Verify:

disk-agent doctor
disk-agent models
disk-agent status

Run

# secrets (if not passed to setup)
$EDITOR ~/.disk-agent/.env
# TELEGRAM_BOT_TOKEN=...
# TAVILY_API_KEY=tvly-...

# Detached (recommended on a VPS — survives logout)
disk-agent gateway start
disk-agent gateway status
disk-agent gateway stop
disk-agent gateway restart

# Update to the latest published version and restart the gateway
disk-agent update
disk-agent update --check          # report only
disk-agent update 1.2.0            # pin a version
disk-agent update --no-restart     # package only

# Foreground (dev / Ctrl+C to stop)
disk-agent gateway
# or
disk-agent chat             # local REPL only

Logs: ~/.disk-agent/logs/gateway.log · pid: ~/.disk-agent/gateway.pid

  1. DM your bot on Telegram → pairing code
  2. On the host: disk-agent pair <CODE>
  3. Chat normally

Telegram extras: /context (context window usage), /effort medium (thinking level).

From source

git clone <repo> && cd disk-agent
npm install
npm run build
npm link                  # optional — puts disk-agent on PATH
disk-agent setup

Features

| Area | What you get | |------|----------------| | Telegram channel | grammY long-polling bot, pairing / allowlist / owner policies, group mention gate, chunked replies, voice notes (Whisper STT) | | Memory | OpenClaw-style SOUL.md / USER.md / MEMORY.md / daily memory/YYYY-MM-DD.md + searchable fact store | | Cron + heartbeat | Cron expressions, every 30m, daily at 09:00, one-shots; quiet hours; HEARTBEAT_OK suppression | | Browser / web | Tavily web_search / web_fetch (@tavily/pi-extension, needs TAVILY_API_KEY); web_get (fetch+HTML strip); full automation when agent-browser is installed | | Sessions | Per-peer Pi session transcripts, /new archive+reset, /sessions + /resume, serialized lanes | | Coding agent | Full Pi toolset: read, bash, edit, write, grep, find, ls | | Skills / identity | Workspace + user skills under one home tree; bootstrap context each run |

Inspired by OpenClaw, Hermes Agent, and Pi.

Auth

| Method | How | |--------|-----| | SuperGrok / X Premium (recommended) | disk-agent setup or disk-agent login → OAuth → ~/.pi/agent/auth.json | | xAI API key | export XAI_API_KEY=… or put it in ~/.disk-agent/.env | | Other Pi providers | ANTHROPIC_API_KEY, OpenAI Codex OAuth via pi, etc. |

Auth is not stored under ~/.disk-agent — it deliberately uses ~/.pi/agent/auth.json so one SuperGrok login works for both pi and disk-agent.

disk-agent login              # SuperGrok OAuth
disk-agent login xai --type api_key
disk-agent models             # should show supergrok/* with [auth]

Standardized directory layout

Everything disk-agent owns lives under one home root:

| Priority | Path | |----------|------| | 1 | $DISK_AGENT_HOME | | 2 | $XDG_DATA_HOME/disk-agent | | 3 | ~/.disk-agent |

~/.disk-agent/
├── config.yaml              # gateway config
├── .env                     # secrets (not committed)
├── .env.example
├── workspace/               # agent identity & markdown memory
│   ├── SOUL.md              # personality
│   ├── USER.md              # who you are
│   ├── MEMORY.md            # curated long-term memory
│   ├── AGENTS.md            # operating rules
│   ├── HEARTBEAT.md         # proactive checklist
│   ├── IDENTITY.md
│   ├── memory/YYYY-MM-DD.md
│   ├── knowledge/
│   └── skills/**/SKILL.md   # workspace skills (default for skill_create)
├── skills/**/SKILL.md       # user-global skills
├── sessions/                # logical session index
├── pi-sessions/             # Pi jsonl transcripts (per peer)
├── cron/jobs.json
├── memory/facts.json        # structured facts
├── pairings/                # telegram allowlist + pending codes
├── browser/                 # screenshots / artifacts
├── media/                   # inbound Telegram files
├── prefs/
└── logs/gateway.log
disk-agent paths              # print resolved paths

Edit SOUL.md to change voice. The agent maintains USER.md / MEMORY.md over time.

Skills locations

| Location | Scope | |----------|--------| | ~/.disk-agent/workspace/skills/ | Workspace (default for skill_create) | | ~/.disk-agent/skills/ | User-global | | <cwd>/.agents/skills/ | Project | | ~/.agents/skills/ | Legacy interop (still discovered) |

Built-ins seeded on setup: create-skill, find-skills, remember.

CLI reference

disk-agent setup          Full bootstrap (home + pi + extensions + login)
disk-agent login [prov]   SuperGrok / provider OAuth
disk-agent doctor         Health check
disk-agent update         Update to latest npm version and restart the gateway
disk-agent paths          Print directory layout
disk-agent gateway        Foreground gateway (Telegram + cron)
disk-agent gateway start  Detached OS process (VPS-friendly)
disk-agent gateway stop   Stop detached gateway
disk-agent gateway status Detached process status
disk-agent gateway restart
disk-agent chat           Interactive local REPL
disk-agent pair <code>    Approve Telegram pairing
disk-agent status         Config / SuperGrok auth status
disk-agent models         List SuperGrok / xAI / other models
disk-agent sessions              List active conversation sessions
disk-agent sessions history      List archived (previous) sessions
disk-agent sessions resume <id>  Resume a previous session by id or .jsonl path
disk-agent sessions files        List raw pi-sessions transcripts (incl. orphans)
disk-agent chat --resume <id>    Start CLI chat on a previous session
disk-agent skills list|show|create|delete|paths
disk-agent memory list|search|save
disk-agent cron list|add|remove|run

Chat slash commands include /context (window usage), /effort <level> (thinking effort), /sessions (previous transcripts for this chat), and /resume <id>.

Session history

  • Each peer has one active transcript.
  • /new (or session_reset) archives the current transcript and starts fresh.
  • List archives: disk-agent sessions history or /sessions in chat.
  • Resume: disk-agent sessions resume <id> / disk-agent chat --resume <id> / /resume <id> (short id prefixes work).

Cron examples

disk-agent cron add morning "0 9 * * *" "Summarize my calendar priorities and send a short brief."
disk-agent cron add ping "every 2h" "Check HEARTBEAT.md monitors; HEARTBEAT_OK if nothing."
disk-agent cron add weekly "weekly" "Review MEMORY.md and suggest 3 cleanups."

Telegram security

Default DM policy is pairing:

  • Unknown users get a short-lived code
  • You approve with disk-agent pair <code> on the host
  • First paired user becomes ownerId if unset
telegram:
  enabled: true
  dmPolicy: pairing   # pairing | allowlist | owner_only | open
  allowFrom: []
  ownerId: "123456789"
  groupsRequireMention: true

Do not use open on a public bot.

Configuration

Primary file: ~/.disk-agent/config.yaml (created by setup).

agentName: Disk
cwd: /home/you/code          # coding tools working directory
model:
  provider: supergrok
  id: grok-4.5
  thinking: medium
telegram:
  enabled: true
  dmPolicy: pairing
cron:
  enabled: true
  heartbeat:
    enabled: true
    everyMinutes: 30
    quietHours: { start: 23, end: 8 }
browser:
  enabled: true
  headless: true
memory:
  enabled: true
  dailyLogDays: 2
logging:
  level: info

Environment overrides: TELEGRAM_BOT_TOKEN, DISK_AGENT_OWNER_ID, DISK_AGENT_MODEL, DISK_AGENT_PROVIDER, DISK_AGENT_HOME, DISK_AGENT_WORKSPACE, DISK_AGENT_CWD, XAI_API_KEY, plus other provider API keys.

Telegram voice messages

Voice notes (and optional audio files) are downloaded, transcribed with Whisper, and sent to the agent as text.

| Setting | Default | Notes | |---------|---------|--------| | voice.enabled | true | Set false to reject voice notes | | voice.provider | auto | auto picks OpenAI if OPENAI_API_KEY is set, else Groq if GROQ_API_KEY, else download-only | | voice.model | provider default | OpenAI: whisper-1; Groq: whisper-large-v3-turbo | | voice.language | unset | Optional ISO-639-1 hint (en, es, …) | | voice.includeAudio | true | Also process Telegram audio file messages |

# ~/.disk-agent/.env — pick one:
OPENAI_API_KEY=sk-...
# or free-tier Whisper:
GROQ_API_KEY=gsk_...

Restart the gateway after changing env: disk-agent gateway restart.

Agent tools

Built-in (Pi): read, bash, edit, write, grep, find, ls

| Extra tool | Purpose | |------------|---------| | memory_save / memory_search / memory_log / memory_delete | Long-term + daily memory | | cron_list / cron_add / cron_remove / cron_run | Scheduler | | web_search | Tavily web search (TAVILY_API_KEY) | | web_fetch | Tavily extract from URLs | | web_get | Fetch URL → text (plain HTTP) | | browser_open / snapshot / click / fill / screenshot | Browser automation | | session_list / session_reset / session_resume | Session management (list, archive, resume) | | skill_list / skill_load / skill_create / … | Skills |

Library usage

import { bootstrapHome, Gateway, runSetup } from "@amanm/disk-agent";

// Programmatic setup (same as CLI)
await runSetup({ yes: true, skipLogin: true });

const cfg = bootstrapHome();
const gw = new Gateway(cfg);
await gw.start();

Development

npm run dev -- status
npm run gateway
npm run typecheck
npm run build
npm test

Design notes

  1. Gateway as control plane — channels never call the LLM directly; everything is normalized → queued per session → agent loop → deliver.
  2. Markdown memory — sessions end, files persist (OpenClaw). Structured facts add search without a vector DB.
  3. Heartbeat — proactive loop with HEARTBEAT_OK suppression so you are not spammed.
  4. Pi as the hands — we embed createAgentSession rather than reimplementing a coding agent.
  5. Pairing by default — remote chat access is gated until you approve on the host.
  6. One home tree — config, workspace, skills, sessions, and logs share a standardized directory.

License

MIT