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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mockingmagician/assistant-runner

v0.4.0

Published

An intelligent command-line interface assistant powered by TypeScript and AI. This tool helps automate common CLI tasks through natural language processing and a modular tool system.

Readme

CLI Assistant

An intelligent command-line interface assistant powered by TypeScript and AI. This tool helps automate common CLI tasks through natural language processing and a modular tool system.

Features

  • 🤖 Advanced natural language command processing using OpenAI agnostic models
  • 🔄 Interactive CLI interface with spinners and prompts

  • 🛠️ Modular tool system for easy extensibility
  • 📦 Built with TypeScript for type safety and better developer experience
  • 🧪 Comprehensive test coverage with Jest

  • 📧 Email integration capabilities
  • 🌐 Web scraping functionality with Puppeteer
  • 🗃️ Local data storage with SQLite

  • 🐳 Docker support for containerized deployment

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Docker (optional, for containerized usage)

Installation

# Clone the repository
git clone [email protected]:MockingMagician/cli-assistant.git
cd cli-assistant

# Install dependencies
npm install

Project Structure

  • src/ - Source code
    • tools/ - CLI tool implementations
    • misc/ - Miscellaneous utilities and helpers
    • __tests__/ - Test files
  • .env.example - Example environment configuration
  • Dockerfile - Docker configuration
  • tsconfig.json - TypeScript configuration
  • jest.config.ts - Jest test configuration

Environment Setup

  1. Copy the example environment file:
cp .env.example .env
  1. Edit the .env file and fill in your environment variables:
[email protected]
SMTP_PASS=some_password
SMTP_HOST=some_host
SMTP_PORT=some_port

FISH_AUDIO_API_KEY=some_api_key

OPEN_WEATHER_API_KEY=some_api_key

GITHUB_TOKEN=some_token

OPENAI_AGNOSTIC_API_KEY=
OPENAI_AGNOSTIC_BASE_URL=http://localhost:1234/v1
OPENAI_AGNOSTIC_MODEL=qwen2.5-7b-instruct-1m

Development

Available scripts:

# Build the project
npm run build

# Run in development mode with hot-reload
npm run dev

# Run tests
npm run test

Testing

The project uses Jest for testing. Run the test suite with:

npm run test

Adding New Tools

To add a new tool to the CLI assistant:

  1. Create a new file in src/tools/ with the naming convention your-tool.tool.ts
  2. Implement the ToolInterface from tool.interface.ts:
import { ToolInterface } from './tool.interface';
import OpenAI from 'openai';

interface YourToolParameters {
    // Define your tool's input parameters
    param1: string;
    param2: number;
}

interface YourToolReturn {
    // Define your tool's return value structure
    result: string;
}

export class YourTool implements ToolInterface<YourToolParameters, YourToolReturn> {
    definition: OpenAI.ChatCompletionTool = {
        type: 'function',
        function: {
            name: 'your_tool_name',
            description: 'What your tool does',
            parameters: {
                type: 'object',
                properties: {
                    param1: {
                        type: 'string',
                        description: 'Description of param1'
                    },
                    param2: {
                        type: 'number',
                        description: 'Description of param2'
                    }
                },
                required: ['param1', 'param2']
            }
        }
    };

    async perform(parameters: YourToolParameters): Promise<YourToolReturn> {
        // Your tool logic here
        return {
            result: 'Tool execution result'
        };
    }
}
  1. Add corresponding test file in src/tools/__tests__/your-tool.tool.test.ts
  2. Register your tool in the main file with the tools registry:
// In cli.ts
import { YourTool } from "./tools/your-tool.tool";

toolRegistry.register(new YourTool());

Docker

Build and run the application in a Docker container:

  1. Build the image:
docker build -t cli-assistant .
  1. Run the container with your environment file:
docker run -it --rm --env-file .env cli-assistant

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Versioning

This project uses Semantic Versioning (SemVer) for versioning. For the versions available, see the tags on this repository.

Given a version number MAJOR.MINOR.PATCH, increment the:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards-compatible manner, and
  • PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.