{"id":18111943,"url":"https://github.com/chr15m/aish","last_synced_at":"2025-04-14T03:43:19.035Z","repository":{"id":186979620,"uuid":"676072789","full_name":"chr15m/aish","owner":"chr15m","description":"Shell script one-liners right in your terminal prompt","archived":false,"fork":false,"pushed_at":"2025-01-07T10:54:22.000Z","size":175,"stargazers_count":29,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T17:47:00.257Z","etag":null,"topics":["ai","autocomplete","bash","one-liners","openai","shell","shell-script","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/chr15m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","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},"funding":{"github":"chr15m","patreon":"chr15m","open_collective":null,"ko_fi":"chr15m","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-08-08T11:22:17.000Z","updated_at":"2025-03-25T05:54:03.000Z","dependencies_parsed_at":"2024-01-07T21:02:13.828Z","dependency_job_id":"b376132d-7a08-4e1b-8975-16a9f37afea4","html_url":"https://github.com/chr15m/aish","commit_stats":null,"previous_names":["chr15m/aish"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr15m%2Faish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr15m%2Faish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr15m%2Faish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chr15m%2Faish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chr15m","download_url":"https://codeload.github.com/chr15m/aish/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819111,"owners_count":21166470,"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":["ai","autocomplete","bash","one-liners","openai","shell","shell-script","zsh"],"created_at":"2024-11-01T01:08:48.969Z","updated_at":"2025-04-14T03:43:19.017Z","avatar_url":"https://github.com/chr15m.png","language":"Shell","funding_links":["https://github.com/sponsors/chr15m","https://patreon.com/chr15m","https://ko-fi.com/chr15m"],"categories":["Plugins","\u003ca name=\"copilot\"\u003e\u003c/a\u003eCo-pilot"],"sub_categories":["ZSH on Windows"],"readme":"Instant shell script solutions from AI right in your prompt.\n\n\u003cp dir=\"auto\" align=\"center\" width=\"100%\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/chr15m/aish/main/screencast.svg\" alt=\"SVG screencast of aish in action\" style=\"max-width: 100%;\"\u003e\n\u003c/p\u003e\n\n`aish` is a single file shell script for getting one-liner solutions from AI right into your terminal where you need them.\nIt asks OpenAI for a one-liner solution to your problem, shows it to you, and inserts it into your history if you confirm.\nOnce it's in your history you can press \"up\" and then run or edit the one-liner as you like.\n\n## Install\n\n```bash\ncurl https://raw.githubusercontent.com/chr15m/aish/main/aish \u003e ~/bin/aish \u0026\u0026 chmod 755 ~/bin/aish\n```\n\nThen you can simply run `aish` to get started:\n\n```bash\n. aish show me which process is running on port 8000\n```\n\n**Note:** Make sure you set the environment variable `OPENAI_API_KEY` to [your OpenAI API key](https://platform.openai.com/account/api-keys).\nYou can add the key to `~/.aish` if it's not in your environment already.\n\nSee the [configure](#configure) section below for details on configuring model (**defaults to `gpt-3.5-turbo-0301`**), server URL, etc.\n\nBy default `aish` will detect your current shell and OS and ask the AI for solutions for that combination but this can be configured.\n\n**WARNING**: Always carefully check the output from the AI for bugs or other issues. Do not run the output unless you completely understand what it is doing. You are fully responsible for any commands you run. **This software comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.** Please see [LICENSE.txt](./LICENSE.txt) for more details.\n\n## Examples\n\nPrefix these queries with `. aish` in your terminal to try them out:\n\n- which process is running on port 8000\n- numeric for loop boilerplate going from 5 to 15\n- restart openssh\n- start a simple webserver using python3\n- rename every file in ./images from .jpg to .png\n- resize all of images in ./images to a maximum of 100 pixels in any dimension\n- create a small webserver with netcat\n- get the ips that amazon.com resolves to and ping each one\n- list all network interfaces and their ip addresses\n- print out the source of function __git_ps1\n- delete all unused docker images\n- concatenate two .mkv video files\n- use ffmpeg to shrink an mp4 file's size\n- use imagemagick change the white background in screenshot.png to transparent\n\n## Configure\n\nYou can create a file `~/.aish` that will be sourced by the script.\nYou can use this to override the defaults sent to the AI.\n\nHere are some examples of configuration variables you can set:\n\n```bash\n# Set or override the OpenAI API key\nOPENAI_API_KEY=...your key...\n# Override the ChatGPT model to use\nAISH_MODEL=\"gpt-3.5-turbo-0301\" # the default model but `gpt-4` is recommended.\n# Override the shell the AI will create solutions for\n# (default is to autodetect whatever shell you are in)\nAISH_SHELL=\"zsh\"\n# Override the OS the AI will create solutions for\n# (default is to autodetect the OS you are using)\nAISH_OS=\"Mac OSX\"\n# Use a different OpenAI API compatible server (e.g. locally hosted)\nAISH_URL=https://localhost:8000/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr15m%2Faish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchr15m%2Faish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchr15m%2Faish/lists"}