Gemini CLI
Gemini CLI signed in with Google talks to Gemini Code Assist. Point it at the proxy’s google-code-assist
path and add your Milgram API key as a custom header. Your Google sign-in keeps working and is forwarded
upstream.
Add these lines to ~/.gemini/.env. Gemini CLI loads only the first of a project’s .gemini/.env or
.env, else ~/.gemini/.env, and only in folders you trust: merge the same lines into a project’s own
file if it has one, and trust the folder.
CODE_ASSIST_ENDPOINT=https://api.milgram.dev/v1/proxy/google-code-assistGEMINI_CLI_CUSTOM_HEADERS="x-milgram-api-key: mlg_YOUR_KEY"Export the same values in the shell that launches gemini. They last as long as that shell.
export CODE_ASSIST_ENDPOINT=https://api.milgram.dev/v1/proxy/google-code-assistexport GEMINI_CLI_CUSTOM_HEADERS="x-milgram-api-key: mlg_YOUR_KEY"Check it
Section titled “Check it”Start gemini and send a prompt. The session appears in the console under Sessions.