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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@radekdymacz/coder

v0.0.4

Published

An AI coding assistant CLI powered by LangChain and Ink.

Readme

Coder - AI Coding Assistant CLI

Overview

coder is a command-line interface (CLI) tool designed as an AI coding assistant. It leverages the power of Google's Generative AI models (specifically Gemini) through the LangChain and LangGraph frameworks to provide interactive coding help and execute specific tasks.

The agent can:

  • Understand and respond to user queries in an interactive session.
  • Execute one-off commands.
  • Interact with the local file system (list directories, view files).
  • Run a limited set of safe shell commands.

Features

  • Interactive Mode: Engage in a continuous conversation with the agent. Maintains history for context.
  • One-Off Commands: Execute single queries directly.
  • Tool Usage: Equipped with tools to:
    • list_directory: List contents of a directory.
    • view_file: View the content of a file (or specific lines).
    • run_command: Execute basic, safe shell commands.
    • write_to_file: Create new files with specified content.
    • find_by_name: Recursively find files/directories matching a pattern.
    • grep_search: Search for text patterns within files (uses ripgrep if available).

Requirements

  • Node.js: Version 18 or higher.

  • npm: Included with Node.js.

  • ripgrep (rg) (Recommended for grep_search tool): While the grep_search tool includes a basic fallback to the standard grep command, it performs significantly better (speed, respecting .gitignore, etc.) if ripgrep is installed and available in your system's PATH.

    Installation:

    • macOS (using Homebrew):
      brew install ripgrep
    • Debian/Ubuntu (using apt):
      sudo apt update
      sudo apt install ripgrep
    • Fedora/CentOS/RHEL (using yum/dnf):
      sudo yum install ripgrep # Older systems
      # or
      sudo dnf install ripgrep # Newer systems
    • Other platforms: See the ripgrep repository for more options (Windows, source builds, etc.).

Technology Stack

  • Node.js & TypeScript
  • LangChain & LangGraph
  • Google Generative AI (Gemini)
  • Commander.js (for CLI)
  • Ink & React (for interactive UI)
  • Zod (for schema validation)

Setup

  1. Clone the repository.
  2. Install dependencies:
    npm install
  3. Create a .env file in the root directory and add your Google API key:
    GOOGLE_API_KEY=YOUR_API_KEY_HERE
  4. Build the project:
    npm run build

Usage

Interactive Mode (Default)

Start a continuous chat session with the agent:

node dist/cli.js

or

./dist/cli.js interactive

Inside the session, type your requests. Use exit or quit to end.

One-Off Command

Run a single query and get a response:

node dist/cli.js run "<your query here>"

Example:

node dist/cli.js run "list files in the src directory"

Publishing to npm (for Maintainers)

  1. Update package.json:
    • Ensure the name is correctly scoped (e.g., @your-npm-username/coder).
    • Increment the version number according to SemVer.
    • Verify the bin field points the command name (coder) to the correct compiled entry point (dist/cli.js).
    • Ensure the files array includes dist, README.md, package.json, and any other necessary assets.
    • Update description, keywords, author, license, etc. as needed.
  2. Build: Compile the TypeScript code:
    npm run build
  3. Login to npm: Authenticate with your npm account:
    npm login
  4. Publish: Publish the package publicly:
    # Use --access public for scoped packages (@username/package)
    npm publish --access public

TODO

  • [ ] Add More Tools (Prioritized based on Cascade):
    • High Priority (Core Functionality):
      • [ ] edit_file: Modify existing files based on instructions.
    • Medium Priority (Enhanced Capabilities):
      • [ ] read_url_content: Fetch content from a URL.
      • [ ] search_web: Perform web searches via an external API.
      • [ ] view_code_item: View specific code structures (functions/classes).
      • [ ] Enhance view_file: Add line ranges and summaries.
      • [ ] Enhance run_command: Add non-blocking options with status checks.
    • Lower Priority / Future Enhancements:
      • [ ] create_memory: Implement persistent memory for context across sessions.
      • [ ] codebase_search: Semantic code search (requires embeddings).
  • [ ] Implement more robust error handling in tools and agent flow.
  • [ ] Add unit and integration tests.
  • [ ] Improve the safety checks for the run_command tool.
  • [ ] Add configuration options (e.g., model selection, temperature).
  • [ ] Enhance the agent's system prompt for better context awareness.
  • [ ] Add detailed documentation for each tool.