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

alfred-os

v1.0.0

Published

AOS (Alfred Operating System) — Personal AI assistant runtime bridging Claude Code to Telegram

Readme

AOS — Alfred Operating System

Personal AI assistant runtime that bridges Claude Code to Telegram via the Anthropic Agent SDK.

AOS spawns the real claude CLI as a subprocess — not an API wrapper. You get your full desktop Claude Code capabilities from your phone.

Features

  • Full Claude Code access — All skills, MCP servers, and tools available remotely
  • Session persistence — Conversations continue across messages via SQLite
  • Dual-sector memory — Semantic + episodic memory with FTS5 search and salience decay
  • Voice notes — Speech-to-text via Groq Whisper, text-to-speech via ElevenLabs
  • Media handling — Photos, documents, and videos forwarded to Claude for analysis
  • Scheduled tasks — Cron-based autonomous task execution with delivery and auto-disable on repeated failure
  • Security — Chat ID allowlist, outbound secret redaction, PID lock, systemd hardening

Prerequisites

  • Node.js >= 20
  • Claude Code CLI installed and authenticated (claude command available)
  • Telegram bot token (create via @BotFather)

Quick Start

npx alfred-os init
cd aos
npm start

That's it. The installer walks you through everything — dependencies, Telegram bot setup, API keys, building, and background service installation.

Alternative install methods

# Install globally for the `aos` command
npm install -g alfred-os
aos init my-assistant
cd my-assistant
aos start

# Or clone the repo directly
git clone https://github.com/GregMotenJr/aoc.git aos
cd aos
./install.sh
git clone https://github.com/GregMotenJr/aoc.git aos
cd aos
npm install
cp .env.example .env
# Edit .env with your tokens
npm run build
npm start

Configuration

Copy .env.example to .env and fill in your values. Required:

| Variable | Description | |----------|-------------| | TELEGRAM_BOT_TOKEN | Bot token from @BotFather | | ALLOWED_CHAT_ID | Your Telegram chat ID (send /chatid to the bot to get it) |

Optional features enabled by additional API keys:

| Variable | Feature | |----------|---------| | GROQ_API_KEY | Voice transcription via Whisper (console.groq.com) | | ELEVENLABS_API_KEY + ELEVENLABS_VOICE_ID | Voice replies (elevenlabs.io) | | GOOGLE_API_KEY | Video analysis via Gemini (aistudio.google.com) |

Advanced tuning (all optional with sensible defaults):

| Variable | Default | Description | |----------|---------|-------------| | ALLOWED_CHAT_IDS | — | Comma-separated additional chat IDs for multi-user | | WORKSPACE_DIR | project root | Directory where CLAUDE.md lives | | LOG_LEVEL | info | trace, debug, info, warn, error, fatal | | SCHEDULER_POLL_INTERVAL | 60000 | Task poll interval in ms | | MEMORY_DECAY_RATE | 0.98 | Daily salience multiplier (0–1) | | MEMORY_MIN_SALIENCE | 0.1 | Threshold below which memories are auto-deleted | | MAX_MEMORY_RESULTS | 8 | Max memories injected per message context |

Commands

Telegram

| Command | Description | |---------|-------------| | /start | Show greeting and available commands | | /chatid | Echo your Telegram chat ID | | /newchat | Clear session, start fresh conversation | | /forget | Alias for /newchat | | /memory | View stored memories with salience scores | | /voice | Toggle voice reply mode | | /schedule | Manage scheduled tasks (create, list, pause, resume, delete) | | /backup | Download SQLite database backup |

CLI

| Command | Description | |---------|-------------| | aos init [dir] | Create a new AOS project (interactive setup) | | aos start | Start the bot (from project directory) | | aos status | Health check (from project directory) | | npm start | Run the bot (production) | | npm run dev | Run in development mode (pretty logs) | | npm run status | System health check | | npm run schedule | Manage scheduled tasks via CLI | | npm test | Run test suite (70 tests) | | npm run build | Compile TypeScript | | npm run typecheck | Type-check without emitting |

Architecture

install.sh             One-command installer (deps, config, build, service)

src/
├── cli.ts             CLI entry point (aos init / aos start / aos status)
├── index.ts           Entry point + lifecycle (signal handling, graceful shutdown)
├── agent.ts           Claude Code SDK wrapper (query, session resume, usage tracking)
├── bot.ts             Telegram bot (grammY) — commands, media handlers, Markdown→HTML formatter
├── config.ts          Typed configuration from .env (paths, keys, tuning constants)
├── db.ts              SQLite schema + CRUD (sessions, memories w/ FTS5, scheduled tasks)
├── env.ts             Safe .env parser (never pollutes process.env)
├── logger.ts          Pino structured logging (pretty in dev, JSON in prod)
├── media.ts           Telegram file download, upload cleanup, message builders
├── memory.ts          Dual-sector memory engine (semantic/episodic, FTS5 search, salience decay)
├── scheduler.ts       Cron-based task polling with 3-strike auto-disable
├── schedule-cli.ts    CLI interface for scheduled task management
├── security.ts        Chat ID auth, outbound secret redaction, PID lock
└── voice.ts           STT (Groq Whisper) + TTS (ElevenLabs)

scripts/
├── setup.ts           Interactive setup wizard (used by install.sh)
├── status.ts          System health check (Node, Claude CLI, .env, DB, process)
├── heartbeat.sh       Cron-based process monitor with auto-restart
└── notify.sh          Send Telegram messages from shell scripts

Memory System

AOS uses a dual-sector memory model inspired by cognitive architecture:

  • Semantic memories — Long-term facts and preferences (triggered by signals like "I prefer", "always", "never")
  • Episodic memories — Conversation context and events

Memories are automatically:

  • Saved from each conversation turn
  • Retrieved via FTS5 full-text search + recency ranking
  • Boosted when accessed (salience increases by 0.1, capped at 5.0)
  • Decayed daily (configurable rate, default 2%/day)
  • Pruned when salience drops below minimum threshold

Deployment

systemd (recommended)

The setup wizard installs a systemd user service automatically:

systemctl --user start aos
systemctl --user stop aos
systemctl --user status aos
journalctl --user -u aos -f

Heartbeat monitoring

Add to crontab for automatic restart on crash:

*/10 * * * * /path/to/aos/scripts/heartbeat.sh

Multi-instance

Deploy to multiple machines with different personalities. Only these files differ:

  • .env — Tokens and API keys
  • CLAUDE.md — Personality and context

Everything else is identical.

Security

  • Chat ID allowlist — Only configured users can interact with the bot
  • First-run mode — Accepts all chats when no ALLOWED_CHAT_ID is set (for initial /chatid discovery)
  • Secret redaction — API keys, tokens, and passwords are automatically stripped from outbound messages
  • PID lock — Prevents duplicate instances; auto-kills stale processes
  • systemd hardeningNoNewPrivileges, ProtectSystem=strict, PrivateTmp

License

MIT