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

agent-afk

v2.26.4

Published

CLI tool for interacting with AI agents via multiple interfaces

Readme

Agent AFK

Past the happy path of AI coding.

One prompt, one agent, one clean diff is the easy case. Agent AFK is the runtime for everything after — multi-session work, nested subagents, verification loops, and traces you can actually read. Local-first. Bring your own model.

npm version Node

Install

npm install -g agent-afk

Requires Node ≥ 20. Then point it at an API key:

export ANTHROPIC_API_KEY=sk-ant-...
# or, for Anthropic OAuth:
afk login

Smoke test:

afk chat "hello"
afk doctor       # environment self-check

What you can do with it

  • Chat from your terminalafk chat "..." for one-shot, afk i for a REPL with full tool access (Bash, file ops, web fetch, grep/glob, subagents).
  • Hand long work off to a daemonafk daemon runs headless. Pair it with send_telegram and you get pings on your phone when work lands in a terminal state.
  • Message Claude from Telegramafk telegram setup walks you through bot token + allowlist. After that you have a private chat surface backed by the same session manager as the REPL.
  • Built-in orchestrators/mint, /diagnose, /forge, /audit-fit dispatch subagent waves. /mint takes a feature idea and runs spec → research → plan → parallelize → build → verify → ship. /diagnose forks parallel root-cause hypotheses for failing tests and bugs.
  • Cross-session memory — Claude remembers preferences, decisions, and procedures across runs. Backed by SQLite at ~/.afk/agent-framework/memory/ plus a HOT.md that injects into every future session's system prompt.
  • Background tasks — Ctrl+B in the REPL detaches the current turn into a tracked task; /tasks lists them, /attach <id> re-attaches.

Four surfaces, one session manager

| Command | Surface | |---|---| | afk chat "..." | One-shot turn — pipe-friendly, scripts well | | afk i (alias of afk interactive) | REPL with slash commands, streaming, plan mode, image paste | | afk daemon | Long-running headless agent, cron-friendly | | afk telegram start | Telegram bot — same tools, same memory, on your phone |

Configuration

agent-afk keeps all of its state under ~/.afk/ — sessions, plugins, memory, logs, settings. Nothing is shared with ~/.claude/. You can delete ~/.claude entirely and afk still runs.

Minimum viable config is one env var:

ANTHROPIC_API_KEY=sk-ant-...

Optional, in order of usefulness:

# Pick a model — opus | sonnet | haiku (Anthropic) or codex (OpenAI)
AFK_MODEL=sonnet

# Enable the Telegram bot + send_telegram tool
TELEGRAM_BOT_TOKEN=1234567890:ABC...
AFK_TELEGRAM_ALLOWED_CHAT_IDS=12345678

# Per-task safety rails
AFK_MAX_BUDGET_USD=5.00

Project-scoped system prompt. Drop an AFK.md at your project root and afk reads it as the system prompt whenever you run from that directory. No frontmatter needed.

Check what resolved. afk config dumps the live configuration. afk doctor validates keys, paths, and provider connectivity.

Models

Default is sonnet. Override per-call with --model:

afk chat "explain this stack trace" --model opus
afk i --model haiku
afk chat "refactor this" --model codex

| Model | Best for | |---|---| | opus | Complex reasoning, multi-step planning, long contexts | | sonnet | Day-to-day default — balanced speed and capability | | haiku | Fast, cheap, one-shots | | codex | OpenAI's GPT-5 family via @openai/codex-sdk |

Useful commands

afk status               # connection, model, bypass-mode state
afk doctor               # environment self-check
afk config               # dump resolved config
afk plugin list          # installed plugins under ~/.afk/plugins/
afk completion zsh       # shell completion (also: bash, fish)
afk --help               # full command tree

Aliases: afk cchat, afk iinteractive, afk sstatus.

A note on permissions

afk runs with bypass permissions by default: no per-tool prompts. Claude can run bash, read and write files, fetch URLs, and call MCP servers without asking each time. This is intentional — afk is built for unattended work, where a permission prompt with no human in front of it is just a wedged session.

Use afk on a machine and account you trust. Override per-session with --permission-mode if you want stricter behavior.

Troubleshooting

invalid x-api-key / ANTHROPIC_API_KEY not found — run afk doctor. Confirm the key is set in your shell or in ~/.afk/config/afk.env.

Cannot send message: session is closed — the session timed out or was closed. Start a new one (afk i or a fresh afk chat).

Maximum turns exceeded — safety rail tripped. Bump it with --max-turns 50 or higher.

Hit the budget cap — raise AFK_MAX_BUDGET_USD or unset it for the session.

Telegram bot won't startafk telegram status then afk telegram logs. Most common cause: missing AFK_TELEGRAM_ALLOWED_CHAT_IDS after token setup.

Changelog

Recent releases at CHANGELOG.md, also viewable in-REPL via /changelog.

License

Proprietary. © Griffin Long. All rights reserved.

The agent-afk package on npm is provided as-is for use; the source is not licensed for redistribution, modification, or derivative works. See LICENSE.