cligle
cligle is a small Python command-line search program. It sends requests in
this shape to SerpAPI:
https://serpapi.com/search.html?engine=google&start=[NUM]&q=[QUERY]&api_key=[API_KEY]
Setup
-
Add your API key securely with:
cligle -setThe key is entered twice with hidden input and saved to
~/.cligle/api_key.txt. Running the command again replaces the saved key. -
If you need to use a different SerpApi endpoint, set it with
CLIGLE_SEARCH_URL:export CLIGLE_SEARCH_URL="https://your-provider.example/search"
The packaged CLI stores the key at ~/.cligle/api_key.txt. You can use a
different location with --key-file. The project's local api_key.txt is
also supported for development and is ignored by Git.
No third-party Python packages are required.
Usage
cligle "python argparse tutorial"
After installing the package, the same command is available from anywhere:
python3 -m pip install cligle
cligle "python argparse tutorial"
The exact short form also works:
cligle query
Multiple words do not need quotes:
cligle python argparse tutorial
Open a specific results page with -p or --page:
cligle "python argparse tutorial" --page 2
cligle "python argparse tutorial" -p 3
Page numbers start at 1. If no page is specified, page 1 is requested.
SerpApi uses a zero-based result offset internally, so page 1 sends
start=0, page 2 sends start=10, page 3 sends start=20, and so on.
Useful options:
cligle -set --key-file /path/to/api_key.txt
cligle "latest Python news" --engine google
cligle "latest Python news" --page 2
cligle "latest Python news" --key-file /path/to/api_key.txt
cligle "latest Python news" --json
Save results to a chosen directory:
cligle "latest Python news" -o ./results
Long form:
cligle "latest Python news" --output ./results
If -o or --output is used without a directory, the text file is saved in
your home folder:
cligle "latest Python news" -o
cligle "latest Python news" --output
The output filename is based on the query, such as latest_Python_news.txt.
Existing files are preserved by adding a number to the next filename.
The formatter recognizes common organic_results, results, items, and
answer_box response fields. The --json option is available when the API
returns a response shape that needs custom handling.
Metadata
Release files for cligle 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cligle-1.0.3.tar.gz | 18.3 kB | Without provenance | Details for cligle-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cligle-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for cligle-1.0.3-py3-none-any.whl |
Total release size: 37.3 kB
Release files / cligle-1.0.3.tar.gz
| Download URL | cligle-1.0.3.tar.gz |
|---|---|
| Size | 18.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6899d4172cf190f7507b1c8763ea913e55798a8061406136b79ba1b225f55637
|
|
BLAKE2b-256 checksum How to use checksums |
54e71fdda8d5fff180be67d16f486440c3b9eff2858255c06455a9a56d1d5231
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / cligle-1.0.3-py3-none-any.whl
| Download URL | cligle-1.0.3-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5aa23aa193d6ffc31de4538a18ed88981f757a1f9602edf92204dc0295b2ef78
|
|
BLAKE2b-256 checksum How to use checksums |
00b95247028cde07e62666f63a5a8646cf961e44848d31849725e2206999dabc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for cligle 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.