{"id":13408142,"url":"https://github.com/reugn/gemini-cli","last_synced_at":"2025-08-20T01:31:53.708Z","repository":{"id":222995580,"uuid":"758916618","full_name":"reugn/gemini-cli","owner":"reugn","description":"A command-line interface (CLI) for Google Gemini","archived":false,"fork":false,"pushed_at":"2024-09-11T19:28:01.000Z","size":44,"stargazers_count":58,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-12T05:36:01.852Z","etag":null,"topics":["aichat","chatai","cli","cli-app","command-line","commandline","gemini","gemini-client","google-ai","google-gemini","terminal"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/reugn/gemini-cli","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reugn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-17T13:07:59.000Z","updated_at":"2024-09-11T19:28:01.000Z","dependencies_parsed_at":"2024-04-06T12:31:36.554Z","dependency_job_id":"0f3cacef-ab92-4193-a90c-94d9d4e7f881","html_url":"https://github.com/reugn/gemini-cli","commit_stats":null,"previous_names":["reugn/gemini-cli"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reugn%2Fgemini-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reugn%2Fgemini-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reugn%2Fgemini-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reugn%2Fgemini-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reugn","download_url":"https://codeload.github.com/reugn/gemini-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230382858,"owners_count":18216854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aichat","chatai","cli","cli-app","command-line","commandline","gemini","gemini-client","google-ai","google-gemini","terminal"],"created_at":"2024-07-30T20:00:51.020Z","updated_at":"2025-08-20T01:31:53.692Z","avatar_url":"https://github.com/reugn.png","language":"Go","funding_links":[],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT","Go"],"sub_categories":[],"readme":"# gemini-cli\n[![Build](https://github.com/reugn/gemini-cli/actions/workflows/build.yml/badge.svg)](https://github.com/reugn/gemini-cli/actions/workflows/build.yml)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/reugn/gemini-cli)](https://pkg.go.dev/github.com/reugn/gemini-cli)\n[![Go Report Card](https://goreportcard.com/badge/github.com/reugn/gemini-cli)](https://goreportcard.com/report/github.com/reugn/gemini-cli)\n\nA command-line interface (CLI) for [Google Gemini](https://deepmind.google/technologies/gemini/).\n\nGoogle Gemini is a family of multimodal artificial intelligence (AI) large language models that have\ncapabilities in language, audio, code and video understanding.\n\nThis application offers a command-line interface for interacting with various generative models through\nmulti-turn chat. Model selection is controlled via [system command](#system-commands) inputs.\n\n## Installation\nChoose a binary from [releases](https://github.com/reugn/gemini-cli/releases).\n\n### Build from Source\nDownload and [install Go](https://golang.org/doc/install).\n\nInstall the application:\n```sh\ngo install github.com/reugn/gemini-cli/cmd/gemini@latest\n```\n\nSee the [go install](https://go.dev/ref/mod#go-install) instructions for more information about the command.\n\n## Usage\n\u003e [!NOTE]\n\u003e For information on the available regions for the Gemini API and Google AI Studio,\n\u003e see [here](https://ai.google.dev/available_regions#available_regions).\n\n### API key\nTo use `gemini-cli`, you'll need an API key set in the `GEMINI_API_KEY` environment variable.\nIf you don't already have one, create a key in [Google AI Studio](https://makersuite.google.com/app/apikey).\n\nSet the environment variable in the terminal:\n```sh\nexport GEMINI_API_KEY=\u003cyour_api_key\u003e\n```\n\n### System commands\nThe system chat message must begin with an exclamation mark and is used for internal operations.\nA short list of supported system commands:\n\n| Command | Description                                                    |\n|---------|----------------------------------------------------------------|\n| !p      | Select the generative model system prompt \u003csup\u003e1\u003c/sup\u003e         |\n| !m      | Select from a list of generative model operations \u003csup\u003e2\u003c/sup\u003e |\n| !h      | Select from a list of chat history operations \u003csup\u003e3\u003c/sup\u003e     |\n| !i      | Toggle the input mode (single-line \u003c-\u003e multi-line)             |\n| !q      | Exit the application                                           |\n| !help   | Show system command instructions                               |\n\n\u003csup\u003e1\u003c/sup\u003e System instruction (also known as \"system prompt\") is a more forceful prompt to the model.\nThe model will follow instructions more closely than with a standard prompt.\nThe user must specify system instructions in the [configuration file](#configuration-file).\nNote that not all generative models support them.\n\n\u003csup\u003e2\u003c/sup\u003e Model operations:\n* Select a generative model from the list of available models\n* Show the selected model information\n\n\u003csup\u003e3\u003c/sup\u003e History operations:\n* Clear the chat history\n* Store the chat history to the configuration file\n* Load a chat history record from the configuration file\n* Delete all history records from the configuration file\n\n### Configuration file\nThe application uses a configuration file to store generative model settings and chat history. This file is optional.\nIf it doesn't exist, the application will attempt to create it using default values. You can use the\n[config flag](#cli-help) to specify the location of the configuration file.\n\nAn example of basic configuration:\n```json\n{\n  \"SystemPrompts\": {\n    \"Software Engineer\": \"You are an experienced software engineer.\",\n    \"Technical Writer\": \"Act as a tech writer. I will provide you with the basic steps of an app functionality, and you will come up with an engaging article on how to do those steps.\"\n  },\n  \"SafetySettings\": [\n    {\n      \"Category\": 7,\n      \"Threshold\": 1\n    },\n    {\n      \"Category\": 10,\n      \"Threshold\": 1\n    }\n  ],\n  \"History\": {\n  }\n}\n```\nUpon user request, the `History` map will be populated with records. Note that the chat history is stored in plain\ntext format. See [history operations](#system-commands) for details.\n\n### CLI help\n```console\n$ ./gemini -h\nGemini CLI Tool\n\nUsage:\n   [flags]\n\nFlags:\n  -c, --config string   path to configuration file in JSON format (default \"gemini_cli_config.json\")\n  -h, --help            help for this command\n  -m, --model string    generative model name (default \"gemini-2.5-flash\")\n      --multiline       read input as a multi-line string\n  -s, --style string    markdown format style (ascii, dark, light, pink, notty, dracula) (default \"auto\")\n  -t, --term string     multi-line input terminator (default \"$\")\n  -v, --version         version for this command\n  -w, --wrap int        line length for response word wrapping (default 80)\n```\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freugn%2Fgemini-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freugn%2Fgemini-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freugn%2Fgemini-cli/lists"}