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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kibibit/kibi

v1.9.0

Published

Local-first AI agent CLI tool with TUI and MCP integration

Readme

Kibi

A local-first AI agent CLI tool with TUI (Terminal User Interface) and MCP (Model Context Protocol) integration.

Description

Kibi is a command-line AI agent that connects to local LLM endpoints (like LM Studio, LiteLLM) or cloud providers (OpenAI-compatible APIs). It provides an interactive terminal UI for chatting with AI models and executing tools, with support for MCP servers for extensibility.

Features

  • Local-First: Works with local LLM endpoints (LM Studio, LiteLLM) or cloud providers
  • Interactive TUI: Beautiful terminal user interface built with Ink/React
  • Tool Execution: Built-in tools (file operations, bash commands) with approval workflow
  • MCP Integration: Connect to Model Context Protocol servers for extensibility
  • Chat Persistence: Save and resume chat sessions
  • Print Mode: Non-interactive mode for scripting and automation
  • Streaming Responses: Real-time streaming of LLM responses

Installation

Prerequisites

  • Node.js 18+ and npm
  • TypeScript 5.0+

Install Dependencies

npm install

Build

npm run build

Development

Run in watch mode during development:

npm run dev

Usage

Basic Usage

Start the interactive TUI:

npm start
# or
node bin/kibi

Print Mode

Run in non-interactive mode (for scripting):

node bin/kibi --print "Your prompt here"

Available Commands

  • kibi agent [prompt] - Start AI agent (default command)
  • kibi chat list - List saved chats
  • kibi chat resume <chatId> - Resume a saved chat
  • kibi mcp status - Show MCP server status
  • kibi login - Authenticate with API provider
  • kibi status - Show current configuration and status

Configuration

Configuration is stored in ~/.kibi/config.json. You can configure:

  • Default model and provider
  • API keys (stored securely)
  • MCP server connections
  • Tool approval settings
  • UI preferences

Project Structure

kibi/
├── src/
│   ├── cli/          # CLI command parsing and routing
│   ├── agent/        # Core agent logic and LLM integration
│   ├── tools/        # Tool execution and management
│   ├── mcp/          # MCP server integration
│   ├── chat/         # Chat persistence
│   ├── config/       # Configuration management
│   ├── output/       # Output formatters (print mode)
│   ├── tui/          # Terminal UI components
│   ├── types/        # Shared TypeScript types
│   └── utils/        # Shared utilities
├── bin/              # Executable scripts
├── tests/            # Test files
└── docs/             # Documentation

Development

Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm run dev - Run in watch mode with tsx
  • npm start - Run compiled code
  • npm test - Run tests with vitest
  • npm run lint - Run linter (when configured)

Architecture

Kibi follows a modular architecture with clear boundaries:

  • CLI Module: Command-line interface and argument parsing
  • TUI Module: Interactive terminal UI (Ink/React)
  • Agent Core: LLM integration and conversation management
  • Tools Module: Tool execution with approval workflow
  • MCP Integration: Model Context Protocol server management
  • Chat Persistence: File-based chat storage
  • Configuration: Settings and credential management
  • Output Formatters: Print mode output formatting

See docs/kibi-cli-agent-v1/planning/system-architecture.md for detailed architecture documentation.

License

ISC

Contributing

This project is in active development. See the documentation in docs/ for implementation specifications and architecture details.