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

somaliagent-cli

v1.0.0

Published

A terminal-based AI coding agent focused on UI/UX and developer experience

Readme

somaliagent-cli

A terminal-based AI coding agent focused on UI/UX and developer experience. It runs locally in your terminal and helps you with file management, code generation, code editing, project analysis, refactoring, and task automation.

Features

  • Terminal UI — Clean, minimal, modern terminal interface with clear prompts and mode indicators
  • Build Mode — Apply file changes directly (create, read, update, delete files)
  • Plan Mode — Get implementation plans without modifying any files
  • Dual AI Provider — Supports both Gemini and OpenRouter
  • Keyboard Shortcuts — Tab to switch modes, Esc to clear, Ctrl+C to exit
  • Project Context — Automatically reads your project structure for informed responses
  • Safe File Operations — Backups before updates/deletes, path validation, change summaries
  • NPM Global Install — Run from anywhere with somaliagent

Installation

Global NPM Install

npm install -g somaliagent-cli

Then run:

somaliagent

Or:

somaliagent-cli

Local Development

git clone https://github.com/somaliagent/somaliagent-cli.git
cd somaliagent-cli
npm install
npm link
somaliagent

Or without linking:

node bin/somaliagent.js

Setup

1. Create a .env file

Copy the example environment file:

cp .env.example .env

2. Add your API keys

Edit .env and add at least one API key:

GEMINI_API_KEY=your_gemini_key_here
OPENROUTER_API_KEY=your_openrouter_key_here
OPENROUTER_MODEL=google/gemini-2.5-flash-lite
DEFAULT_PROVIDER=gemini

Gemini API Key

  1. Go to Google AI Studio
  2. Click "Get API Key"
  3. Create a new API key
  4. Copy it to GEMINI_API_KEY in .env
  5. DEFAULT_PROVIDER=gemini is set by default

OpenRouter API Key

  1. Go to OpenRouter
  2. Sign in and create a new API key
  3. Copy it to OPENROUTER_API_KEY in .env
  4. Set DEFAULT_PROVIDER=openrouter

Usage

Build Mode

In Build mode, the agent can directly create, read, update, and delete files in your project.

◆ BUILD > Create a React button component with hover effects

The agent will:

  • Generate the component code
  • Create the file
  • Show a summary of changes

Plan Mode

In Plan mode, the agent only explains what should be done without modifying any files.

◇ PLAN > I need to add authentication to my app

The agent will respond with:

  • What needs to be done
  • Which files are affected
  • Step-by-step implementation plan
  • Risks and considerations

Every Plan mode response ends with:

No files were modified. Switch to Build mode to apply this plan.

Keyboard Shortcuts

| Key | Action | |-----|--------| | Tab | Switch between Build and Plan mode | | Esc | Clear current input | | Enter | Submit prompt | | Ctrl + C | Exit cleanly | | exit | Exit cleanly |

Project Structure

somaliagent-cli/
├── bin/
│   └── somaliagent.js         # CLI entry point
├── src/
│   ├── cli.js                  # Main CLI orchestration
│   ├── agent.js                # Request processing pipeline
│   ├── ai/
│   │   ├── index.js            # AI provider router
│   │   ├── prompts.js          # System prompts for Build/Plan modes
│   │   └── providers/
│   │       ├── gemini.js       # Gemini API provider
│   │       └── openrouter.js   # OpenRouter API provider
│   ├── core/
│   │   ├── context.js          # Project context reader
│   │   ├── executor.js         # Safe file CRUD operations
│   │   └── planner.js          # Action parser from AI responses
│   ├── ui/
│   │   ├── input.js            # Terminal input handling with raw mode
│   │   └── renderer.js         # Terminal UI rendering
│   └── utils/
│       ├── colors.js           # Chalk color theme
│       ├── logger.js           # Logging helpers
│       └── paths.js            # Path validation and utilities
├── .env.example                # Example environment file
├── .gitignore
├── package.json
└── README.md

Examples

Code Generation

◆ BUILD > Generate a responsive navbar component with Tailwind CSS

Refactoring

◆ BUILD > Refactor the handleSubmit function to use async/await

Planning

◇ PLAN > How should I structure my Express API routes?

File Operations

◆ BUILD > Create a utils/helpers.js file with debounce and throttle functions

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

Please follow the existing code style and keep the codebase clean and minimal.

Publishing to NPM

npm login
npm publish

To install the published package:

npm install -g somaliagent-cli

License

MIT