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

aider-client

v0.1.0

Published

Minimal Node.js wrapper and test suite for Aider CLI

Readme

aider-client

An unofficial minimal Node.js / TypeScript wrapper around the Aider CLI. Lets you run prompts, capture output, and inspect or commit changes programmatically.


🧩 What it does

  • Runs the Aider CLI as a child process from Node
  • Streams progress output
  • Parses commits and file diffs
  • Optionally executes safe shell suggestions returned by Aider
  • Works with Git repositories — no temporary clones or extra setup

You still need Aider installed locally (pip install aider-chat) and accessible in your PATH.


⚙️ Installation

bun add aider-client
# or
npm install aider-client

Requirements

  • Node ≥ 18 (or Bun / Deno)
  • A working Git repository (git init in your project)
  • The Aider CLI installed and available as aider

If Aider isn’t on your PATH, pass its full path in aiderPath.


🚀 Quick start

import { AiderClient } from "aider-client";


const aider = new AiderClient({
  // aiderPath: "aider",          // optional: path to aider binary
  // cwd: "/path/to/repo",        // optional: repo root
  model: "gpt-4o",             // optional
});

const result = await aider.runPrompt(
  "Overwrite a.txt with the text 'HELLO WORLD'.",
  {
    autoCommits: true,
    yesAlways: true,
  }
);

console.log(result.output);
console.log(result.commit);
console.log(result.changes);

💬 Handling shell suggestions

When Aider returns shell commands inside its JSON markers:

<<<AIDER_SHELL_JSON>>>
{"shellCommands":[["rm","old.txt"],["mv","foo.txt","bar.txt"]]}
<<<END_AIDER_SHELL_JSON>>>

the client can execute them automatically with a safe allow-list:

await aider.runPrompt("Delete old.txt", {
  execShellSuggestions: { allow: ["rm", "mv"] },
});

Only the allowed commands will run, within the current repository. Disallowed or unsafe commands are skipped.


🧪 Testing

Run the suite (requires an OpenAI key and Aider installed):

npm test
# or
bun test

Each integration test sets up a temporary Git repo, runs Aider, and verifies file changes and commits.


📦 Publishing notes

This package ships as TypeScript source (src/ only). Bun, Deno, and modern TypeScript runtimes import it directly—no build step needed.

If you prefer precompiled JS, you can tsc into dist/ and point "main" there instead.


🧪 License

MIT © 2025 Not affiliated with the official Aider project.