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

agi-core

v1.0.5

Published

Universal Artificial General Intelligence Framework - Advanced AI orchestration, automation, and cognitive computing

Readme

AGI Core

A powerful AI-powered CLI assistant for software engineering. Chat with AI, execute tools, edit files, run commands, and automate complex development tasks - all from your terminal.

Features

  • Interactive Chat - Conversational AI interface with streaming responses
  • Tool Execution - Read/write/edit files, execute commands, search code
  • Git Integration - Built-in git status, diff, commit, branch management
  • Auto-Run Mode - AI autonomously completes multi-step tasks
  • Session Persistence - Resume conversations across sessions
  • Retry Logic - Automatic retry with exponential backoff for reliability

Installation

# Install globally
npm install -g agi-core

# Or install from source
git clone https://github.com/your-org/agi-core.git
cd agi-core
npm install
npm run build
npm link

Requirements: Node.js 20.0.0+

Quick Start

# Set your API key
export OPENAI_API_KEY=your_key_here

# Start interactive mode
agi

# Quick one-shot query
agi -q "explain this error" < error.log

Commands

Chat & Configuration

| Command | Description | |---------|-------------| | /key <key> | Set OpenAI API key | | /model <name> | Switch AI model (gpt-4o, gpt-4, etc.) | | /clear | Clear conversation history | | /history | View/manage conversation history | | /c | Toggle auto-run mode |

Information

| Command | Description | |---------|-------------| | /help | Show all commands | | /status | System status | | /stats | Session statistics | | /tools | List available AI tools |

Session

| Command | Description | |---------|-------------| | /toggle <mode> | Toggle stream/verbose/autosave | | exit / quit / q | Exit CLI |

AI Tools

The AI has access to these tools for completing tasks:

File Operations

  • read_file - Read file contents
  • write_file - Create or overwrite files
  • edit_file - Make precise text replacements
  • list_directory - List directory contents
  • search_files - Search by filename or content

Code Search

  • grep_search - Regex pattern search
  • find_definition - Find function/class definitions

Execution

  • execute_command - Run shell commands (with safety checks)

Git

  • git_status - View modified/staged/untracked files
  • git_diff - Show file changes
  • git_log - View commit history
  • git_commit - Stage and commit changes
  • git_branch - Manage branches

Web

  • web_search - Search the web
  • fetch_url - Fetch URL content

Modes

Stream Mode (default: on)

Displays AI responses character-by-character as they're generated.

Auto-Run Mode (default: on)

When enabled, the AI will automatically continue executing tasks until completion without waiting for user input. Toggle with /c.

Verbose Mode (default: off)

Shows additional details like response timing and tool result previews.

AutoSave Mode (default: off)

Automatically saves conversation history after each exchange.

Keyboard Shortcuts

| Shortcut | Action | |----------|--------| | Ctrl+C | Interrupt / Exit | | Ctrl+D | Exit | | Ctrl+L | Clear screen | | ↑ / ↓ | Navigate command history |

Session Persistence

AGI Core automatically saves and restores your conversation:

  • Sessions persist for 24 hours within the same workspace
  • Use /history save to manually save
  • Use /history clear to clear saved history
  • Use /clear to start a fresh conversation

When resuming a session, you'll see:

↻ Resumed session with X previous messages
Use /clear to start fresh or /history to see details

Error Handling

AGI Core includes intelligent error handling:

  • Automatic Retry - Retries on rate limits (429), server errors (5xx), and network issues
  • Exponential Backoff - Waits progressively longer between retries
  • Recovery Suggestions - Provides helpful tips when errors occur

Configuration

Configuration is stored in ~/.agi/:

~/.agi/
├── config.json    # API keys, model preferences, mode settings
└── history.json   # Saved conversation history

CLI Options

agi [options]

Options:
  -v, --version     Show version
  -h, --help        Show help
  -q, --quick       Quick mode (non-interactive single query)
  --model <name>    Select model
  --advanced        Enable advanced features

Examples

Code Editing

❯ read the main.ts file and fix any TypeScript errors

Git Operations

❯ check git status and commit all changes with a descriptive message

Code Search

❯ find all files that import the UserService class

File Operations

❯ create a new React component called Button in src/components

Command Execution

❯ run the tests and fix any failures

Development

# Build
npm run build

# Run tests
npm test

# Run with coverage
npm run test:coverage

# Clean build
npm run clean

Project Structure

src/
├── bin/
│   ├── agi.ts      # Main CLI entry point
│   └── ui.ts       # UI components and theming
├── core/
│   └── agi.ts      # Core AGI framework
├── tools/
│   └── execution.ts # Command execution utilities
└── __tests__/      # Test suites

License

MIT


AGI Core - AI-powered development from your terminal