@sno-ai/search
v0.1.1
Published
AI-powered search from your terminal - Fast, intelligent answers with citations
Maintainers
Readme
Sno Search CLI
AI-powered search from your terminal
Fast, intelligent search powered by Sno's AI engine. Get instant answers with citations, research topics, and explore knowledge—all from the command line.
Features
- 🚀 Fast AI-powered search - Get answers in seconds
- 📚 Cited sources - Every answer includes references
- 🔄 Streaming responses - See results as they're generated
- 🎨 Clean output - Formatted markdown responses
- 🔐 Secure API authentication - Project-level API keys
- ⚡ Lightweight - Minimal dependencies
Installation
npm
npm install -g @sno-ai/searchpnpm
pnpm add -g @sno-ai/searchYarn
yarn global add @sno-ai/searchSetup
1. Get Your API Key
- Visit https://sno.ai/settings/api
- Create a new project (if you don't have one)
- Generate a Nexus API key for your project
- Copy the generated key (starts with
sno-)
2. Set Environment Variable
Linux/macOS:
export SNO_API_KEY='your-api-key-here'Windows (PowerShell):
$env:SNO_API_KEY='your-api-key-here'Windows (CMD):
set SNO_API_KEY=your-api-key-herePermanent Setup (recommended):
Add to your shell profile (~/.bashrc, ~/.zshrc, or ~/.profile):
export SNO_API_KEY='your-api-key-here'Quick Start
# Ask a question
sno-search "What is TypeScript?"
# Multi-word queries (quotes optional)
sno-search How does React work
# Get help
sno-search --help
# Check version
sno-search --versionUsage Examples
General Knowledge
sno-search "Explain quantum computing"Technical Questions
sno-search "What are the differences between REST and GraphQL?"Current Events
sno-search "Latest developments in AI"Research
sno-search "Compare Next.js, Remix, and Astro frameworks"How-To Queries
sno-search "How to deploy a Next.js app to Vercel"Example Output
$ sno-search "What is Rust?"
## What is Rust?
Rust is a low-level statically-typed multi-paradigm programming language
focusing on safety and performance[1][2]. Developed by Mozilla and now
maintained by the Rust Foundation, it's designed for building fast,
reliable, and memory-safe systems[3][4].
### Key Features
- **Memory Safety**: No null pointer dereferences or data races[1]
- **Zero-cost Abstractions**: High-level features with no runtime overhead[2]
- **Concurrent Programming**: Built-in support for safe concurrency[3]
- **Rich Type System**: Prevents many bugs at compile time[4]
Rust is used by companies like Discord, Dropbox, and Microsoft for
performance-critical applications[5].
[1] https://rust-lang.org/
[2] https://doc.rust-lang.org/
[3] https://en.wikipedia.org/wiki/Rust_(programming_language)
...
Powered by SnoConfiguration
Custom API URL (for development)
# Use a different API endpoint
export SNO_API_URL=http://localhost:3000/api/v1/nexus/chat
sno-search "test query"Requirements
- Node.js: 18.0.0 or higher
- Internet: Active connection required
Development
Clone & Setup
git clone https://github.com/sno-ai/sno-ai.git
cd sno-ai/tools/sno-search-cli
pnpm installBuild
pnpm buildTest Locally
# Link for local testing
npm link
# Run
sno-search "test query"
# Unlink when done
npm unlink -g @sno-ai/searchTest with Custom API
# Build and test against local dev server
pnpm build
SNO_API_URL=http://localhost:3000/api/v1/nexus/chat node dist/index.js "test"Troubleshooting
"SNO_API_KEY environment variable is required"
You need to set your API key before using the CLI:
# Get your key from https://sno.ai/settings/api
export SNO_API_KEY='sno-xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'Make it permanent by adding to your shell profile (~/.bashrc, ~/.zshrc).
"Unauthorized - Invalid or missing API key"
Error 401: Your API key is invalid, revoked, or expired.
Solutions:
- Check that
SNO_API_KEYis set correctly:echo $SNO_API_KEY - Verify the key format starts with
sno- - Generate a new API key at https://sno.ai/settings/api
- Make sure you're using a Nexus API key (not Coretex or Source key)
"Command not found: sno-search"
Make sure the package is installed globally and npm's global bin directory is in your PATH:
# Check installation
npm list -g @sno-ai/search
# Find npm global bin path
npm bin -g
# Add to PATH if needed (add to ~/.bashrc or ~/.zshrc)
export PATH="$(npm bin -g):$PATH"Connection Errors
Error: Unable to connect to Sno API. Check your internet connection.Solutions:
- Verify internet connection
- Check if
sno.aiis accessible - Try again in a few moments
Empty Responses
If you get no output, ensure your query is not empty:
# ❌ Won't work
sno-search ""
# ✅ Works
sno-search "your question here"API
Command Line
sno-search [options] <query>Options:
--help,-h- Show help message--version,-v- Show version number
Arguments:
<query>- Your search query (quotes optional for multi-word queries)
Environment Variables
SNO_API_URL- Override default API endpoint (default:https://sno.ai/api/v1/nexus/chat)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT © Sno AI Corporation
Support
- 🌐 Website: sno.ai
- 📧 Email: [email protected]
- 💬 Issues: GitHub Issues
Related
- Sno.ai - AI-powered knowledge platform
- Sno Unify - Collaborative AI workspace
- Sno Nexus - Advanced AI search
Powered by Sno - AI-powered search and knowledge management
