{"id":13652497,"url":"https://github.com/snwfdhmp/llm","last_synced_at":"2025-04-12T07:12:16.627Z","repository":{"id":173780444,"uuid":"651283056","full_name":"snwfdhmp/llm","owner":"snwfdhmp","description":"Use any LLM from the command line.","archived":false,"fork":false,"pushed_at":"2024-02-21T15:34:21.000Z","size":193,"stargazers_count":56,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-12T07:12:10.674Z","etag":null,"topics":["bing-chat","bing-chat-ai","chatgpt","cli-app","gpt-3","gpt-4","large-language-model","large-language-models","llama","llm","llms","wizardlm"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snwfdhmp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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,"publiccode":null,"codemeta":null},"funding":{"github":"snwfdhmp"}},"created_at":"2023-06-08T23:06:43.000Z","updated_at":"2025-03-27T06:45:08.000Z","dependencies_parsed_at":"2023-06-29T22:16:37.025Z","dependency_job_id":"fbeefd3a-e7a2-4076-af16-50e65ba9a137","html_url":"https://github.com/snwfdhmp/llm","commit_stats":{"total_commits":158,"total_committers":1,"mean_commits":158.0,"dds":0.0,"last_synced_commit":"b7cffb382a5c82ee41f59cc23b79005485aec734"},"previous_names":["snwfdhmp/llm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fllm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fllm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fllm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snwfdhmp%2Fllm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snwfdhmp","download_url":"https://codeload.github.com/snwfdhmp/llm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248530573,"owners_count":21119600,"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":["bing-chat","bing-chat-ai","chatgpt","cli-app","gpt-3","gpt-4","large-language-model","large-language-models","llama","llm","llms","wizardlm"],"created_at":"2024-08-02T02:00:59.851Z","updated_at":"2025-04-12T07:12:16.604Z","avatar_url":"https://github.com/snwfdhmp.png","language":"JavaScript","funding_links":["https://github.com/sponsors/snwfdhmp"],"categories":["AI Links Directories","JavaScript"],"sub_categories":[],"readme":"# llm: language models usage made easy\n\nManipulate any language model from the command line.\n\nFrom [simple to advanced usage](#features).\n\n```\n$ llm \"Hello world.\"\nHello there! How can I assist you today?\n```\n\nLeave a ⭐ star to support the project.\n\n## Models\n\n\u003e Some models are still being added. This is a work in progress.\n\n| Model Name                   | Status | Description                                     |\n|------------------------------|--------|-------------------------------------------------|\n| EVERY OpenAI model                | ✅      |                                         |\n| gpt-3.5-turbo                | ✅      | ChatGPT                                         |\n| gpt-4                    | ✅      | GPT-4 via API ([waitlist](https://openai.com/waitlist/gpt-4-api))                     |\n| text-davinci-003             | ✅      | InstructGPT (GPT-3)                             |\n| llama2                    | ✅      | Meta's Llama 2          |\n| bing-chat                    | ✅      | Bing Chat: creative, balanced, precise          |\n| bert                         | ✅      | BERT by Google                                  |\n| llama-7b-hf                  | ✅      | Famous llama model                                |\n| wizardlm-13b-uncensored      | ✅      | WizardLM 30B                                    |\n| guanaco-65b-gptq             | ✅      | Guanaco 65B                                     |\n| bard                         | 🔄      | Google Bard                                     |\n| ... HuggingFace 🤗 models        | ✅      | every [text-generation](https://huggingface.co/models?pipeline_tag=text-generation\u0026sort=downloads) model |\n\n[Other models can be installed](#add-any-model) using the `--install` command.\n\n## Features\n\n| Feature                 | Status          |Comment          |\n|-------------------------|-----------------|---|\n| Prompt                  | ✅              |Prompt model with default parameters|\n| Parameterization | ✅              |_temperature, max-length, top-p, top-k, ..._|\n| ChatGPT Plugins                 | 🔄 | Use chatGPT plugins. web-pilot working, global plugin system in development|\n| Use files    | ✅              |Query models using prompt files|\n| Prompt chaining         | ✅              |Call prompts like functions|\n| Prompt templating       | 🔄  |Use variables in prompt files |\n\n## Getting started\n\n```\ngit clone https://github.com/snwfdhmp/llm \u0026\u0026 cd llm\nyarn install\n```\n\nmake an alias `llm` \n\n```\nalias llm=\"node $(pwd)/main.js\"\n```\n\n\u003e add it to your `.bashrc` or `.zshrc` to make it permanent.\n\n**You're ready to go ! Try:**\n\n```\n$ llm \"Hello world\"\n$ llm -m bing-creative \"Tell me a joke\"\n$ llm -m gpt-3.5-turbo \"Tell me a joke\"\n```\n\n## Usage\n\n\u003e Simple prompting with defaults parameters\n\n```\n$ llm \"what is the meaning of life?\"\n```\n\n\u003e Use a specific model\n\n```\n$ llm -m bing-creative \"find project ideas to learn react\"\n```\n\n\u003e Use custom parameters\n\n```\n$ llm --max-length 512 --temperature 1 --top-p 0.9 --top-k 60 \"follow the instructions.\"\n```\n\n\u003e List available models\n\n```\n$ llm ls\nName                LastUsedAt     Author      Description\ntext-davinci-003    2021-10-10     OpenAI      InstructGPT by OpenAI\ngpt-3.5-turbo       2021-10-10     OpenAI      ChatGPT by OpenAI\ngpt-4-web           2021-10-10     OpenAI      GPT-4 by OpenAI via chatGPT\nllama               2021-10-10     Meta        Meta's Llama\nbard                2021-10-10     Google      Google Bard\n...\n```\n\n\u003e Use files as prompts\n\n```\n$ llm -f ./prompt.txt\n```\n\nIncoming:\n\n- Conversation system (remember past messages)\n- Install 3rd party models\n- Chaining\n\n```\n$ llm -s session_name \"what is the meaning of life?\"\nremembers past messages\n$ llm --install github.com/snwfhdmp/llm-descriptor-llama\ndownloads model from github\n```\n\n## Add any model\n\nAny model can be plugged into `llm` using a model descriptor.\n\n**Example of a model descriptor which requires installation**\n\n```yaml\nkind: llm/descriptor/v1\nmetadata:\n    name: llama\nmodel:\n    install: |\n        git clone ...\n        cd ...\n        ./install.sh\n        # or\n        docker pull ...\n        # or\n        none\n    usage:\n        ./model-executor -f model.bin $LLM_PARAM_PROMPT\n    parameters:\n        LLM_PARAM_PROMPT:\n            type: string\n            description: The prompt to use\n            default: \"Hello world\"\n        LLM_PARAM_MAX_TOKENS:\n            type: int\n            description: The maximum length of context\n            default: 100\n        LLM_PARAM_TEMPERATURE:\n            type: float\n            description: The temperature of the model\n            default: 0.7\n```\n\n**Example of a model descriptor which uses an API**\n\n```yaml\nkind: llm/descriptor/v1\nmetadata:\n    name: llama\nmodel:\n    install: |\n        read -p \"Enter your API key:\" LLM_API_KEY\n        echo \"LLM_API_KEY=$LLM_API_KEY\" \u003e\u003e ~/.bashrc\n    usage: curl -s $LLM_PARAM_API_TARGET_URL -d \"prompt=$LLM_PARAM_PROMPT\u0026api_key=$LLM_API_KEY\"\n    parameters:\n        LLM_PARAM_API_TARGET_URL:\n            type: string\n            description: The URL of the API\n            default: \"https://api.llm.com\"\n        LLM_PARAM_PROMPT:\n            type: string\n            description: The prompt to use\n            default: \"Hello world\"\n        LLM_PARAM_MAX_TOKENS:\n            type: int\n            description: The maximum length of context\n            default: 100\n        LLM_PARAM_TEMPERATURE:\n            type: float\n            description: The temperature of the model\n            default: 0.7\n```\n\n## Env variables\n\nThese variables can be used to tweak `llm` behavior.\n\n- `LLM_DEFAULT_MODEL` - The default model to use when no model is specified\n- `LLM_ENABLED_PLUGINS` - A comma-separated list of plugins to enable\n- `OPENAI_ORGANIZATION_ID` - The organization ID to use for OpenAI models\n\n## Roadmap\n\nProject vision and information can be found in [docs](docs/).\n\n## Contributing\n\nContribute easily by leaving a ⭐ star to the project.\n\nCode contributions are welcome. Please open an issue or a pull request.\n\nJoin the team at [discord.gg/ccDghPeAT9](https://discord.gg/ccDghPeAT9).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnwfdhmp%2Fllm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnwfdhmp%2Fllm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnwfdhmp%2Fllm/lists"}