https://github.com/shilangyu/scoop-search
Fast `scoop search` drop-in replacement 🚀
https://github.com/shilangyu/scoop-search
fast-search hacktoberfest scoop scoop-search slow-search
Last synced: 24 days ago
JSON representation
Fast `scoop search` drop-in replacement 🚀
- Host: GitHub
- URL: https://github.com/shilangyu/scoop-search
- Owner: shilangyu
- License: mit
- Created: 2020-07-24T13:58:48.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-22T12:06:37.000Z (about 2 months ago)
- Last Synced: 2025-04-22T13:26:27.291Z (about 2 months ago)
- Topics: fast-search, hacktoberfest, scoop, scoop-search, slow-search
- Language: Zig
- Homepage:
- Size: 1.5 MB
- Stars: 328
- Watchers: 7
- Forks: 11
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# scoop-search
[](https://github.com/shilangyu/scoop-search/actions)
Fast `scoop search` drop-in replacement 🚀
## Installation
```sh
scoop install scoop-search
```## PowerShell hook
Instead of using `scoop-search.exe ` you can create a hook that will run `scoop-search.exe` whenever you use native `scoop search`
Add this to your Powershell profile (usually located at `$PROFILE`)
```ps1
Invoke-Expression (&scoop-search --hook)
```## CMD.exe wrapper
If you use `cmd.exe` you can use a wrapper script to do the same. Name this `scoop.cmd` and add it to
a directory in your `%PATH%````
@echo offif "%1" == "search" (
call :search_subroutine %*
) else (
powershell scoop.ps1 %*
)
goto :eof:search_subroutine
set "args=%*"
set "newargs=%args:* =%"
scoop-search.exe %newargs%
goto :eof
```## Features
Behaves just like `scoop search` and returns identical output. If any differences are found please open an issue.
**Non-goal**: any additional features unavailable in scoop search
## Building
This project uses Zig. Building and running works on all platforms, not only Windows.
Build with (output is stored in `./zig-out/bin`):
```sh
zig build -Doptimize=ReleaseFast
```Run debug with:
```sh
zig build run -- searchterm
```## Benchmarks
Done with [hyperfine](https://github.com/sharkdp/hyperfine). `scoop-search` is on average 350 times faster.
```sh
❯ hyperfine --warmup 1 'scoop-search google' 'scoop search google'
Benchmark 1: scoop-search google
Time (mean ± σ): 60.3 ms ± 3.5 ms [User: 91.2 ms, System: 394.2 ms]
Range (min … max): 55.1 ms … 73.8 ms 49 runsBenchmark 2: scoop search google
Time (mean ± σ): 21.275 s ± 2.657 s [User: 9.604 s, System: 11.789 s]
Range (min … max): 19.143 s … 27.035 s 10 runsSummary
scoop-search google ran
352.74 ± 48.49 times faster than scoop search google
```_ran on AMD Ryzen 5 3600 @ 3.6GHz_