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

@humanlayer/agentlayer-justbash

v0.0.81

Published

Implements AgentLayer's core tool interfaces (`BashTool`, `ReadTool`, `WriteTool`, `EditTool`, `GrepTool`, `GlobTool`, `ListTool`, `ApplyPatchTool`, `WebFetchTool`, `WebSearchTool`, `CodeSearchTool`, skills) on top of [`just-bash`](https://github.com/verc

Readme

agentlayer-justbash

Implements AgentLayer's core tool interfaces (BashTool, ReadTool, WriteTool, EditTool, GrepTool, GlobTool, ListTool, ApplyPatchTool, WebFetchTool, WebSearchTool, CodeSearchTool, skills) on top of just-bash, Vercel's in-memory virtual bash environment. Every tool is a thin adapter: it shells out through a single bash.exec() call (cat, rg, ls, curl, heredocs, ...) instead of touching Node's fs directly, so agent tool use stays sandboxed to whatever filesystem just-bash is backed by.

Install

bun add @humanlayer/agentlayer-justbash just-bash

just-bash and typescript are peer dependencies.

Usage

import { Agent } from '@humanlayer/agentlayer-core'
import { Bash } from 'just-bash'
import { createJustBashTool, createJustBashReadTool, createWriteTool, createGrepTool } from '@humanlayer/agentlayer-justbash/tools'

const bash = new Bash()

const agent = new Agent({
	model /* an ai-sdk LanguageModel */,
	tools: {
		bash: createJustBashTool(bash),
		read: createJustBashReadTool(bash),
		write: createWriteTool(bash),
		grep: createGrepTool(bash),
	},
})

Tools that call external APIs take an options object with the key(s) they need:

import { createWebSearchTool, createCodeSearchTool } from '@humanlayer/agentlayer-justbash/tools'

const webSearch = createWebSearchTool(bash, { exaApiKey: process.env.EXA_API_KEY! })
const codeSearch = createCodeSearchTool(bash, { exaApiKey, context7ApiKey }) // at least one required

createSkillToolFromVFS(bash, { dirs }) reads *.md skill files out of the virtual filesystem (parsing frontmatter description or the first # heading) and merges them with any statically-provided skills.

Exports

  • . — everything below, re-exported together
  • ./tools — the create*Tool(bash, opts?) factories listed above
  • ./promptscreateAgentSystemPrompt, environmentPrompt, repoInstructionsPrompt, plus re-exports of @humanlayer/agentlayer-core/prompts (resolveCodingModelPrompt, detectModelFamily, tarsPersona, etc.)

The prompt helpers use bash.exec (git rev-parse --show-toplevel, cat) instead of Node's fs/child_process to discover the repo root and read CLAUDE.md/AGENTS.md/CONTEXT.md, so they work identically whether just-bash is backed by a real disk or an in-memory VFS.

Design

Each tool factory pairs a core tool interface (schema + name, from @humanlayer/agentlayer-core/interfaces) with an executor that drives Bash.exec(), and reuses the core's shared prompt text (BASH_DESCRIPTION, READ_DESCRIPTION, ...) so the tool description an agent sees is identical across backends (filesystem, justbash, etc.).

flowchart LR
    A["agentlayer-core interfaces\n(BashTool, ReadTool, ...)"] -->|".define(executor)"| B["agentlayer-justbash tool"]
    B -->|"bash.exec(cmd)"| C["just-bash Bash instance"]
    C --> D["in-memory or real filesystem"]

File-mutating tools (write, edit, apply_patch) write through shell heredocs (cat > "$file" <<'DELIM' ... DELIM) rather than direct file APIs, keeping all I/O funneled through the same bash.exec surface used for everything else.

Tests

Run bun test from this directory (or bun run test from the repo root) (see test/) to cover the prompt-building helpers, code-search input validation, and web-search result shaping using a mocked Bash.exec.