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

@zookanalytics/agent-env

v0.8.0

Published

CLI for creating isolated, AI-ready development environments

Readme

@zookanalytics/agent-env

CLI for creating isolated, AI-ready development environments.

Installation

npm install -g @zookanalytics/agent-env

Requirements

  • Node.js >= 20
  • Docker (OrbStack recommended on macOS)

Workspace Structure

Each agent environment creates a .agent-env/ directory inside the workspace to store instance-specific data:

<workspace>/
├── .agent-env/          # Instance data (git-ignored)
│   ├── state.json       # Instance metadata (repo URL, container name, config source)
│   ├── ssh/             # SSH host keys (container identity)
│   │   ├── ssh_host_ed25519_key
│   │   ├── ssh_host_ed25519_key.pub
│   │   ├── ssh_host_rsa_key
│   │   └── ssh_host_rsa_key.pub
│   ├── devcontainer.json  # Baseline config (only if using baseline)
│   └── init-host.sh       # Baseline init script (only if using baseline)
├── .devcontainer/       # Project's devcontainer config (if present)
└── <your code>

What's in .agent-env/:

  • state.json - Instance metadata including repository URL, container name, and configuration source
  • ssh/ - SSH host keys that persist across container restarts, preventing "host identification changed" warnings
  • devcontainer.json - Copied from baseline config when creating instances without their own .devcontainer/
  • init-host.sh - Host-side initialization script (baseline configs only)

Git exclusion:

The .agent-env/ directory is automatically added to .git/info/exclude so instance state doesn't appear as untracked files in your git status.

SSH Access

Each agent environment runs an SSH server, allowing you to connect directly:

# On OrbStack (recommended)
ssh node@ae-<instance-name>.orb.local

# Via port forwarding (automatic fallback)
ssh -p <port> node@localhost

# Find connection details
agent-env list  # Shows SSH connection strings

How It Works

Host Keys (Container Identity)

Each container generates unique SSH host keys on first creation, stored in .agent-env/ssh/ inside the workspace:

  • ssh_host_ed25519_key / ssh_host_ed25519_key.pub
  • ssh_host_rsa_key / ssh_host_rsa_key.pub

These persist across container stops/starts/rebuilds, ensuring you don't get "host identification changed" warnings. They identify the SSH server (the container's sshd).

User Keys (Your Identity)

Your public SSH keys from ~/.ssh/*.pub are automatically staged into the container's authorized_keys. The private keys remain on your host - containers only see your public keys.

Why separate host and user keys?

  • Host keys: Container proves "I'm the legitimate ae-my-project server"
  • User keys: You prove "I'm authorized to access this container"

This is standard SSH architecture - the same pattern used by any SSH server.

Commit Signing Setup

Agent environments support commit signing via SSH signing (recommended) or GPG signing.

SSH Signing (Recommended)

SSH signing is recommended because:

  • SSH agent forwarding is built into Docker Desktop
  • No additional background processes needed
  • Works reliably on macOS with Docker Desktop
  • Supported by GitHub, GitLab, and Gitea

Setup:

  1. Configure git to use the public key content directly:
# Configure git to use SSH signing with the actual key content
git config --global gpg.format ssh
git config --global user.signingkey "$(cat ~/.ssh/id_ed25519.pub)"
git config --global commit.gpgsign true

This embeds the public key content in your .gitconfig:

[gpg]
    format = ssh
[user]
    signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... user@host
[commit]
    gpgsign = true

Why use the key content instead of a file path?

Your .gitconfig is mounted from the host into containers, but SSH keys are NOT copied in. Instead, the SSH agent socket is forwarded. The public key content acts as an identifier telling git which key pair to use - the actual signing happens via the forwarded SSH agent using your private key.

File paths like ~/.ssh/id_ed25519.pub won't work because:

  • Host path: /Users/you/.ssh/id_ed25519.pub
  • Container path: /home/node/.ssh/id_ed25519.pub (doesn't exist - keys aren't copied)

Using the key content directly avoids this path mismatch entirely.

  1. Verify SSH agent has your key:
ssh-add -l  # Should list your SSH key

Commit signing will now work in all containers automatically.

GPG Signing

GPG signing has limitations on macOS with Docker Desktop:

  • Unix domain sockets cannot be bind-mounted from macOS to Linux containers
  • Requires SSH tunneling or relay processes per container
  • Complex lifecycle management

If you must use GPG:

  • GPG signing works when opening containers in VS Code (built-in forwarding)
  • For CLI-based workflows, consider SSH signing instead

Usage

# Create a new development environment
agent-env create <workspace-name> [options]

# List all environments
agent-env list

# List environments with JSON output
agent-env list --json

# Attach to an environment
agent-env attach <name>

# Remove an environment
agent-env remove <name>

Commands

create

Create a new isolated development environment.

agent-env create my-project --repo https://github.com/user/repo
agent-env create my-project --repo .  # Use current directory's git remote

list

List all development environments with their status and git state.

agent-env list          # Human-readable table
agent-env list --json   # Machine-readable JSON

attach

Attach to an existing development environment.

agent-env attach <name>

remove

Remove a development environment with safety checks.

agent-env remove <name>
agent-env remove <name> --force  # Bypass safety checks

purpose

Set or view the purpose/description of an environment.

agent-env purpose <name>                      # Get current purpose
agent-env purpose <name> "Working on feature X"  # Set purpose

License

MIT