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

@drmhse/act-cli

v0.1.10

Published

AI-aware context management CLI for terminal-based development

Readme

Act CLI

Act CLI is a context-aware command-line interface that enables persistent context management for AI-assisted development workflows. It provides a structured approach to accumulating and managing contextual information before interacting with AI coding assistants.

Overview

Act CLI transforms the traditional stateless terminal interaction into a stateful, context-aware development environment. The tool maintains a workspace-specific context buffer that allows developers to systematically collect code files, git diffs, and command outputs before sending structured requests to AI backends.

Core Concepts

Context Buffer

A persistent, workspace-specific staging area where users collect information before AI interaction. Each workspace maintains its own isolated context buffer.

Context Items

Individual pieces of information within the buffer, containing both content and metadata about the source (file path, command executed, timestamp).

AI Backend Integration

Configurable integration with AI command-line tools through a wrapper that handles context formatting and process management.

Prerequisites

  • Node.js >= 14.0.0
  • npm >= 6.0.0
  • Git (for git diff functionality)
  • Compatible AI CLI tool (claude, gemini, etc.)

Installation

Container Environment

Act CLI is pre-installed in the AI Coding Terminal container.

Standalone Installation

npm install -g @drmhse/act-cli
act init

Command Reference

Context Management

Add Content to Context

act context add <files...>          # Add files to context buffer
act context add --diff              # Add staged git diff
act context add --exec "command"    # Add command output

View Context

act context list                    # Show context summary
act context show [index]            # Display specific item

Modify Context

act context remove <items...>      # Remove by index or pattern
act context clear                   # Clear all context

AI Interaction

act do "<prompt>"                   # Query AI with context
act do --no-context "<prompt>"     # Query AI without context

Workflow Commands

act commit                          # Generate commit message from staged changes
act commit -a                       # Stage all changes and generate commit
act review                          # Code review current branch vs main
act review -b <branch>              # Review vs specified branch
act test                            # Generate tests for staged changes
act explain                         # Explain code/output with context
act fix                             # AI-powered error analysis

Configuration

act config set <key> <value>        # Set configuration value
act config get <key>                # Get configuration value
act config list                     # Show all configuration
act init                            # Initialize act-cli

Architecture

Storage

  • Configuration: ~/.act/config.json
  • Context Buffer: ~/.act/context/<workspace-hash>/
  • Workspace Detection: Git repository root or current directory

Context Storage Format

Each context item is stored as a JSON file containing:

{
  "metadata": {
    "type": "file|diff|exec",
    "source": "path/to/file",
    "timestamp": "ISO-8601",
    "size": 1024
  },
  "content": "actual content"
}

Configuration

Backend Configuration

act config set ai_backend.command "claude"
act config set ai_backend.args '["--print"]'

Custom Prompt Templates

Custom prompts for workflow commands can be configured:

act config set golden_paths.commit "Your custom commit prompt"

Security Considerations

  • Command execution through --exec flag includes basic input validation
  • File size limits prevent memory exhaustion
  • No automatic execution of untrusted commands

Troubleshooting

AI Backend Not Found

# Verify AI CLI installation
which claude
npm install -g @anthropic-ai/claude-code

Git Repository Issues

# Initialize repository if needed
git init
# Or use non-git alternatives
act context add --exec "ls -la"

Context Buffer Issues

# Clear corrupted context
act context clear
# Reset configuration
rm ~/.act/config.json

Performance Issues

  • Use act context clear for large contexts
  • File size limit: 5MB per file
  • Context items are loaded on demand

Development

Testing

npm test

Project Structure

src/
├── context-manager.js    # Context buffer operations
├── config-manager.js     # Configuration management
├── ai-wrapper.js         # AI backend integration
└── index.js              # Main exports

bin/
└── act.js               # CLI entry point

__tests__/
└── *.test.js            # Test suites

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes with tests
  4. Submit a pull request

License

MIT License - see LICENSE file for details

Support

For issues and questions:

  • Create an issue in the project repository
  • Check the troubleshooting section above
  • Review existing documentation

Version Information

Current version information available via:

act --version