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

edstem-cli

v0.4.0

Published

Agent-first CLI and MCP server for Ed Discussion

Readme

edstem-cli

TypeScript CLI and MCP access for Ed Discussion.

One Ed implementation powers three adapters:

  • edstem: compact JSON CLI for agents and scripts
  • edstem-mcp: local stdio MCP server
  • remote MCP: OAuth, encrypted Ed tokens, and SQLite for hosted connectors

Install

npm install -g edstem-cli
export ED_API_TOKEN="your-token"
edstem user --fields id,name,courses

Create a token at edstem.org/settings/api-tokens. The CLI also reads ~/.config/edstem-cli/token.

The npm package requires Node.js 20 or newer. The hosted remote adapter uses Bun.

CLI

JSON is the default. List commands return summaries without thread bodies, lesson slides, or repeated user records.

edstem courses
edstem threads 12345 --max 20 --fields id,number,title,flags
edstem thread 67890
edstem thread 12345#42
edstem lessons 12345 --module "Week 2"
edstem lesson 105199
edstem activity 12345 --max 10

Detail commands support Markdown export:

edstem thread 67890 --md --output thread.md
edstem lesson 105199 --md --output lesson.md

Raw Ed XML stays out of thread JSON unless you pass --include-html. Use --pretty for indented JSON and --legacy-json for the pre-0.4 thread shape.

Quiz and lesson-progress commands update your Ed state:

edstem lessons questions 4401
edstem lessons quiz 4401 --answer 991 --choice 2
edstem lessons quiz 4401 --submit
edstem lessons read 12345 Pre-Reading

Run edstem --help for the full command list.

Local MCP

Configure an MCP client to launch the stdio executable:

{
  "mcpServers": {
    "edstem": {
      "command": "edstem-mcp",
      "env": {
        "ED_API_TOKEN": "your-token"
      }
    }
  }
}

The server exposes courses, lessons, threads, activity, quiz submission, and lesson-progress tools. It returns compact JSON text without a duplicate structuredContent payload.

Agent skill

npx skills add https://github.com/bunizao/edstem-cli

# Check metadata or regenerate SKILL.md
edstem skills
edstem skills generate

SKILL.md derives its CLI table and MCP tool list from the code. CI rejects drift.

Remote MCP

The hosted adapter keeps each Ed token encrypted with AES-256-GCM and resolves it from the requesting OAuth identity. It enforces a separate write scope for quiz and progress mutations.

Public endpoint: https://edstem.tuuhub.com/mcp

Self-host with Docker:

cp .env.example .env
# Set MASTER_KEY and PUBLIC_BASE_URL.
docker compose up -d

The image exposes /healthz, /readyz, and /mcp. SQLite data lives in the app_data volume.

Development

npm install
npm run check
npm test
npm run build
npm run pack:check
npm run pack:smoke

npm test runs Vitest for the Node CLI and stdio MCP, then Bun tests for remote OAuth, security, SQLite, and end-to-end reconnect behavior.

License

Apache-2.0. The migrated remote MCP code retains its MIT notice in THIRD_PARTY_NOTICES.md.