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

ai-search-cli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

ai-search-cli

AI-powered search CLI tool with web search capabilities

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

AI Search CLI Tool

A powerful CLI tool that combines AI capabilities with web search functionality using Groq and Tavily APIs.

Features

  • 🤖 AI-powered responses using Groq's LLaMA model
  • 🔍 Real-time web search integration with Tavily
  • 💬 Interactive chat mode
  • 📱 Instagram user search functionality
  • 🎨 Beautiful CLI interface with colors and loading spinners
  • ⚡ Fast and efficient API calls

Installation

Local Installation

# Clone or download the files
git clone <repository-url>
cd ai-search-cli

# Install dependencies
npm install

# Create .env file with your API keys
echo "GROQ_API_KEY=your_groq_api_key_here" > .env
echo "TAVILY_API_KEY=your_tavily_api_key_here" >> .env

# Make it executable globally
npm install -g .

Global Installation (if published to npm)

npm install -g ai-search-cli

Setup

  • Get your API keys:

    • Groq API Key: Sign up at console.groq.com
    • Tavily API Key: Sign up at tavily.com
  • Create a .env file in the project directory:

GROQ_API_KEY=your_groq_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here

Usage

Interactive Mode (Default)

ai-search
# or
ai-search chat
ai-search search "What's the weather like today?"
ai-search search "Latest news about AI" --force
ai-search instagram _mr.dhaval_io
ai-search instagram username

Commands

CommandDescriptionExample
ai-searchStart interactive modeai-search
ai-search chatStart interactive chatai-search chat
ai-search search <query>Direct searchai-search search "Python tutorials"
ai-search search <query> --forceForce web searchai-search search "News" --force
ai-search instagram <username>Search Instagram userai-search instagram elonmusk

Interactive Mode Commands

In chat mode, you can:

  • Ask any question
  • Type stop, bye, exit, or quit to end
  • Press Ctrl+C to exit

Examples

# Start interactive chat
ai-search

# Search for specific information
ai-search search "Bitcoin price today"

# Force web search for latest info
ai-search search "Latest iPhone release" --force

# Find Instagram profile information
ai-search instagram _mr.dhaval_io

# Multiple searches in interactive mode
ai-search chat
> What's the weather in Mumbai?
> Tell me about latest tech news
> Search for best restaurants in Delhi
> stop

Development

Project Structure

ai-search-cli/
├── index.js          # Main CLI application
├── package.json      # Dependencies and CLI configuration
├── .env             # API keys (create this)
├── README.md        # Documentation
└── .gitignore       # Git ignore file

Publishing to npm

  • Prepare for publishing:
# Login to npm
npm login

# Update version
npm version patch  # or minor, major

# Publish
npm publish
  • Test locally before publishing:
# Link locally
npm link

# Test the command
ai-search --help

Making it a Global CLI Tool

The key parts for CLI tool export:

  • Shebang line in index.js:
#!/usr/bin/env node
  • Bin field in package.json:
{
  "bin": {
    "ai-search": "./index.js"
  }
}
  • Make executable:
chmod +x index.js
  • Install globally:
npm install -g .

API Keys Required

  • Groq API: Free tier available, fast LLaMA inference
  • Tavily API: Web search API, free tier available

Error Handling

  • Network connectivity issues
  • API rate limits
  • Invalid API keys
  • Empty search results

Contributing

  • Fork the repository
  • Create your feature branch
  • Commit your changes
  • Push to the branch
  • Create a Pull Request

License

MIT License - see LICENSE file for details.

Support

If you encounter any issues:

  • Check your API keys in .env file
  • Verify internet connectivity
  • Check API rate limits
  • Open an issue on GitHub

Keywords

ai

FAQs

Package last updated on 19 Aug 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