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

ideas-cli

v0.1.3

Published

Local-first ideas CLI with markdown storage and AI helpers

Downloads

34

Readme

ideas-cli

ideas is a local-first command-line tool for capturing ideas as Markdown on disk—no server, no database. Optional helpers call models through the Vercel AI Gateway (via the ai SDK) to expand or rewrite note bodies using your own context files.

What it does

  • Stores ideas under a configurable home directory (default ~/.ideas) as .md files with YAML frontmatter (id, title, slug, stage, timestamps).
  • Stages workflow: each idea lives in inboxdraftsposts (promote moves files between folders and updates frontmatter).
  • Lists and opens ideas in a table; you can pass an id or use an interactive picker when stdin/stdout are a TTY.
  • AI (optional): expand turns a rough note into a structured outline; rewrite improves clarity while preserving meaning. Both merge optional Markdown from context/ into the prompt. context build prints or writes that merged context for inspection or reuse.

How it works

  1. Initializationideas init creates config/, inbox/, drafts/, posts/, context/, scratch/, templates/, writes config/config.json (defaults for editor and AI model ids), and config/models.json (registry snapshot; reserved for future use).

  2. Files — New ideas are saved as {id}-{slug}.md in inbox/. The id is a 16-byte hex string. Bodies are Markdown after the frontmatter (parsed with gray-matter).

  3. Configconfig.json is validated with Zod. Paths like ~/.ideas are expanded from the home directory. Override the root with IDEAS_HOME (used when resolving config.json location at bootstrap).

  4. Environment — Before commands run, the CLI loads env files in order without overriding existing variables: ./.env.local, ./.env, then ~/.ideas/.env. This helps GUI apps and editors that do not load your shell profile.

  5. AIexpand / rewrite call generateText from the ai package with a model id string (e.g. anthropic/claude-sonnet-4.6). The gateway expects AI_GATEWAY_API_KEY. Model ids per task come from config.ai.models.expand and config.ai.models.rewrite (see defaults in the repo’s src/lib/config.ts).

  6. Context merge — If present, these files under context/ are concatenated into the prompt with headings: profile.md, voice.md, themes.md, projects.md, examples.md. ideas context build --source <file> appends an extra Source section from that file.

  7. Build — The published binary is a single ESM bundle from src/bin/ideas.ts (tsup), shebanged for node.

For broader design goals and a longer-term command list, see SPEC.md. The CLI currently implements the commands below; other commands listed in the spec are not shipped yet.

Requirements

  • Node.js 20+

Install from npm

The package is published as ideas-cli. The ideas name on npm belongs to another project, so this CLI is not installable as npm install -g ideas.

npm install -g ideas-cli

After install, the command you run is still ideas (see Quick start).

Install (local / dev)

npm install
npm run build

Run the CLI:

node dist/ideas.js --help

Link globally (optional):

npm link
ideas --help

Quick start

ideas init
ideas add "My first idea" --body "Some notes"
ideas list
ideas promote <id>          # or: ideas promote   (interactive picker)
ideas open <id>             # or: ideas open     (interactive picker)

AI commands

Set AI_GATEWAY_API_KEY (from the Vercel dashboard for AI Gateway). Optionally pin models:

ideas configure --model-expand openai/gpt-5.4 --model-rewrite openai/gpt-5.4
ideas expand <id>           # print to stdout
ideas expand <id> --write # replace idea body with output
ideas rewrite <id>
ideas rewrite <id> --write
ideas context build --source path/to/file.md -o /tmp/context.md

Optional context files: ~/.ideas/context/profile.md, voice.md, themes.md, projects.md, examples.md (paths follow IDEAS_HOME if set).

Environment

| Variable | Description | |----------|-------------| | IDEAS_HOME | Root directory for config and data (default: ~/.ideas). | | AI_GATEWAY_API_KEY | Required for expand and rewrite. |

Scripts

| Script | Description | |--------|-------------| | npm run build | Bundle CLI with tsup (dist/ideas.js) | | npm run dev | Run CLI with tsx (src/bin/ideas.ts) | | npm test | Vitest | | npm run release | changeset publish |

Layout

See SPEC.md for the full directory layout and principles.