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

@struggle-ai/cli

v0.1.5

Published

Struggle AI — a Socratic coding mentor CLI that guides you through problems with questions, not answers.

Readme

@struggle-ai/cli

Terminal interface for Struggle AI. This package wraps @struggle-ai/core with an interactive REPL, slash commands, local config management, and terminal-oriented rendering for a local coding agent.

Requirements

  • Node.js 20+
  • One configured provider API key or account login

Supported environment variables:

  • ANTHROPIC_API_KEY
  • GOOGLE_API_KEY or GEMINI_API_KEY
  • OPENAI_API_KEY
  • OPENROUTER_API_KEY

Install

From the monorepo root:

npm install
npm run build --workspace packages/cli

Quick Start

Start the REPL in the current directory:

npm exec --workspace packages/cli struggle

If the active provider is missing a saved login or API key, the CLI now pauses before the REPL and walks you through provider selection, login, and optional model selection.

Or point it at a specific project:

npm exec --workspace packages/cli struggle -- --project /path/to/project

Set a default provider:

npm exec --workspace packages/cli struggle -- config set-provider anthropic
npm exec --workspace packages/cli struggle -- config show

Choose a different model for the active provider:

npm exec --workspace packages/cli struggle -- config list-models anthropic
npm exec --workspace packages/cli struggle -- config set-model claude-sonnet-4-5

Login for account-backed providers:

npm exec --workspace packages/cli struggle -- config login openai-codex
npm exec --workspace packages/cli struggle -- config logout openai-codex
npm exec --workspace packages/cli struggle -- config set-provider openai-codex

You can also override provider or model for a single run:

npm exec --workspace packages/cli struggle -- --provider openrouter --model openai/gpt-oss-20b

REPL Commands

  • /help shows every supported slash command
  • /logout clears saved credentials for the active provider
  • /mode <guided|standard|socratic> switches session mode
  • /stuck triggers a stuck-session intervention
  • /trail shows the trail artifact subcommands
  • /trail export [path] [--format md|pdf] writes the raw current trail
  • /trail notes [path] writes AI-generated session notes from the current trail
  • /trail adr [path] writes an ADR draft for the current project from the current trail
  • /exit or /quit quits the REPL

Mode Behavior

  • guided: more deliberate planning before edits
  • standard: balanced execution with minimal ceremony
  • socratic: deeper investigation and verification before stopping

These modes now tune the coding agent prompt. They no longer select separate learning-state machines.

Rendering Behavior

  • text output renders tool activity and assistant responses
  • question chunks still render with a distinct prompt marker for /stuck
  • trail export, notes, and ADR generation remain available from the REPL

Notes

  • Trail export currently writes Markdown even when --format pdf is requested; core emits a warning for that path.
  • The package is still marked "private": true in package.json.