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

@kittiphop_sompuech/opsi-cli

v1.0.8

Published

AI-powered CLI tool for developers

Readme

opsi

AI-powered CLI toolkit for developers — commit messages, documentation, security scanning, standup notes, and Git automation, straight from your terminal.


What is opsi?

opsi is a command-line tool that brings AI assistance into your daily development workflow without leaving the terminal. It connects to the Claude API (Anthropic) and gives you intelligent tools for the tasks developers do every day — writing commit messages, explaining code, auditing security, and more.

Why opsi?

  • Save time on repetitive tasks — stop writing boilerplate commit messages and standup notes by hand
  • Instant security feedback — scan your codebase for vulnerabilities and apply AI-suggested fixes interactively, with automatic backups
  • No context switching — everything runs in your terminal, alongside your existing git workflow
  • Language-aware — responses in English or Thai (ภาษาไทย), configurable with one command
  • Smart caching — security scans cache results per file, so only changed files are re-scanned on subsequent runs

Requirements


Installation

npm install -g opsi-cli-winner

or run from source:

git clone <repo-url>
cd opsi
npm install && npm link

Setup

opsi config set --key sk-ant-xxxx

Quick Reference: All Commands

| Command | Description | |---------|-------------| | opsi standup | Generate daily standup notes from git activity | | opsi standup --days 3 | Look back 3 days of commits | | opsi standup --copy | Copy result to clipboard | | opsi commit | Preview an AI-generated commit message | | opsi commit --commit | Generate and commit immediately | | opsi docs <file> | Explain what a file does | | opsi docs --update <file> | Add JSDoc/docstrings to all functions | | opsi docs --readme . | Generate a README.md for the project | | opsi scan . | Security audit of current directory | | opsi scan --deps | Scan dependencies for vulnerabilities | | opsi scan . --fix | Scan and interactively fix vulnerabilities | | opsi config show | Show current configuration | | opsi config set --key <key> | Set Anthropic API key | | opsi config set --model <model> | Change AI model | | opsi config set --lang th | Switch responses to Thai | | opsi config set --lang en | Switch responses to English | | opsi config reset | Reset config to defaults | | opsi config cache | Show cache stats | | opsi config cache-clear | Clear scan cache | | opsi git --clone | Clone a repository, optionally using a custom SSH key | | opsi git --upload | Stage all → semantic commit prompt → push to remote | | opsi git --pull | Interactive pull with remote selector | | opsi git --push | Interactive push with remote selector | | opsi git --fetch | Interactive fetch with remote selector | | opsi git --add-remote | Add a new named remote | | opsi git --change-remote | Update the URL of an existing remote | | opsi git --purge-file <path> | Permanently erase a file/folder from all Git history |


Commands

standup — Daily standup notes

Reads your recent git commits and generates a professional standup update.

opsi standup                  # From yesterday's commits
opsi standup --days 3         # Look back 3 days
opsi standup --copy           # Generate and copy to clipboard

Output:

✅ Yesterday / What I did:
- Implemented JWT refresh token rotation in auth service
- Fixed null pointer bug in user profile endpoint

🔄 Today / What I plan to do:
- Write unit tests for the auth changes
- Review open PRs

⚠️ Blockers:
- None

commit — Generate commit messages

Reads your staged git diff and generates a Conventional Commits formatted message.

git add .
opsi commit                   # Preview the suggested message
opsi commit --commit          # Generate and commit immediately

Output:

feat(auth): add JWT refresh token rotation

Implements automatic token rotation on refresh to reduce the risk of
stolen tokens being reused after expiry.

docs — Documentation generation

opsi docs ./src/utils.js      # Explain what a file does
opsi docs --update ./utils.js # Add JSDoc/docstrings to all functions
opsi docs --readme .          # Generate a README.md for the project

scan — Security audit

Scans source files for hardcoded secrets, injection vulnerabilities, broken auth, and more.

Standard mode

Results are cached per file. Only files that changed since the last scan are sent to the AI.

opsi scan .                   # Scan current directory
opsi scan ./src               # Scan a specific directory
opsi scan --deps              # Scan dependencies (package.json, etc.)

Output includes a security score (0–100) and findings grouped by severity: CRITICAL / HIGH / MEDIUM / LOW.

Fix mode (--fix)

The AI returns structured fixes with exact before/after code for each vulnerability. opsi shows a colored diff in the terminal and asks for confirmation before modifying any file.

opsi scan . --fix
[!] Scanning codebase for security issues...
[-] Found 1 CRITICAL vulnerability: 1 CRITICAL

──────────────────────────────────────────────────
  [CRITICAL] Hardcoded Secret Key (Line 12)
──────────────────────────────────────────────────

Before:
  12 |  const SECRET = "super-secret-key-12345";

After:
  12 |  require('dotenv').config();
  13 |  const SECRET = process.env.JWT_SECRET;
──────────────────────────────────────────────────

? Do you want opsi to automatically fix this issue? › (y/N)

[✓] Successfully updated ./src/auth.js
[ℹ] Backup saved to ./src/auth.js.opsi.bak
[ℹ] Remember to add JWT_SECRET to your .env file

A .opsi.bak backup is created automatically before each file is modified.


git — Git automation

A suite of interactive Git utilities that run entirely in the terminal — no need to remember flags or URLs.

--clone — Clone a repository

Prompts for a repository URL, an optional destination directory, and whether to use a custom SSH key. When a custom key is provided, it is passed via GIT_SSH_COMMAND so the clone uses that identity without touching your global SSH config.

opsi git --clone
  📥 CLONE REPOSITORY

? Repository URL: › [email protected]:user/repo.git
? Destination directory (leave blank for default): ›
? Use a custom SSH key? › No
⠋ Cloning [email protected]:user/repo.git...
✔ Repository cloned successfully!

  🎉 Clone complete!

With a custom SSH key:

? Use a custom SSH key? › Yes
? Path to SSH private key: › ~/.ssh/id_deploy

The key is used only for this clone — it does not modify ~/.ssh/config or any global git setting.

--upload — One-click deploy

Stages every changed file, walks you through a Semantic Commit type selector, commits, then pushes to the chosen remote. Automatically initialises the repo and prompts for a remote URL if neither exists yet.

opsi git --upload
  🚀 UPLOAD WORKFLOW

  ✔ All changes staged.
? Select Semantic Commit type: › 🚀 feat — New feature
? Enter commit message: › add interactive git remote workflow
  ✔ Committed as "feat: add interactive git remote workflow"
? Select remote to push to: › origin  https://github.com/user/repo.git
⠋ Pushing to origin/main...
✔ Pushed to origin/main successfully!

  🎉 Upload complete!

--pull / --push / --fetch — Interactive sync

All three commands open a remote selector first, then run the git operation against the chosen remote on the current branch.

opsi git --pull     # select remote → git pull <remote> <branch>
opsi git --push     # select remote → git push -u <remote> <branch>
opsi git --fetch    # select remote → git fetch <remote>

When only one remote is configured, the selector is skipped and the remote is used automatically.

--add-remote — Add a new remote

opsi git --add-remote

Prompts for a name (default: origin) and URL, validates the name is not already taken, then runs git remote add.

--change-remote — Update a remote URL

opsi git --change-remote

Shows a pick list of existing remotes (or auto-selects if only one), pre-fills the current URL so you can edit in place, then runs git remote set-url.

--purge-file <path> — Permanently erase from history

Completely removes a file or folder from every commit in the repository's history, then runs garbage collection to shrink the repo size. Use this to clean up accidentally committed secrets or large binaries.

opsi git --purge-file .env
opsi git --purge-file node_modules

Irreversible. After purging, run git push --force --all to update the remote.


config — Manage settings

opsi config show                        # Show current config
opsi config set --key <key>             # Set API key
opsi config set --model <model>         # Change AI model
opsi config set --lang th               # Switch to Thai (ภาษาไทย)
opsi config set --lang en               # Switch to English
opsi config reset                       # Reset to defaults
opsi config cache                       # Show cache stats
opsi config cache-clear                 # Clear scan cache

Caching

opsi scan caches results per file in ~/.opsi/cache.json. On subsequent runs, only files that have changed are re-scanned — unchanged files return cached results instantly with no API call.

First run:   10 files → all sent to AI → results cached
Second run:  2 files changed → only 2 files re-scanned
Third run:   nothing changed → instant results from cache

Configuration

Config is stored at ~/.opsi/config.json.

| Key | Default | Description | |------------|---------------------|----------------------------------| | apiKey | null | Anthropic API key | | model | claude-sonnet-4-6 | Claude model | | provider | anthropic | AI provider | | language | en | Response language (en or th) |

You can also provide the API key via environment variable:

export ANTHROPIC_API_KEY=sk-ant-xxxx

License

MIT