An interactive command-line chat client powered by the Google Gemini API. Stream responses in real time from your terminal.
Built for the Code With Gemini hackathon.
┌──────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Terminal UI │────▶│ gemini-client │────▶│ Gemini API │
│ (index.ts) │◀────│ (gemini-client) │◀────│ (GenerativeAI) │
└──────────────┘ └──────────────────┘ └─────────────────┘
│ │
▼ ▼
┌──────────────┐ ┌──────────────────┐
│ readline │ │ config.ts │
│ (stdio) │ │ (env + defaults)│
└──────────────┘ └──────────────────┘
- Node.js 18+
- A Google AI Studio API key (get one here)
npm installSet your Gemini API key:
export GEMINI_API_KEY="your-api-key-here"Build and run:
npm run build
npm startDevelopment mode (watch + auto-rebuild):
npm run devThe client opens an interactive chat loop. Type your message and press Enter to receive a streamed response from Gemini. Type exit or quit to end the session.
.
├── src/
│ ├── index.ts # Entry point, interactive chat loop
│ ├── gemini-client.ts # Gemini API wrapper (streaming)
│ └── config.ts # Environment configuration
├── tests/ # Test suite (≥5 passing tests)
├── docs/
│ ├── demo.md # Demo script / walkthrough
│ └── submission.md # Devpost submission writeup
├── HACKATHON.md # Hackathon requirements reference
├── package.json
└── README.md
- TypeScript — type-safe runtime
- @google/generative-ai — Google Gemini API SDK
- Node.js — server-side JavaScript runtime
MIT