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

@geekyants/think-before

v0.4.0

Published

A fast yes/no reflection CLI to surface the side-effects of a change before you make it. Scans your project (frontend/backend/full-stack) and asks stack-relevant questions. Think before you touch the big app.

Downloads

84

Readme

think-before

A fast yes/no reflection before you change something.

A small change in a big app is rarely small. think-before is a tiny, zero-dependency CLI that walks you through a sharp set of yes/no questions so the side-effects you'd otherwise discover in production surface on the whiteboard instead.

It's the pause between "this is a one-line fix" and git push.

$ npx @geekyants/think-before

Quick — Blast-radius check
A small change in a big app is rarely small. 60 seconds of honesty before you start.
Answer fast — y yes · n no · s skip · ? why · q quit

  Blast radius
   3/16 Is this in shared/global code used in many places? [y/n] ✓ yes  ⚠ worth a second look
         ↳ Shared code multiplies the blast radius — one edit ripples everywhere it's imported.

Quick start

No install needed:

npx @geekyants/think-before            # quick blast-radius check (default)
npx @geekyants/think-before full       # the full pre-development discovery checklist

Or install it:

npm install -g @geekyants/think-before
think-before                           # the installed command is just `think-before`

Modes

| Mode | What it's for | | --- | --- | | quick (default) | The "I'm about to touch the big app" moment. Blast radius, data, contracts, your safety net, and timing. | | full | A team-level pre-development discovery sweep: problem, users, scope, risks, plus the questions specific to your role. |

Both modes ask at most 10 questions — the ones most relevant to you. Every question is tagged with the roles it applies to and a priority; pick a role and you get your fundamentals plus your own specialty, never a wall of questions meant for someone else:

think-before --role designer        # quick check, design-focused
think-before full --role engineer   # discovery, architecture-focused
think-before full --role developer  # discovery, implementation-focused

Smart, stack-aware questions

Before each run, think-before does a quick read-only scan of your working directory and figures out whether it's frontend, backend, or full-stack — by recognizing common frameworks and tooling:

  • Frontend: React, Vue, Angular, Svelte, SolidJS, Preact, React Native, Expo, Vite, Tailwind …
  • Backend: Express, NestJS, Fastify, Koa, Django, Flask, FastAPI, Laravel, Symfony, Rails, Spring Boot, Go (Gin/Echo/Fiber), Actix/Axum, .NET …
  • Full-stack meta-frameworks: Next.js, Nuxt, Remix, SvelteKit, Astro
  • It also notices a database/ORM (Prisma, TypeORM, Sequelize, Mongoose, pg/mysql/mongodb, migrations), Docker, monorepos, and whether tests exist.

Based on what it finds, it appends a Stack-specific section with the questions that actually apply — API-contract and migration-safety questions for a backend, breakpoint/accessibility/shared-component questions for a frontend, deploy-ordering for full-stack, and so on.

Detected full-stack · Next.js, React  ·  role: engineer

  Stack-specific — full-stack (Next.js, React)
  22/31 Does this change a request/response shape, field, or status code a client depends on? [y/n] …
  26/31 Is the schema/migration reversible and backward-compatible with the running code? [y/n] …

Skip the scan anytime with --no-detect.

Your role & saved config

The first time you run it in a project, it asks what your role is (designer / engineer / developer) and tailors the whole question set to you. Your answer — plus the detected stack — is remembered per project in:

~/.config/think-before/config.json      # honors $XDG_CONFIG_HOME

So next time it doesn't ask again. To change it: --role <r> to set explicitly, or --reset-role to be asked again. See everything that's stored with:

think-before config

Full-screen mode

By default, in an interactive terminal think-before takes over the screen like a classic text-mode installer — one boxed question at a time, no scrollback noise, so you can actually think about each one:

╔══════════════════════════════════════════════════╗
║                think-before · quick                ║
╠══════════════════════════════════════════════════╣
║                                                    ║
║  Question 5 / 10  ·  Blast radius                  ║
║                                                    ║
║  Could this change behavior in flows you are NOT   ║
║  going to manually test?                           ║
║                                                    ║
║  ↳ The side-effects you don't test for are exactly ║
║    the ones that reach production.                 ║
║                                                    ║
║              ‹ Yes ›   ‹ No ›   ‹ Skip ›           ║
║                                                    ║
╚══════════════════════════════════════════════════╝
  y yes  n no  s skip  ? why  q quit   [█████░░░░░] 5/10

It uses the terminal's alternate screen buffer (like vim or less), so when you're done — or quit with q/Ctrl-C — your terminal is restored exactly as it was, and the summary + report prompt print into your normal scrollback.

When input is piped or it's not a real terminal (CI, | node …), it automatically falls back to the classic scrolling line mode — so scripting and pipelines still work. Force either mode with --no-tui / --tui.

How to answer

Single keypress, no Enter needed:

| Key | Meaning | | --- | --- | | y | yes | | n | no | | s or Enter | skip (logs it as an open question) | | ? | show why this question matters | | q or Esc | quit |

Answers that point at risk get flagged with a one-line reason. At the end you get a summary of everything worth a second look — and the option to save it.

A skipped question is an open question, not a free pass. A short list of "we don't know yet" is more valuable than a confident plan built on untested assumptions.

Options

--role <r>       Set your role: designer | engineer | developer (remembered per project)
--reset-role     Forget the saved role and ask again
--no-detect      Skip the project scan and stack-specific questions
--no-tui         Use the classic scrolling line mode instead of full-screen
--tui            Force full-screen mode
--save [file]    Save a Markdown report (optionally to <file>) without asking
--no-save        Don't save and don't ask
--list           Print the checklist and exit (no prompts)
--no-color       Disable colored output
-v, --version    Print version
-h, --help       Show this help

There's also a config mode (think-before config) that prints where your config lives, your saved role, and what was detected in the current directory.

The report is plain Markdown — drop it into a PR description, a ticket, or your design doc.

Use as a library

import {
  quick, full, filterSections, selectSections, runSession, buildMarkdown,
  detectProject, stackSection,
} from "@geekyants/think-before";

const detection = detectProject(process.cwd()); // { kind: "fullstack", frameworks: [...] }
const extra = stackSection(detection, "engineer");

const all = [...filterSections(full, "engineer"), ...(extra ? [extra] : [])];
const sections = selectSections(all, "engineer"); // role-tailored, capped at 10
const result = await runSession(full, sections);
const markdown = buildMarkdown(full, result, new Date());

Develop

npm install
npm run dev        # run the CLI straight from TypeScript source
npm run build      # compile to dist/
npm start          # run the built CLI

Want to add or tweak questions? They live in src/checklists.ts — each question declares which answer (yes/no) is the risky one, an optional why, the roles it applies to, and a priority (higher = asked first when the 10-question cap kicks in). PRs welcome.

License

MIT