Code Monkey home page Code Monkey logo

clag's Introduction

clag - Command Line AI Gem

Tired of trying to remember the exact flags to use or digging through documentation or googling to find how to do the thing you're trying to do?

Suffer no more! Simply describe what you're trying to do and generate the command with the help of an LLM!

Installation

  • Install the gem gem install clag

  • Generate commands clag g "create a new ruby on rails project using postgres and tailwindcss"

Using OpenAI's GPT-4

Using Google's Gemini 1.0

  • Get an API key from Google's AI Studio at https://ai.google.dev/

  • Set your API key as GEMINI_API_KEY in your environment

  • Select Gemini as your preferred LLM by setting CLAG_LLM=gemini in your environment

Using Anthropic's Claude 3 Opus

  • Get an API key from Anthropic at https://www.anthropic.com/

  • Set your API key as ANTHROPIC_API_KEY in your environment

  • Select Claude 3 Opus as your preferred LLM by setting CLAG_LLM=claude in your environment

Using Groq on Mixtral

  • Get an API key from https://console.groq.com/

  • Set your API key as GROQ_API_KEY in your environment

  • Select Groq as your preferred LLM by setting CLAG_LLM=groq in your environment

Using a Local Model

  • Have a model locally from either Ollama or Llamafile with an OpenAI compatible API

  • Have the API server running on port 8080

  • Select local as your preferred LLM by setting CLAG_LLM=local in your environment

Usage

Currently support one command: "g".

clag g "the command you'd like to generate"

Contributing

Bug reports and pull requests are welcome on Github at https://github.com/sublayerapp/clag

Community

Like what you see, or looking for more people working on the future of programming with LLMs? Come join us in the Promptable Architecture Discord

clag's People

Contributors

swerner avatar

Stargazers

Paweł Banach avatar Robert Pannick avatar Erik Minkel avatar Landon Gray avatar Serhii Ponomarov avatar Rogerio Marques avatar Piotr Brudny avatar alex [dot] kramer [at] g_m_a_i_l [dot] com avatar Valentino Stoll avatar Thomas Carr avatar Michael Deering avatar  avatar

Watchers

Michael Deering avatar  avatar

Forkers

b08x

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.