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

@pencil-agent/nano-pencil

v1.10.8

Published

CLI writing agent with read, bash, edit, write tools and session management. Based on pi; supports DashScope Coding Plan. Soul enabled by default for AI personality evolution.

Readme


🌟 Why NanoPencil?

"The only AI coding assistant that truly learns from you"

NanoPencil isn't just another AI coding tool. It's a terminal-native AI agent with persistent memory and evolving personality — designed for developers who live in the terminal.

What Makes It Different?

| | Other Tools | NanoPencil | |---|---|---| | Memory | ❌ Starts fresh every session | ✅ Remembers your projects, preferences, and coding style | | Personality | ❌ Generic responses | ✅ Evolves a unique personality based on your interactions | | Terminal Native | ❌ GUI wrappers or plugins | ✅ Pure TUI built for terminal workflows | | Model Freedom | ❌ Vendor lock-in | ✅ 10+ providers, switch instantly | | Offline Ready | ❌ Cloud dependent | ✅ Local models via Ollama |


✨ Features

🧠 Persistent Memory (NanoMem)

Your projects have context. So should your AI.

  • Project Knowledge — API endpoints, database schemas, architecture decisions
  • Error Patterns — Remembers bugs and their solutions
  • User Preferences — Coding style, naming conventions, framework choices
  • Smart Retrieval — Automatically recalls relevant context when needed

💫 AI Personality Evolution (NanoSoul)

Your AI assistant develops its own character.

  • Big Five Traits — Openness, Conscientiousness, Extraversion, Agreeableness, Neuroticism
  • Coding Style — Verbosity, abstraction level, safety margins
  • Domain Expertise — Frontend, Backend, DevOps, AI/ML specializations
  • Emotional States — Confidence, curiosity, flow state

After 50 sessions, your NanoPencil will code differently than anyone else's.

🎨 Beautiful TUI

A terminal interface that feels alive.

  • Three Themes — Dark, Light, and Warm (eye-friendly)
  • Smooth Animations — Breathing pencil loader
  • Intuitive Navigation — Vim-like keybindings, fuzzy search
  • Real-time Streaming — Watch the AI think in real-time

🔌 MCP Protocol Support

Extend with the Model Context Protocol.

Built-in tools include:

  • 📁 Filesystem operations
  • 🌐 HTTP requests (Fetch)
  • 🎭 Browser automation (Puppeteer)
  • 🗄️ Database queries (SQLite)
  • 🔧 Git operations

🌐 Multi-Model Support

Use the best model for each task.

  • 🇨🇳 Alibaba DashScope — Qwen series (optimized for coding)
  • 🤖 OpenAI — GPT-4, GPT-3.5
  • 💬 Anthropic — Claude 3 Opus/Sonnet/Haiku
  • 🔍 Google — Gemini Pro/Ultra
  • 🏠 Local — Ollama (Qwen, Llama, Mistral, etc.)

🚀 Quick Start

Installation

# npm
npm install -g @pencil-agent/nano-pencil

# pnpm (recommended)
pnpm add -g @pencil-agent/nano-pencil

# yarn
yarn global add @pencil-agent/nano-pencil

First Run

nanopencil
  1. Select your model — Choose from available providers
  2. Enter API key — Securely stored in ~/.nanopencil/agent/auth.json
  3. Start coding — Just type what you want to build

Example Session

You: Create a JWT authentication middleware for Express

AI: [Analyzing project structure...]
    [Creating auth.middleware.ts...]
    [Adding TypeScript types...]
    [Writing tests...]
    
    ✅ Done! Created:
    - src/middleware/auth.middleware.ts
    - src/types/auth.d.ts
    - tests/auth.middleware.test.ts
    
    Features:
    • JWT verification with RS256
    • Refresh token rotation
    • Role-based access control
    • Rate limiting integration

🎮 Usage

Interactive Mode

nanopencil                    # Start new session
nanopencil -c                 # Continue last session
nanopencil -r                 # Resume from history
nanopencil -m qwen-max        # Use specific model

Print Mode (Scripts)

# Single query
nanopencil -p "Refactor this to use async/await"

# Pipe input
cat bug-report.md | nanopencil -p "Analyze this bug"

# Chain commands
nanopencil -p "Generate API" | nanopencil -p "Write tests for it"

Slash Commands

| Command | Description | |---------|-------------| | /model | Switch AI model | | /thinking | Adjust reasoning depth | | /fork | Branch conversation | | /tree | Browse session history | | /memory | View project memories | | /soul | Check AI personality | | /settings | Configure preferences | | /export | Save as HTML |


📊 Comparison

| Feature | NanoPencil | Cursor | Claude Code | Aider | |---------|:----------:|:------:|:-----------:|:-----:| | Terminal Native | ✅ | ❌ | ✅ | ✅ | | Persistent Memory | ✅ | ❌ | ❌ | ❌ | | AI Personality | ✅ | ❌ | ❌ | ❌ | | Session Branching | ✅ | ✅ | ✅ | ❌ | | Multi-Model | ✅ | ✅ | ❌ | ✅ | | MCP Support | ✅ | ❌ | ✅ | ❌ | | Offline Mode | ✅ | ❌ | ❌ | ✅ | | Chinese Optimized | ✅ | ❌ | ❌ | ❌ |


🏗️ Architecture Philosophy

NanoPencil is built on three pillars:

┌─────────────────────────────────────────┐
│           🧠 COGNITIVE LAYER            │
│    (Memory + Personality + Context)     │
├─────────────────────────────────────────┤
│           🔧 TOOL LAYER                 │
│  (File Ops + Bash + Search + MCP)       │
├─────────────────────────────────────────┤
│           🎨 INTERFACE LAYER            │
│       (TUI + Themes + Keybindings)      │
└─────────────────────────────────────────┘

Design Principles:

  • Terminal First — No Electron, no browser, pure terminal
  • Privacy First — Local storage, no telemetry, your data stays yours
  • Extensible — Plugin system for tools, themes, and behaviors
  • Fast — Sub-second startup, instant response

📚 Documentation


🌍 Community


📄 License

MIT © Pencil Agent


⬆ Back to Top

Built with ❤️ for terminal dwellers everywhere