Skip to content
PluginStats

bash-tool weekly downloads statistics

By vercel-labs (8 listings) · npm · AI SDKs

Generic bash tool for AI agents, compatible with AI SDK

View on npm Fresh · Dec 6, 2026

bash-tool has 410,326 recorded weekly downloads on npm, an increase of 11.1% over the past 30 days, ranking #428 of 3,247 tracked listings.

Weekly downloads
410,326
Official API · Dec 5, 2026
7-day growth
+33.3%
+102.4K weekly downloads
30-day growth
+11.1%
+40.9K weekly downloads
90-day growth
+134%
+235.3K weekly downloads
Rank
#428
▲ 18 in 7 days

About bash-tool

bash-tool

Generic bash tool for AI agents, compatible with AI SDK.

Installation

npm install bash-tool just-bash

For full VM support, install @vercel/sandbox or another sandbox product instead of just-bash.

Usage

import { createBashTool } from "bash-tool";
import { isStepCount, ToolLoopAgent } from "ai";

const { tools } = await createBashTool({
  files: {
    "src/index.ts": "export const hello = 'world';",
    "package.json": '{"name": "my-project"}',
  },
});

const agent = new ToolLoopAgent({
  model: yourModel,
  tools,
  // Or use just the bash tool as tools: {bash: tools.bash}
  stopWhen: isStepCount(20),
});

const result = await agent.generate({
  prompt: "Analyze the project and create a summary report",
});

Using AI SDK 6? Import stepCountIs instead of isStepCount, and use stopWhen: stepCountIs(20).

Tools

The tools object contains three tools that can be used by AI agents:

bash

Execute bash commands in the sandbox environment. For analysis agents, this may be the only tool you need to give to the agent.

Input:

  • command (string): The bash command to execute

Returns:

  • stdout (string): Standard output from the command
  • stderr (string): Standard error from the command
  • exitCode (number): Exit code of the command
readFile

Read the contents of a file from the sandbox.

Input:

  • path (string): The path to the file to read

Returns:

  • content (string): The file contents
writeFile

Write content to a file in the sandbox. Creates parent directories if needed.

Input:

  • path (string): The path where the file should be written
  • content (string): The content to write to the file

Returns:

  • success (boolean): true if the write succeeded

Advanced Usage

Upload a local directory
const { bash } = await createBashTool({
  uploadDirectory: {
    source: "./my-project",
    include: "**/*.{ts,json}", // optional glob filter
  },
});
Use @vercel/sandbox for full VM
import { Sandbox } from "@vercel/sandbox";

const sandbox = await Sandbox.create();
// Files are written to ./workspace by default
const { tools } = await createBashTool({
  sandbox,
  files: { "index.ts": "console.log('hello');" },
});
Persistent sandbox across serverless invocations

Use Sandbox.get to reconnect to an existing sandbox by ID:

import { Sandbox } from "@vercel/sandbox";

// First invocation: create sandbox and store the ID
const newSandbox = await Sandbox.create();
const sandboxId = newSandbox.sandboxId;
// Store sandboxId in database, session, or return to client

// Subsequent invocations: reconnect to existing sandbox
const existingSandbox = await Sandbox.get({ sandboxId });
const { tools } = await createBashTool({ sandbox: existingSandbox });
// All previous files and state are preserved
Use a custom just-bash instance
import { Bash } from "just-bash";

const sandbox = new Bash({ cwd: "/app" });
const { tools } = await createBashTool({
  sandbox,
  destination: "/app",
});
Intercept bash commands
const { tools } = await createBashTool({
  onBeforeBashCall: ({ command }) => {
    console.log("Running:", command);
    // Optionally modify the command
    if (command.includes("rm -rf")) {
      return { command: "echo 'Blocked dangerous command'" };
    }
  },
  onAfterBashCall: ({ command, result }) => {
    console.log(`Exit code: ${result.exitCode}`);
    // Optionally modify the result
    return { result: { ...result, stdout: result.stdout.trim() } };
  },
});
Custom sandbox implementation
import { createBashTool, Sandbox } from "bash-tool";

const customSandbox: Sandbox = {
  async executeCommand(command) {
    // Your implementation here
    return { stdout: "", stderr: "", exitCode: 0 };
  },
  async readFile(path) {
    // Your implementation here
    return "";
  },
  async writeFiles(files) {
    // Your implementation here - files is Array<{path, content}>
  },
};

const { tools } = await createBashTool({ sandbox: customSandbox });

Skills (Experimental)

Skills are modular capabilities that extend agent functionality. Each skill is a directory containing a SKILL.md file with instructions and optional scripts.

import {
  experimental_createSkillTool as createSkillTool,
  createBashTool,
} from "bash-tool";
import { ToolLoopAgent } from "ai";

// Discover skills and get files to upload
const { skill, files, instructions } = await createSkillTool({
  skillsDirectory: "./skills",
});

// Providing a bash tool with skills is optional if your skill only has a SKILL.md file
// and no further files and scripts.
const { tools } = await createBashTool({
  files,
  extraInstructions: instructions,
});

// Use both tools with an agent
const agent = new ToolLoopAgent({
  model,
  tools: { skill, ...tools },
});

Full Example and see Skills.sh for a directory of publicly available skills.

Skill Directory Structure
skills/
├── csv/
│   ├── SKILL.md         # Required: instructions with YAML frontmatter
│   └── scripts/         # Optional: scripts the agent can run
│       ├── analyze.sh
│       └── filter.sh
└── text/
    ├── SKILL.md
    └── scripts/
        └── search.sh

See the example skills for a complete reference.

AI Agent Instructions

For AI agents working with bash-tool, additional guidance is available in AGENTS.md:

cat node_modules/bash-tool/dist/AGENTS.md

License

MIT

Description from the npm listing.

  • bash
  • ai
  • tool
  • agent
  • ai-sdk
  • sandbox
  • vercel

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

bash-tool weekly downloads on npm, last 90 days: 410,326 weekly downloads as of Dec 5, 2026, +134% over 90 days.bash-toolWeekly downloads on npm · Last 90 days410,326downloads / week+134% over 90 days0100K200K300K400K500KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
bash-tool weekly downloads on npm, last 90 days: 410,326 weekly downloads as of Dec 5, 2026, +134% over 90 days.

7/30/90-day growth

bash-tool weekly downloads growth on npm: +33.3% over 7 days, +11.1% over 30 days, +134% over 90 days.bash-toolWeekly downloads growth on npm410,326downloads / week now7-day growth+102,413 weekly downloads+33.3%30-day growth+40,938 weekly downloads+11.1%90-day growth+235,329 weekly downloads+134%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
bash-tool weekly downloads growth on npm: +33.3% over 7 days, +11.1% over 30 days, +134% over 90 days.

Ranking history

bash-tool npm ranking history: currently #428 (by weekly downloads).bash-toolnpm ranking · by weekly downloads · Last 90 days#428current rank#150#200#250#300#350#400#450#500Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
bash-tool npm ranking history: currently #428 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 22, #8 (overall #428)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 1, #19 (overall #19)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for bash-tool
Date (UTC)Weekly downloadsChange vs. previous
410,326+11.3K
398,981+49.1K
349,832+36.2K
313,664+9.2K
304,502+219
304,283+1.4K
302,875-5K
307,913-10.9K
318,821-31.3K
350,137-22.9K
373,026-7.1K
380,076+76
380,000+1.2K
378,781—

Similar npm AI SDKs plugins

All 20 bash-tool alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/bash-tool. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.