service query engine
curl -L https://github.com/sbyware/svq/releases/download/latest/svq-windows-x64.exe -o ~/.svq.exe && curl -L https://raw.githubusercontent.com/sbyware/svq/main/db.json -o ~/.svq
curl -L https://github.com/sbyware/svq/releases/download/latest/svq-windows-arm64.exe -o svq.exe && curl -L https://raw.githubusercontent.com/sbyware/svq/main/db.json -o ~/.svq
curl -L https://github.com/sbyware/svq/releases/download/latest/svq-linux-x64 -o ~/.local/bin/svq && curl -L https://raw.githubusercontent.com/sbyware/svq/main/db.json -o ~/.svq
curl -L https://github.com/sbyware/svq/releases/download/latest/svq-linux-arm64 -o ~/.local/bin/svq && curl -L https://raw.githubusercontent.com/sbyware/svq/main/db.json -o ~/.svq
curl -L https://github.com/sbyware/svq/releases/download/latest/svq-macos-x64 -o ~/.local/bin/svq && curl -L https://raw.githubusercontent.com/sbyware/svq/main/db.json -o ~/.svq
curl -L https://github.com/sbyware/svq/releases/download/latest/svq-macos-arm64 -o ~/.local/bin/svq && curl -L https://raw.githubusercontent.com/sbyware/svq/main/db.json -o ~/.svq
The .svq
file (copied to ~/.svq) contains the list of services and their respective ports. The file is a JSON array with the following structure:
[
{
"name": "http",
"port": 80
},
{
"name": "https",
"port": 443
}
]
The -select
flag allows you to filter the output of svq
by a specific field. The flag takes a string as an argument and will filter the output based on the value of the field.
svq -p 80,443 -select port
svq -p 80,443 -select name
You can use jq
to filter the output of svq
when using the -j
flag.
svq -j -p 80,443 | jq '.[] | select(.name == "http")'
svq -j -m "http" | jq -r '.[].port'
svq -j -p 443 | jq -r '.[].description' | head -n 1
## License
MIT