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

@reaatech/agent-chaos-cli

v0.1.0

Published

Command-line interface for agent-chaos

Readme

@reaatech/agent-chaos-cli

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Command-line interface for agent-chaos. Validate scenario files against the JSON Schema, generate scenario templates from a built-in library, run chaos scenarios with hot-reload support, and initialize new chaos testing projects — all from your terminal.

Installation

npm install -g @reaatech/agent-chaos-cli
# or run without global install
npx @reaatech/agent-chaos-cli validate ./scenario.yaml

Feature Overview

  • 4 commandsinit, generate, validate, and run for end-to-end scenario management
  • 5 built-in templates — network-degradation, provider-outage, rate-limit-storm, token-exhaustion, and contradiction
  • Hot reload--watch flag reloads scenarios on file changes without restarting
  • JSON and YAML — both .yaml/.yml and .json scenario formats supported
  • Programmatic API — command functions exported for use in scripts and CI
  • CI/CD ready — zero-install usage via npx; validation exits with non-zero on failure

Quick Start

# Initialize a new project
agent-chaos init

# Generate a scenario template
agent-chaos generate network-degradation --output ./scenarios

# Validate your scenario
agent-chaos validate ./scenarios/network-degradation.yaml

# Run a scenario (10 sample tool calls with fault injection)
agent-chaos run ./scenarios/network-degradation.yaml

Commands

init

Creates a scenarios/ directory and a sample hello-world.yaml scenario (latency fault, 100–500ms, 10% probability).

agent-chaos init

generate

Copies a built-in template from @reaatech/agent-chaos-scenarios/templates/ to your output directory.

agent-chaos generate <type> [--output <dir>]

| Option | Description | |--------|-------------| | -o, --output <dir> | Output directory (default: .) |

Available template types:

| Type | Description | |------|-------------| | network-degradation | Latency (exponential 1–30s, 15%), timeout (5s, 5%), rate limit (60s, 5%) + webSearch/database overrides | | provider-outage | Timeout 1s at 50%, rate limit 300s at 30% | | rate-limit-storm | Cascading rate limits + burst latency + api.* override | | token-exhaustion | Token limit (trigger after 5 calls) + stale context | | contradiction | Contradictory data across weather, stock, and database tools |

validate

Validates a scenario file against the built-in JSON Schema.

agent-chaos validate <file>

Supports .yaml, .yml, and .json. Prints a green checkmark on success or lists each validation error with its JSON path on failure. Exits with code 1 on validation failure.

run

Loads a scenario, registers it with the chaos engine, and runs 10 sample tool calls to demonstrate fault injection.

agent-chaos run <scenario> [--watch]

| Option | Description | |--------|-------------| | -w, --watch | Watch the file for changes and hot-reload the scenario |

The run command prints each tool call's pass/fail status and a summary with total calls, faults injected, registered injectors, and loaded scenarios.

Programmatic API

All command functions are exported for use in scripts and CI pipelines:

import {
  runCommand,
  validateCommand,
  generateCommand,
  initCommand,
} from "@reaatech/agent-chaos-cli";

await initCommand();
await generateCommand("network-degradation", { output: "./scenarios" });
await validateCommand("./scenarios/network-degradation.yaml");
await runCommand("./scenarios/network-degradation.yaml", { watch: true });

Function Signatures

function initCommand(): Promise<void>;
function generateCommand(type: string, options: { output?: string }): Promise<void>;
function validateCommand(filePath: string): Promise<void>;
function runCommand(scenarioPath: string, options: { watch?: boolean }): Promise<void>;

CI/CD Integration

Validate scenarios in CI without a global install:

npx @reaatech/agent-chaos-cli validate ./scenarios/*.yaml

Or via GitHub Actions:

steps:
  - run: npx @reaatech/agent-chaos-cli validate ./scenarios/network-degradation.yaml

Related Packages

License

MIT