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

naabigacode-frontend

v0.2.8

Published

TUI React/Ink style Claude Code pour NaabigaCode — agentic coding en terminal

Downloads

1,246

Readme

naabigacode-frontend

Interface terminale (TUI) React/Ink du backend NaabigaCode. Remplace la couche curses par un client moderne connecté au backend FastAPI via SSE.

Prérequis

  • Node.js ≥ 20 et npm
  • Python 3 pour le backend (détecté automatiquement : venv du backend, puis python3/python/py sur le PATH)

Installation

npm ci          # installe exactement les versions du package-lock

Utilisation

# TUI interactive — démarre le backend en sous-processus si nécessaire
npm run dev

# Backend déjà lancé (ex. : python3 backend/main.py)
npm run dev -- --backend-url http://127.0.0.1:8400

Après build, le binaire est un exécutable autonome :

npm run build        # → dist/cli.mjs
npx .                # ou : node dist/cli.mjs

Variables d'environnement

| Variable | Rôle | |---|---| | NAABIGA_BACKEND_URL | URL backend par défaut (http://127.0.0.1:8400 si absent) | | NAABIGA_HOME | Surcharge l'emplacement de configuration Naabiga |

Commandes intégrées

  • Ctrl+C : abandonne la réponse en cours puis quitte
  • /help : liste les commandes slash du backend

Contrat de session avec le backend

| Route | Rôle | |---|---| | POST /session/create | Nouvelle session { session_id } | | POST /session/{id}/message | Envoie un message { accepted } | | GET /session/{id}/events | Flux SSE d'événements (user/assistant/tool/…) | | GET /session/{id}/history | Historique stable rejouable (reconnexion) | | POST /session/{id}/abort | Abandonne la réponse en cours | | GET /health | Healthcheck |

Architecture

src/
├── cli.tsx         # Entrypoint : boot backend, healthcheck, rendu Ink
├── App.tsx         # UI : historique, input contrôlé, reconnexion SSE
└── sessionApi.ts   # Client HTTP + parseur SSE (fetch + ReadableStream)
scripts/build.mjs   # Bundle esbuild → dist/cli.mjs (packages externalisés)

Comportements notables :

  • Style Claude Code : bandeau compact en dégradé, tool calls en cartes colorées par famille (Bash=bleu, Read=vert, Edit=jaune…), prompt avec séparateur, indicateur d'état discret.
  • Streaming : les morceaux assistant consécutifs sont fusionnés en un seul bloc (pas une ligne par chunk SSE).
  • Reconnexion auto : le stream SSE se reconnecte avec backoff léger tant que la session vit ; l'historique est rejoué via /history au démarrage.
  • Anti-fuite mémoire : seules les 200 dernières lignes sont conservées.

Scripts

| Script | Description | |---|---| | npm run dev | Lance la TUI en mode développement (tsx) | | npm run typecheck | Vérification TypeScript strict (tsc --noEmit) | | npm run build | Bundle esbuild → dist/cli.mjs |