New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

cli4ai

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cli4ai

The package manager for AI CLI tools - cli4ai.com

latest
Source
npmnpm
Version
1.2.11
Version published
Maintainers
1
Created
Source

cli4ai

npm version License: BSL 1.1

The package manager for AI CLI tools.

Give your AI agents superpowers with ready-to-use tools for GitHub, Slack, Gmail, databases, and more. Install in seconds, run from anywhere, integrate with Claude via MCP.

npm i -g cli4ai
cli4ai add -g github
cli4ai run github notifs

Why cli4ai?

AI agents need tools. MCP servers are complex to set up. cli4ai makes it simple:

  • Install tools in secondscli4ai add github just works
  • Run from anywherecli4ai run <tool> <command>
  • MCP integration — Wrap any CLI tool as an MCP server automatically
  • Local-first — Tools are just TypeScript scripts, no cloud required
  • Unified interface — All tools output JSON for easy parsing

Available Packages

See the packages repo for source code and documentation.

PackageDescription
githubGitHub notifications, repos, issues, PRs
slackSlack messages, channels, users
gmailGmail inbox, threads, send/reply
twitterTwitter/X timeline, search, post
youtubeYouTube transcripts and metadata
mongodbMongoDB queries and schemas
postgresPostgreSQL read-only queries
snowflakeSnowflake data warehouse queries
chromeBrowser automation with Puppeteer
linkedinLinkedIn feed and profiles
firefliesFireflies.ai meeting transcripts
dataforseoSEO keywords, trends, backlinks
ipinfoIP address geolocation
historyChrome browser history
openapiTurn any OpenAPI spec into a CLI

Browse all packages: cli4ai browse

Quick Start

# Install cli4ai globally
npm i -g cli4ai

# Install a tool
cli4ai add -g github

# Run a command
cli4ai run github notifs

# See available commands
cli4ai info github

# Update all tools
cli4ai update

Commands

Package Management

CommandDescription
cli4ai add <pkg>Install package locally
cli4ai add -g <pkg>Install package globally
cli4ai remove <pkg>Uninstall package
cli4ai listList installed packages
cli4ai updateUpdate all packages

Discovery

CommandDescription
cli4ai browseInteractive package browser
cli4ai search <query>Search for packages
cli4ai info <pkg>Show package details

Execution

CommandDescription
cli4ai run <pkg> <cmd> [args]Run a tool command
cli4ai run --remote <name> <pkg> <cmd>Run on remote server
cli4ai start <pkg>Start package as MCP server

Remote Servers

Run tools on remote machines. Perfect for accessing tools on other computers or servers.

CommandDescription
cli4ai serveStart remote server (default port 4100)
cli4ai remotes add <name> <url>Add a remote server
cli4ai remotes listList configured remotes
cli4ai remotes remove <name>Remove a remote
cli4ai list --remote <name>List packages on remote
cli4ai info --remote <name> <pkg>Get package info from remote
cli4ai search --remote <name> <query>Search packages on remote

Example: Set up remote execution

# On the server machine
cli4ai serve --port 4100

# On your local machine
cli4ai remotes add my-server http://192.168.1.100:4100

# Run tools remotely
cli4ai run --remote my-server github notifs
cli4ai list --remote my-server
cli4ai info --remote my-server twitter

Serve options:

cli4ai serve                           # Start on port 4100
cli4ai serve --port 8080               # Custom port
cli4ai serve --api-key mysecretkey     # Require authentication
cli4ai serve --scope read,write        # Restrict to specific scopes

MCP Integration

cli4ai tools can run as MCP servers for Claude:

# Generate Claude Code config
cli4ai mcp-config

# Start a tool as MCP server
cli4ai start github

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "github": {
      "command": "cli4ai",
      "args": ["start", "github"]
    }
  }
}

Creating Tools

# Quick scaffold with defaults
npx create-cli4ai my-tool -y

# Interactive mode (prompts for commands, args, env vars)
npx create-cli4ai

# Or use the built-in init
cli4ai init my-tool

Tools are TypeScript scripts with a cli4ai.json manifest:

#!/usr/bin/env npx tsx
import { cli, output } from '@cli4ai/lib/cli.ts';

const program = cli('my-tool', '1.0.0', 'My awesome tool');

program
  .command('hello [name]')
  .description('Say hello')
  .action((name?: string) => {
    output({ message: `Hello, ${name || 'world'}!` });
  });

program.parse();
{
  "name": "my-tool",
  "version": "1.0.0",
  "description": "My awesome tool",
  "entry": "run.ts",
  "runtime": "node",
  "commands": {
    "hello": {
      "description": "Say hello",
      "args": [{ "name": "name", "required": false }]
    }
  }
}

Storage

~/.cli4ai/
├── config.json       # Global configuration
├── packages/         # Globally installed packages
└── bin/              # PATH-linked executables

./.cli4ai/
└── packages/         # Locally installed packages

Requirements

  • Node.js 18+
  • npm or bun

License

BSL 1.1 — Free for non-commercial use. Converts to Apache 2.0 on December 19, 2029.

Keywords

cli

FAQs

Package last updated on 27 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts