Skip to main content

LFG, It Really Whips the Llama's Ass 🦙🦙🦙🦙

Project description

LFG

LFG, It Really Whips the Llama's Ass 🦙🦙🦙🦙

Demo

LFG is a command-line tool that intelligently helps you find the right terminal commands for your tasks. Such sales pitch.

Why?

Testing the llama3 model. Initially it was made using ollama locally, but changed to use groq due to not needing to have the llama3 model downloaded.

Installation

# install pipx
brew install pipx

# add pipx binaries to path
pipx ensurepath

# restart your terminal
# install LFG
pipx install lfg-llama

Usage

This executable is using Groq, that means you need and API token.

Groq is free beta, for now.

Add the token to your .bashrc/.zshrc and reload your terminal.

export GROQ_API_KEY=1337
$ lfg [-h] [-m {llama38b,llama370b,mixtral8x7b,gemma7b}] query

Now you can use the executable

lfg "kill port 3000"

# Kill process listening on port 3000
lsof -i :3000 | xargs kill

Change the LLM

$ lfg "list ec2 pipe json jq get name" -m llama370b

# List EC2 instances with name

aws ec2 describe-instances --query 'Reservations[].Instances[]|{Name:Tags[?Key==`Name`]|[0].Value,I
nstanceId}' --output text | jq '.[] | {"Name", .Name, "InstanceId", .InstanceId}'

This command uses the AWS CLI to describe EC2 instances, and then pipes the output to `jq` to format the output in a JSON-like format, showing the instance name and ID.

Development

pip install --user pipenv
pipenv --python 3.11
pipenv install

TODO

  • Fix the setup and pyproject file, including github workflow for releasing the package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lfg_llama-1.3.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lfg_llama-1.3.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file lfg_llama-1.3.0.tar.gz.

File metadata

  • Download URL: lfg_llama-1.3.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for lfg_llama-1.3.0.tar.gz
Algorithm Hash digest
SHA256 83ec73b67bb4e25f4924690bbfda1075f522ec28126961525373b0407c5f5eb9
MD5 e411d5152613a9a578fecc82ec438569
BLAKE2b-256 8f72ab4d6967cfa3919aaa88916a26f648ebe5dad989e2b110d86044983ad186

See more details on using hashes here.

File details

Details for the file lfg_llama-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: lfg_llama-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for lfg_llama-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 084ca2031909531952cb1fe3358d989ca176454e21e7d7a11d3eb7487eaf3ee0
MD5 0b4535d3d633cf936224dc2a77cd7b59
BLAKE2b-256 a5dbcf7fc0e5eeddefbe79338d128b41033bcde4a52aa8cfe18934f47a5a5b9c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page