https://github.com/simonmysun/ell Skip to content Navigation Menu Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + GitHub Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions By size + Enterprise + Teams + Startups By industry + Healthcare + Financial services + Manufacturing By use case + CI/CD & Automation + DevOps + DevSecOps * Resources Topics + AI + DevOps + Security + Software Development Explore + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Enterprise + Enterprise platform AI-powered developer platform Available add-ons + Advanced Security Enterprise-grade security features + GitHub Copilot Enterprise-grade AI features + Premium Support Enterprise-grade 24/7 support * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} simonmysun / ell Public * Notifications You must be signed in to change notification settings * Fork 6 * Star 183 A command-line interface for LLMs written in Bash. License MIT license 183 stars 6 forks Branches Tags Activity Star Notifications You must be signed in to change notification settings * Code * Issues 11 * Pull requests 0 * Actions * Projects 0 * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Projects * Security * Insights simonmysun/ell This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main BranchesTags Go to file Code Folders and files Name Name Last commit message Last commit date Latest commit History 93 Commits docs docs helpers helpers llm_backends llm_backends plugins plugins templates templates LICENSE LICENSE README.md README.md ell ell ell.sh ell.sh View all files Repository files navigation * README * MIT license ell A command-line interface for LLMs written in Bash. Features basic.webm Basic usage of ell * Ask LLMs from your terminal * Pipe friendly * Bring your terminal context to the LLMs and ask questions * Chat with LLMs in your terminal * Function calling and more supported via templates. Requirements To use ell, you need the following: * bash * jq (For parsing JSON) * curl (For sending HTTPS requests) * perl (For PCRE. POSIX bash doesn't support look-ahead and look-behind regex. Not necessary if you don't use record mode) Install git clone --depth 1 https://github.com/simonmysun/ell.git ~/.ellrc.d echo 'export PATH="${HOME}/.ellrc.d:${PATH}"' >> ~/.bashrc or git clone --depth 1 git@github.com:simonmysun/ell.git ~/.ellrc.d echo 'export PATH="${HOME}/.ellrc.d:${PATH}"' >> ~/.bashrc This will clone the repository into .ellrc.d in your home directory and add it to your PATH. Configuration See Configuration. Here's an example configuration to use gemini-1.5-flash from Google. You need to set these variables in your ~/.ellrc: ELL_API_STYLE=gemini ELL_LLM_MODEL=gemini-1.5-flash ELL_TEMPLATE=default-gemini ELL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ELL_API_URL=https://generativelanguage.googleapis.com/v1beta/models/ Here's an example configuration to use gpt-4o-mini from OpenAI. ELL_API_STYLE=openai ELL_LLM_MODEL=gpt-4o-mini ELL_TEMPLATE=default-openai ELL_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ELL_API_URL=https://api.openai.com/v1/chat/completions Usage examples Make sure you have configured correctly. Ask a question: ell "What is the capital of France?" Specify a model and use a file as input: ell -m gpt-4o -f user_prompt.txt Record terminal input and output and use as context: ell -r # do random stuff ell What does the error code mean? ell How to fix it? Run in interactive mode: ell -i If you were in record mode via ell -r, the context of the shell will be used. The two modes can be combined: ell -r -i. Specify a template and start in record mode and interactive mode: ell -r -i -t ctf-gemini or ell -r -i -t ctf-openai depends on which API you are using. ctf.webm Example application Writing Templates See Templates. Note that the use of the plugin support of LLM providers in ell is made with templates. Styling See Styling. Plugins See Plugins. The term "Plugin" here means a script that can be called by ell. It can be used to extend ell's functionality. The plugins supported by LLM providers is not included here. Please refer to Templates. Risks to consider See Risks Consideration. FAQ * Q: Why is it called "ell"? * A: "ell" is a combination of shell and LLM. It is a shell script to use LLM backends. "shellm" was once considered, but it was dropped because it could be misunderstood as "she llm". "ell" is shorter, easy to type and easy to remember. It does not conflict with any active software. Note that the name "shell" of shell scripts is because it is the outer layer of the operating system exposed to the user. It doesn't indicate that it is a CLI or GUI. Unfortunately it cannot be shortened to "L" which has the same pronunciation because that would conflict with too many things. * Q: Why is it written in Bash? * A: Because Bash is the most common shell on Unix-like systems and there is just no need to use a more complex language for this. * Q: What is the difference between ell and other similar projects? * A: ell is written in almost pure Bash, which makes it very lightweight and easy to install. It is also very easy to extend and modify. It is pipe-friendly, which means it is designed to be used in combination with other tools. Similar Projects * https://github.com/kardolus/chatgpt-cli - A CLI for ChatGPT written in Go. * https://github.com/kharvd/gpt-cli A CLI for various LLM backends written in Python. * https://github.com/JohannLai/gptcli A CLI for OpenAI LLMs written in TypeScript. * https://github.com/x-cmd/x-cmd A huge collection of various tools which includes a CLI for LLM APIs. The project is written in POSIX bash and awk. * https://github.com/llimllib/gpt-bash-cli A CLI for OpenAI API that saves the requests and responses into a database. It also uses the system keyring to store the API key, which is a lot more secure. This project is also written in bash. * https://github.com/charmbracelet/mods A CLI tool to talk to LLMs written in Go. It has rich features in conversation management. * https://github.com/hiquest/nicechat A CLI chat interface for OpenAI models, written in Node.js. * https://github.com/closedloop-technologies/autocomplete-sh A CLI for LLM which uses completion to interact with users. It also acquires several history operations to provide better suggestions, also written in bash. * https://github.com/plandex-ai/plandex A CLI tool to develop AI-integrated workflow, written in Go. * https://github.com/simonw/llm A CLI tool for in-depth manipulation of LLMs, written in Python. Contributing Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request. License This project is licensed under the MIT License. See the LICENSE file for more details. About A command-line interface for LLMs written in Bash. Topics gpt llm Resources Readme License MIT license Activity Stars 183 stars Watchers 1 watching Forks 6 forks Report repository Releases 2 v0.1.1 Latest Aug 2, 2024 + 1 release Languages * Shell 98.2% * Perl 1.8% Footer (c) 2024 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.