Show HN: Simple wrapper for Chrome's built-in local LLM (Gemini Nano)
- Enforces sessions even for basic usage
- Requires user-triggered downloads
- Lacks type safety or structured error handling
So I open-sourced a small TypeScript wrapper I originally built for other projects to smooth over the rough edges:
github: https://github.com/kstonekuan/simple-chromium-ai
npm: https://www.npmjs.com/package/simple-chromium-ai
- Stateless prompt() method inspired by Anthropic's SDK
- Built-in error handling and Result-based .Safe.* variants with neverthrow
- Token usage checks
- Simple initialization that provides a helper to trigger downloads (must be triggered by user action)
It’s intentionally minimal for hacking and prototyping. If you need fine-grained control (e.g. streaming, memory control), use the native API directly:
https://developer.chrome.com/docs/ai/prompt-api
Would love to hear what people build with it or any feedback!
No comments yet