Giter Club home page Giter Club logo

clx's Introduction

clx

clx is a useful utility that generates CLI commands using AI models for common operational tasks. It's inspired by Shayan's clx and enhanced to support configurable models and multiple backends including Groq and OpenAI.

Install

Binary

Download the latest binary from Releases.

Go

go install github.com/mr-karan/clx@latest

Example Usage

➜ clx show disk usage of current directory
Showing disk usage of the current directory
$ du -sh .
➜ clx kill process on port 8000
Kill process running on port 8000.
$ lsof -t -i :8000 | xargs kill -9
➜ clx backup a directory
Backup a directory to a tarball archive
$ tar -czf backup.tar.gz /path/to/directory

Usage

➜ clx
NAME:
   clx - a CLI code generator

USAGE:
   clx [global options] command [command options]

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --model value, -m value    Model to use for generating responses (default: "gpt-4-turbo")
   --backend value            Backend service to use (openai, groq) (default: "openai")
   --timeout value, -t value  Timeout for API requests (default: 30s)
   --config value, -c value   Path to config file
   --help, -h                 show help

Configuration

clx can be configured using a config.toml file, which allows users to set default values for the backend service, model, and request timeout. Here’s an example of what the config.toml might look like:

backend = "groq" # Backend service (openai, groq)
model = "llama3-70b-8192" # Model to use
timeout = "30s" # Timeout for API requests

This file is read at runtime, and its settings are applied unless overridden by command-line flags. If the file does not exist, clx will create a default one using built-in settings. The file is located at $HOME/clx.toml.

clx's People

Contributors

mr-karan avatar icholy avatar

Stargazers

Andrew avatar Srinivas Anant avatar Amarnath Karthi avatar Syed Aman Ali avatar Rushal Verma avatar Ativerc avatar Sumit Tiware avatar Hariharan avatar Max Fröhlich avatar Ashwanth Kumar avatar Nikhil George avatar  avatar

Watchers

 avatar

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.