quacking
v1.0.2
Published
A modern CLI for Gemini AI
Downloads
202
Maintainers
Readme
quack
quack is a simple TypeScript‑based command‑line application that uses Google's Gemini generative AI models to perform a quick, terminal‑friendly search. It wraps the official @google/genai SDK and provides a few convenience options for configuration and output formatting.
🦆 "Gemini powered terminal search" — that's the tagline for
quack.
Features
- Save and reuse a Gemini API key via a local configuration store using
conf. - Query Gemini from the terminal and get short, human‑readable answers.
- Optional
--longflag for longer responses (configurable in code). - Download size is tiny and the interface is intentionally minimal.
Installation
# clone the repository (or install from npm once published)
git clone https://github.com/yourusername/quack.git
cd quack
# install dependencies
npm install
# build the project (typescript -> javascript)
npm run build # you may want to add a build script pointing to tsc
# link globally so you can run `quack` from anywhere
npm link⚠️ The package currently targets Node 18+ and uses ES modules (
"type": "module").
Alternatively, if published to the npm registry, simply:
npm install -g quackUsage
Usage: quack [options] [query...]
Gemini powered terminal search.
Options:
-V, --version output the version number
-l, --long Get long answer.
-s, --see See current api key.
-c, --config <key> configure gemini apikey
-h, --help display help for commandExamples
Save your API key:
quack -c YOUR_GEMINI_KEY_HERECheck the saved key (it will be printed in blue):
quack --seePerform a search:
quack what is the capital of FranceAsk for a longer answer:
quack -l tell me in detail about the lifecycle of a butterflyIf no query is provided, quack prints the help text.
Development
This project is written in TypeScript.
# run the TypeScript file directly
npx ts-node src/app.ts <your query>
# compile to dist/
npm run buildConfiguration is handled with conf, which stores data in a platform‑appropriate location (under %APPDATA% on Windows).
Publishing
To publish to npm, ensure the package.json fields like name, version, description, author, and keywords are filled out, then run:
npm publishContributing
Contributions are welcome! Please open issues or pull requests on the GitHub repository.
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes
- Open a pull request
License
This project is licensed under the ISC License – see the LICENSE file for details.
💡 Feel free to adapt the code, add more options, or support additional Gemini parameters.
Happy quacking! 🦆
