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

@unravelai/khadim

v0.2.9

Published

Khadim CLI coding agent

Downloads

423

Readme

khadim-cli

CLI coding agent for Khadim. An AI agent that runs in your terminal — reads your code, writes and runs scripts, understands failures, and retries.

Khadim also exposes a programmable SDK that allows you to install it in your React app or use it in your CI/CD pipelines, giving you access to its coding capabilities

Read more in the khadim docs

Quick Install

# npm (recommended)
npm install -g @unravelai/khadim

Or use it as a sdk

npm i @unravelai/khadim

The package exposes both khadim and khadim-cli commands.

Other Install Methods

# Or use the install script
curl -fsSL https://raw.githubusercontent.com/unravelaidk/khadim/main/apps/khadim-cli/scripts/install.sh | bash

# Prebuilt binary from GitHub Releases
KHADIM_CLI_INSTALL_METHOD=prebuilt curl -fsSL https://raw.githubusercontent.com/unravelaidk/khadim/main/apps/khadim-cli/scripts/install.sh | bash

# Build from source
KHADIM_CLI_INSTALL_METHOD=source curl -fsSL https://raw.githubusercontent.com/unravelaidk/khadim/main/apps/khadim-cli/scripts/install.sh | bash

# Custom install directory (source/prebuilt only)
KHADIM_CLI_INSTALL_METHOD=source INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/unravelaidk/khadim/main/apps/khadim-cli/scripts/install.sh | bash

Manual Build

git clone https://github.com/unravelaidk/khadim.git
cd khadim
cargo build --release --manifest-path apps/khadim-cli/Cargo.toml
# Binary: apps/khadim-cli/target/release/khadim-cli

Prebuilt Binaries

Prebuilt binaries are available on the releases page for tags matching cli-v*.


Usage

# Start the interactive Khadim TUI in the current project
khadim

# Start Khadim in another project directory
khadim --cwd /path/to/project

# Inside the TUI, type natural-language requests
> summarize this repo
> fix the failing tests
> add unit tests for the auth service

# Type / to browse built-in commands with live preview
/help
/provider
/model
/sessions
/theme

Common interactive commands:

| Command | What it does | |---------|--------------| | /help | Show commands and keyboard shortcuts | | /provider | Switch AI provider | | /model | Switch model for the current provider | | /login | OAuth login for supported providers such as Copilot or Codex | | /sessions | List saved sessions | | /session NAME | Switch to a saved session | | /new | Start a new session | | /save NAME | Save the current session | | /theme | Switch the TUI theme | | /settings | Open the settings panel | | /tokens | Show token usage | | /export [PATH] | Export the conversation to markdown |

Batch/headless modes are still available when you want a one-shot command:

# Prompt mode
khadim --prompt "summarize this repo"

# Headless exec mode
khadim exec "summarize failures" < build.log

# Pipe stdin as context
echo "error: timeout on line 42" | khadim --prompt "fix this"

--prompt - reads the entire prompt from stdin.

The agent discovers AGENTS.md files in the workspace and injects scoped repository instructions into the system prompt. Nested AGENTS.md files override broader ones for files under their scope.


Configuration

Environment variables:

| Variable | Description | |----------|-------------| | KHADIM_PROVIDER | Default provider (default: openai) | | KHADIM_MODEL | Default model for the provider | | OPENAI_API_KEY | OpenAI API key | | ANTHROPIC_API_KEY | Anthropic API key | | GEMINI_API_KEY | Google Gemini API key | | GROQ_API_KEY | Groq API key | | KHADIM_NO_UPDATE_CHECK | Set to 1 to disable the npm update prompt | | ... | See root README for all providers |


Development

cd apps/khadim-cli

# Run in dev mode
npm run dev -- --prompt "hello"

# Build release binary
npm run build:release

# Build distributable bin
npm run dist:bin
./dist/bin/khadim --help

# Stage npm tarballs (requires built artifacts)
python3 scripts/stage_npm_package.py --version 0.2.1 --package all --artifact-dir ./artifacts