0.2.0 • Published 1 year ago

@kareemaly/researcher v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Researcher CLI

A command-line tool for web research that uses SearchAPI.io to search the web and process results.

Features

  • Search the web with different search types (web, news)
  • Location-based search
  • Process and store search results
  • Convert web content to Markdown
  • List and view saved searches
  • Clean up old searches

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Link the CLI:
npm link

Configuration

Create a .env file in the project root with your SearchAPI.io credentials:

SEARCH_API_KEY=your_api_key
SEARCH_API_ENDPOINT=https://api.searchapi.io/api/v1/search

Usage

Search

# Basic web search
researcher search "your query"

# News search
researcher search "your query" --type news

# Location-based search
researcher search "restaurants" --location "New York, United States"

# Limit results
researcher search "your query" --limit 10

View Results

# List all searches
researcher list

# Show search details
researcher show <search-id>

# Show search details with processed content
researcher show <search-id> --content

Clean Up

# Remove searches older than 30 days
researcher clean

# Remove searches older than N days
researcher clean --older-than 7

# Remove all searches
researcher clean --all

Options

  • -o, --output <dir> - Set output directory (default: "research")
  • -v, --verbose - Enable verbose logging

Development

# Run in development mode
npm run dev

# Run type checking
npm run validate

# Run linting
npm run lint

# Run tests
npm run test