Skip to content

πŸ” Lightning-fast CLI tool to search 30+ developer sites from your terminal - Stack Overflow, GitHub, docs, wikis, and more

License

Notifications You must be signed in to change notification settings

Nachmen-Kurtz/quicksearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” QuickSearch

License: GPL v3 Bash Platform

Lightning-fast CLI search shortcuts for developers. Search 30+ sites directly from your terminal with simple, memorable commands.

✨ Features

  • πŸš€ Instant Search - Type search-so "your query" and your browser opens with results
  • 🌈 Colorful Output - Beautiful, readable terminal feedback
  • πŸ”§ Developer-Focused - Stack Overflow, GitHub, documentation sites
  • 🐧 Linux-Friendly - Search all major Linux wikis at once with one command
  • πŸ“¦ Package Search - npm, PyPI, NixPkgs, Arch packages, and more
  • πŸ€– AI Integration - Quick access to ChatGPT, Claude, Perplexity
  • ⚑ Zero Dependencies - Pure bash, works everywhere
  • 🎯 30+ Sites - One tool for all your search needs

πŸ“‹ Table of Contents

πŸš€ Installation

Quick Install (Recommended)

# Clone the repository
git clone https://github.com/Nachmen-Kurtz/quicksearch.git
cd quicksearch

# Run the install script
chmod +x install.sh
./install.sh

Manual Installation

  1. Download the script:
mkdir -p ~/.local/bin
cd ~/.local/bin
curl -O https://raw.githubusercontent.com/Nachmen-Kurtz/quicksearch/main/quicksearch.sh
chmod +x search-tool.sh
  1. Create symbolic links:
cd ~/.local/bin

# Create all command aliases
for cmd in so sf su se gh gist mdn godocs rustdocs pydocs aws man docs \
           npm pypi nixpkgs archpkg fedorapkg archwiki gentoowiki debianwiki \
           nixwiki susewiki voiddocs voidwiki fedoradocs linuxwiki yt reddit \
           wiki chatgpt perplexity claude ddg; do
    ln -sf search-tool.sh search-$cmd
done
  1. Add to PATH (if ~/.local/bin is not already in your PATH):
# For bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

# For zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

# For fish
fish_add_path ~/.local/bin
  1. Verify installation:
search-so "test query"

πŸ“– Usage

Basic syntax:

search-<site> "your search query"

The command will automatically:

  1. URL-encode your search query
  2. Open your default browser
  3. Navigate to the search results

General Tips

  • Always quote your search queries
  • Queries are automatically URL-encoded
  • Works with any default browser
  • Use search-linuxwiki to search ALL Linux wikis at once

πŸ—‚οΈ Available Commands

πŸ’» Development & Programming

Command Site Description
search-so Stack Overflow Programming Q&A
search-sf Server Fault System administration Q&A
search-su Super User General computing Q&A
search-se Stack Exchange All Stack Exchange sites
search-gh GitHub Code repositories
search-gist GitHub Gist Code snippets

πŸ“š Documentation

Command Site Description
search-mdn MDN Web Docs Web development documentation
search-godocs Go Docs Go language documentation
search-rustdocs Rust Docs Rust language documentation
search-pydocs Python Docs Python documentation
search-aws AWS Docs Amazon Web Services documentation
search-man man7.org Linux man pages
search-docs DevDocs Multiple documentation sources

πŸ“¦ Package Managers

Command Site Description
search-npm npm Node.js packages
search-pypi PyPI Python packages
search-nixpkgs NixPkgs Nix packages
search-archpkg Arch Packages Arch Linux packages
search-fedorapkg Fedora Packages Fedora packages

🐧 Linux Wikis & Documentation

Command Site Description
search-archwiki Arch Wiki Arch Linux documentation
search-gentoowiki Gentoo Wiki Gentoo documentation
search-debianwiki Debian Wiki Debian documentation
search-nixwiki NixOS Wiki NixOS documentation
search-susewiki openSUSE Wiki openSUSE documentation
search-voiddocs Void Docs Void Linux documentation
search-voidwiki Void Wiki Void Linux wiki
search-fedoradocs Fedora Docs Fedora documentation
search-linuxwiki All Linux Wikis Search ALL wikis at once!

πŸŽ₯ Social & Media

Command Site Description
search-yt YouTube Video search
search-reddit Reddit Community discussions
search-wiki Wikipedia Encyclopedia

πŸ€– AI & Search Engines

Command Site Description
search-chatgpt ChatGPT OpenAI assistant
search-perplexity Perplexity AI-powered search
search-claude Claude Anthropic assistant
search-ddg DuckDuckGo Privacy-focused search

πŸ’‘ Examples

Programming Help

# Search Stack Overflow
search-so "how to reverse a string in python"

# Search GitHub repositories
search-gh "react hooks examples"

# Find code snippets
search-gist "bash script parse json"

Documentation

# Python documentation
search-pydocs "asyncio tutorial"

# Go documentation
search-godocs "http server"

# MDN for web development
search-mdn "css flexbox"

# Man pages
search-man "grep"

Linux System Administration

# Search a specific wiki
search-archwiki "install nvidia drivers"

# Search ALL Linux wikis at once (recommended!)
search-linuxwiki "systemd service configuration"

# Gentoo-specific
search-gentoowiki "kernel configuration"

# Void Linux
search-voiddocs "xbps package manager"

Package Management

# Find npm packages
search-npm "express middleware"

# Python packages
search-pypi "requests library"

# NixOS packages
search-nixpkgs "firefox"

# Arch packages
search-archpkg "docker"

General Search

# YouTube tutorials
search-yt "rust programming tutorial"

# Reddit discussions
search-reddit "best mechanical keyboard 2024"

# Wikipedia
search-wiki "quantum computing"

# DuckDuckGo
search-ddg "privacy tools"

AI Assistants

# Ask ChatGPT
search-chatgpt "explain recursion"

# Use Perplexity for research
search-perplexity "latest developments in AI"

# Claude
search-claude "help me write a bash script"

βš™οΈ Configuration

Customizing the Script

The script is located at ~/.local/bin/quicksearch.sh. You can edit it to:

  • Add new search sites
  • Modify existing URLs
  • Change color schemes
  • Add custom behavior

Adding a New Site

  1. Edit ~/.local/bin/quicksearch.sh
  2. Add a new case in the switch statement:
search-yoursite)
    URL="https://yoursite.com/search?q=${QUERY}"
    SITE_NAME="${BLUE}Your Site${RESET}"
    ;;
  1. Create a symbolic link:
cd ~/.local/bin
ln -s quicksearch.sh search-yoursite

Color Customization

Colors are defined at the top of the script:

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
MAGENTA='\033[0;35m'
CYAN='\033[0;36m'
BOLD='\033[1m'
RESET='\033[0m'

πŸ”§ Troubleshooting

Command Not Found

Problem: bash: search-so: command not found

Solutions:

  1. Check if ~/.local/bin is in your PATH:

    echo $PATH | grep "$HOME/.local/bin"
  2. If not, add it to your shell config:

    # Bash
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc
    
    # Zsh
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc
  3. Verify the script exists:

    ls -la ~/.local/bin/quicksearch.sh

Browser Doesn't Open

Problem: Script runs but browser doesn't open

Solutions:

  1. Check if you have a default browser set

  2. Try setting BROWSER environment variable:

    export BROWSER=firefox  # or chrome, chromium, etc.
  3. Manually test browser opening:

    xdg-open "https://google.com"  # Linux
    open "https://google.com"      # macOS

Permission Denied

Problem: Permission denied when running script

Solution:

chmod +x ~/.local/bin/quicksearch.sh

Symbolic Links Not Working

Problem: Links point to wrong location

Solution:

cd ~/.local/bin
# Remove broken links
rm search-*
# Recreate with absolute path
for cmd in so sf su se gh gist mdn godocs rustdocs pydocs aws man docs \
           npm pypi nixpkgs archpkg fedorapkg archwiki gentoowiki debianwiki \
           nixwiki susewiki voiddocs voidwiki fedoradocs linuxwiki yt reddit \
           wiki chatgpt perplexity claude ddg; do
    ln -sf "$(pwd)/quicksearch.sh" "search-$cmd"
done

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-site
  3. Make your changes
  4. Test thoroughly
  5. Commit your changes: git commit -am 'Add search-newsite command'
  6. Push to the branch: git push origin feature/new-site
  7. Submit a pull request

Adding New Sites

When contributing new sites, please:

  • Follow the existing code style
  • Add appropriate colors for the site
  • Update the README with the new command
  • Test on both Linux and macOS if possible

Reporting Issues

Found a bug? Please open an issue with:

  • Your operating system (Linux distribution or macOS version)
  • Shell type and version (echo $SHELL, $SHELL --version)
  • Error message (if any)
  • Steps to reproduce

πŸ“ License

This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by the need for faster developer workflows
  • Thanks to all the open-source documentation sites
  • Built with ❀️ for the developer community

πŸ“Š Stats

  • 30+ supported sites
  • 0 dependencies
  • Works on Linux and macOS
  • Written in pure Bash

πŸ”— Links


Made with ❀️ by developers, for developers. Happy searching! πŸ”

About

πŸ” Lightning-fast CLI tool to search 30+ developer sites from your terminal - Stack Overflow, GitHub, docs, wikis, and more

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages