CLI Installation
The Code Search CLI provides powerful command-line access to search, replace, and manage repositories.
Installation Methods
Section titled “Installation Methods”Homebrew (Recommended)
Section titled “Homebrew (Recommended)”bash brew install aanogueira/tap/code-searchDirect Download
Section titled “Direct Download”bash # Apple Silicon (M1/M2/M3) curl -Lhttps://github.com/techquestsdev/code-search/releases/latest/download/code-search-darwin-arm64-o code-search # Intel curl -Lhttps://github.com/techquestsdev/code-search/releases/latest/download/code-search-darwin-amd64-o code-search chmod +x code-search sudo mv code-search /usr/local/bin/Direct Download
Section titled “Direct Download”bash # x86_64 curl -Lhttps://github.com/techquestsdev/code-search/releases/latest/download/code-search-linux-amd64-o code-search # ARM64 curl -Lhttps://github.com/techquestsdev/code-search/releases/latest/download/code-search-linux-arm64-o code-search chmod +x code-search sudo mv code-search /usr/local/bin/Install Script
Section titled “Install Script”bash curl -sSL https://code-search.techquests.dev/install.sh | bashPowerShell
Section titled “PowerShell”"<https://github.com/techquestsdev/code-search/releases/latest/download/code-search-windows-amd64.exe>"-OutFile "code-search.exe" # Move to PATH Move-Item code-search.exeC:\Windows\System32\<https://github.com/aanogueira/scoop-bucket> scoop install code-searchRun from Docker
Section titled “Run from Docker”docker run --rm -it
ghcr.io/techquestsdev/code-search-cli:latest --helpCreate an alias
Section titled “Create an alias”~/.code-search:/root/.code-search ghcr.io/techquestsdev/code-search-cli:latest'From Source
Section titled “From Source”go install github.com/techquestsdev/code-search/cmd/cli@latestThis installs to
$GOPATH/bin/cli. You may want to rename it:
mv $GOPATH/bin/cli$GOPATH/bin/code-searchVerify Installation
Section titled “Verify Installation”Check that the CLI is installed correctly:
code-search --version# code-search version 1.0.0
code-search --helpShell Completions
Section titled “Shell Completions”Enable command-line completions for your shell:
# Add to ~/.bashrcsource <(code-search completion bash)# Add to ~/.zshrcsource <(code-search completion zsh)
# Or generate to fpathcode-search completion zsh > "${fpath[1]}/_code-search"code-search completion fish | source
# Or save to completions directorycode-search completion fish > ~/.config/fish/completions/code-search.fishcode-search completion powershell | Out-String | Invoke-Expression
# Or add to profilecode-search completion powershell >> $PROFILENext Steps
Section titled “Next Steps”- CLI Configuration - Configure the CLI
- Search Commands - Learn to search with the CLI
- Replace Commands - Bulk replace operations