cli4ai
v1.2.11
Published
The package manager for AI CLI tools - cli4ai.com
Maintainers
Readme
cli4ai
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 notifsWhy cli4ai?
AI agents need tools. MCP servers are complex to set up. cli4ai makes it simple:
- Install tools in seconds —
cli4ai add githubjust works - Run from anywhere —
cli4ai 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.
| Package | Description |
|---------|-------------|
| github | GitHub notifications, repos, issues, PRs |
| slack | Slack messages, channels, users |
| gmail | Gmail inbox, threads, send/reply |
| twitter | Twitter/X timeline, search, post |
| youtube | YouTube transcripts and metadata |
| mongodb | MongoDB queries and schemas |
| postgres | PostgreSQL read-only queries |
| snowflake | Snowflake data warehouse queries |
| chrome | Browser automation with Puppeteer |
| linkedin | LinkedIn feed and profiles |
| fireflies | Fireflies.ai meeting transcripts |
| dataforseo | SEO keywords, trends, backlinks |
| ipinfo | IP address geolocation |
| history | Chrome browser history |
| openapi | Turn 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 updateCommands
Package Management
| Command | Description |
|---------|-------------|
| cli4ai add <pkg> | Install package locally |
| cli4ai add -g <pkg> | Install package globally |
| cli4ai remove <pkg> | Uninstall package |
| cli4ai list | List installed packages |
| cli4ai update | Update all packages |
Discovery
| Command | Description |
|---------|-------------|
| cli4ai browse | Interactive package browser |
| cli4ai search <query> | Search for packages |
| cli4ai info <pkg> | Show package details |
Execution
| Command | Description |
|---------|-------------|
| 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.
| Command | Description |
|---------|-------------|
| cli4ai serve | Start remote server (default port 4100) |
| cli4ai remotes add <name> <url> | Add a remote server |
| cli4ai remotes list | List 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 twitterServe 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 scopesMCP 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 githubAdd 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-toolTools 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 packagesRequirements
- Node.js 18+
- npm or bun
Related
- cli4ai/packages — Official tool packages
- cli4ai/create-cli4ai — Scaffold new tools
- cli4ai.com — Website and documentation
License
BSL 1.1 — Free for non-commercial use. Converts to Apache 2.0 on December 19, 2029.
