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

@nimashoghi/code-agent-kit

v0.4.1

Published

Multi-runtime coding agent runtime toolkit

Readme

code-agent-kit

Runtime-agnostic toolkit for running coding agents through one shared interface and one CLI.

Scope

This package is intentionally narrow:

  • One runtime contract for Claude, Codex, Gemini, and Copilot
  • One CLI command for running prompts
  • Optional system prompts
  • Optional text file attachments
  • Optional session resume and event streaming when the selected runtime supports them

Everything related to PR automation, GitHub Actions, git workspaces, and lease-based worktrees has been removed.

Installation

npm install @nimashoghi/code-agent-kit
npm install -g @nimashoghi/code-agent-kit

Install any runtime-specific dependencies and CLIs you plan to use:

# Claude runtime
npm install @anthropic-ai/claude-agent-sdk

# Gemini runtime expects the local `gemini` CLI on PATH
# Copilot runtime expects `github-copilot-cli` on PATH

CLI

code-agent-kit run --runtime claude "Fix the failing tests"
code-agent-kit run --model claude-sonnet-4-20250514 "Fix the failing tests"
code-agent-kit run --runtime codex --system "Run tests before finishing." "Add validation"
code-agent-kit run --runtime gemini --file src/runtime.ts "Summarize this file"
code-agent-kit run --runtime claude --resume session-123 "Continue the last task"
code-agent-kit status <run-id>
code-agent-kit kill <run-id>

run options:

  • --runtime <name>: claude, codex, copilot, or gemini
  • --model <name>: model override for the selected runtime
  • --directory <path>: working directory for the agent
  • --system <text>: system prompt text
  • --file <path>: attach a text file, repeatable
  • --resume <sessionId>: resume a previous session when supported
  • --timeout <ms>: timeout in milliseconds

run prints a short unique run ID immediately, then executes the agent. The final output is always written to an output file for that run. status reports whether the run is still running or finished, how many seconds it has been running or ran for, and the output file path. Verbose agent logs are intentionally hidden by default and only written when CODE_AGENT_KIT_DEBUG_LOGS=1 is set for the run. kill sends SIGTERM to a running agent by run ID so the run is recorded as interrupted instead of remaining stuck in running.

When you explicitly pass --runtime, the CLI propagates that choice to child processes through CODE_AGENT_KIT_RUNTIME. Nested invocations of code-agent-kit run use that value as their default runtime.

Local Config

The CLI reads a local JSON config from the standard config directory:

  • Linux: ${XDG_CONFIG_HOME:-~/.config}/code-agent-kit/config.json
  • macOS: ~/Library/Application Support/code-agent-kit/config.json
  • Windows: %APPDATA%\\code-agent-kit\\config.json

Supported keys:

  • runtime
  • model
  • systemPrompt
  • directory
  • timeoutMs

Priority is:

  1. Explicit CLI flags
  2. Propagated CODE_AGENT_KIT_RUNTIME
  3. DEFAULT_RUNTIME
  4. Local config
  5. Built-in defaults

Examples:

code-agent-kit config set runtime codex
code-agent-kit config set model gpt-5-codex
code-agent-kit config set timeoutMs 300000
code-agent-kit config show
code-agent-kit config unset model
code-agent-kit config path

Debug logging example:

CODE_AGENT_KIT_DEBUG_LOGS=1 code-agent-kit run "Fix the failing tests"
CODE_AGENT_KIT_DEBUG_LOGS=1 code-agent-kit status <run-id>

Library Usage

import { ClaudeRuntime } from "@nimashoghi/code-agent-kit/claude";

const runtime = new ClaudeRuntime({ model: "claude-sonnet-4-20250514" });

const result = await runtime.run({
  workingDirectory: "/my/project",
  prompt: "Fix the failing tests",
  systemPrompt: "Run tests before finishing.",
  attachments: [{ path: "src/runtime.ts" }],
});

console.log(result.output);

You can also create runtimes generically:

import { createRuntime } from "@nimashoghi/code-agent-kit";

const runtime = createRuntime({ name: "codex" });

Runtime Contract

interface RuntimeRunOptions {
  workingDirectory: string;
  prompt: string;
  systemPrompt?: string;
  attachments?: { path: string; content?: string }[];
  env?: Record<string, string>;
  session?: { mode: "new" } | { mode: "resume"; sessionId: string };
  timeoutMs?: number;
  signal?: AbortSignal;
  onEvent?: (event: RuntimeEvent) => void;
}

attachments are normalized into the user prompt so every runtime can consume the same shape.

Development

npm install
npx vitest run
npx tsc --noEmit
npx tsup