{"id":15010371,"url":"https://github.com/galuque/shai","last_synced_at":"2026-04-06T05:31:24.676Z","repository":{"id":220879621,"uuid":"752750485","full_name":"galuque/shai","owner":"galuque","description":"CLI interface to Google's Gemini Pro model to generate and execute sh commands","archived":false,"fork":false,"pushed_at":"2024-02-05T18:27:57.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T22:58:18.946Z","etag":null,"topics":["ai","babashka","clojure","gemini-pro","llm","shell"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/galuque.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-04T17:48:39.000Z","updated_at":"2024-04-09T00:47:14.000Z","dependencies_parsed_at":"2024-10-12T10:20:48.672Z","dependency_job_id":"ff830155-7e4b-4ff9-8223-71ed84f71ab0","html_url":"https://github.com/galuque/shai","commit_stats":null,"previous_names":["galuque/shai"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/galuque/shai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fshai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fshai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fshai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fshai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galuque","download_url":"https://codeload.github.com/galuque/shai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fshai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ai","babashka","clojure","gemini-pro","llm","shell"],"created_at":"2024-09-24T19:33:44.495Z","updated_at":"2026-04-06T05:31:24.661Z","avatar_url":"https://github.com/galuque.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SHAI\n\nCommand line tool that uses Google's Gemini Pro model with [Google AI Studio's](https://ai.google.dev/docs) rest API to generate a shell\ncommand from a natural language description of a task.\n\nhttps://github.com/galuque/shai/assets/7518032/da50640a-a020-4aef-bb83-276c80eaa993\n\n## Warning\n\nThis tools is just a toy project, and always remember to be careful when running commands generated by an AI model. Never run commands that you don't understand. \n\nOnly you are responsible for the commands you run on your system.\n\n## Getting the CLI tool\n\n### Prerequisites\n\nYou need a an API key to use the Gemini API, you can get one by following the instructions [here](https://ai.google.dev/tutorials/rest_quickstart#set_up_your_api_key).\n\nThen you need to set the `GOOGLE_AI_STUDIO_API_KEY` environment variable to the value of your API key.\n\n```bash\nexport GOOGLE_AI_STUDIO_API_KEY=\u003cyour API key\u003e\n```\n\nor add the following line to your `~/.bashrc` or `~/.zshrc` file:\n\n```bash\necho \"export GOOGLE_AI_STUDIO_API_KEY=\u003cyour API key\u003e\" \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n```\n\n### Downloading the tool from GitHub\n\n```bash\ncurl -LO https://github.com/galuque/shai/releases/download/v0.1.29/shai-0.1.29-linux-static-amd64 \u003e shai\nchmod +x shai\n./shai \u003cquery\u003e\n\n# or move the file to a directory in your PATH to make it available from anywhere\nsudo mv shai /usr/local/bin\n```\n\n## Running the tool from source\n\nClone the repository and navigate to the project directory:\n\n```bash\ngit clone https://github.com/galuque/shai.git\ncd shai\n```\n\nAlso, you need to have the following installed:\n- [Clojure CLI](https://clojure.org/guides/getting_started)\n- [Babashka](https://babashka.org/) (Optional, for running the tool with babashka)\n- [GraalVM](https://www.graalvm.org/) (Optional, for building native executables with the `native-image` command)\n\n### Clojure\n\n```bash\nclojure -M -m shai.cli \u003cquery\u003e\n```\n\n### Babashka\n\nEnsure that you have the `bb` ([babashka](https://babashka.org/)) command line tool installed. Then run the following command:  \n\n```bash\nbb -m shai.cli \u003cquery\u003e\n```\n\n### Java JAR\n\nFirst build the JAR file with the following command:\n```bash\nclojure -T:build uber\n```\n\nThen run the JAR file with the following command:\n```bash\njava -jar target/shai.cli-*.jar \u003cquery\u003e\n```\n\n### Native Executable\n\nFirst build the native executable with the following command:\n```bash\nclojure -T:build uber \u0026\u0026 bash native.sh\n```\n\nThen run the native executable with the following command:\n```bash\n./target/shai \u003cquery\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaluque%2Fshai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaluque%2Fshai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaluque%2Fshai/lists"}