@chrishdx/n8n-nodes-gemini-cli
v1.0.0
Published
n8n Community Node for Gemini CLI as LangChain Chat Model
Maintainers
Readme
n8n-nodes-gemini-cli
This is an n8n community node that lets you use Gemini CLI (@google/gemini-cli) as a LangChain Chat Model.
Installation Nodes Authentication Usage Compatibility Resources
Installation
Follow the installation guide in the n8n community nodes documentation.
Gemini CLI is bundled via @google/gemini-cli. If you prefer, set Gemini CLI Source to Custom Path and point to the gemini binary or a dist/index.js file.
Nodes
- Gemini Auth (CLI): Google OAuth login flow (no API keys).
- Gemini Chat Model (CLI): LangChain Chat Model wrapper around Gemini CLI.
Authentication
This plugin is built for the OAuth login flow (no API keys).
- Add the Gemini Auth (CLI) node.
- Run Login Start to get a login URL and session ID.
- Run Login Complete (use the session ID) to start the localhost listener.
- Open the URL, complete the Google login, and allow the browser redirect to localhost. If localhost is not reachable, paste the full redirect URL or the code as a manual fallback.
- Use the Gemini Chat Model (CLI) node in your workflows.
If you need a custom location for Gemini CLI settings, set Gemini Home Directory in the credentials. OAuth tokens will be stored in <home>/.gemini/oauth_creds.json.
Docker hint: set Login Listener Host to 0.0.0.0, choose a fixed Login Port, and publish that port (e.g. -p 57418:57418). The redirect URL remains http://localhost:PORT/oauth2callback.
Usage
- Use Gemini Chat Model (CLI) inside AI chains and agents.
- Optional features: custom instructions, stateless vs stateful conversations, and streaming.
- Image inputs:
image_urlmessage parts (e.g. passthrough binary images) are written to<workingDirectory>/.gemini-attachmentsand referenced automatically. - Binary attachments: pass files as binary input and set Binary Property Names (e.g.
data).
Compatibility
Compatible with [email protected] or later.
