{"id":14985544,"url":"https://github.com/ingydotnet/yamllm","last_synced_at":"2025-10-19T11:32:06.857Z","repository":{"id":245299011,"uuid":"815911024","full_name":"yaml/yamllm","owner":"yaml","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-11T01:29:59.000Z","size":46,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-04T04:01:46.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yaml.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-06-16T14:00:03.000Z","updated_at":"2024-11-23T16:24:24.000Z","dependencies_parsed_at":"2024-07-07T22:28:42.084Z","dependency_job_id":"012abb2e-d77b-4b10-ab96-f3ac6ade6962","html_url":"https://github.com/yaml/yamllm","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":"0.038461538461538436","last_synced_commit":"533426cc07a60366e310f66f73140eb57562c5a4"},"previous_names":["yaml/yamllm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamllm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamllm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamllm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yaml%2Fyamllm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yaml","download_url":"https://codeload.github.com/yaml/yamllm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237117268,"owners_count":19258379,"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":[],"created_at":"2024-09-24T14:11:10.704Z","updated_at":"2025-10-19T11:32:06.842Z","avatar_url":"https://github.com/yaml.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"yamllm\n======\n\nA YAMLScript tool to query LLMs\n\n\n## Synopsis\n\n```\n$ yamllm 'Why pink?'\nQ: Why pink?\nllama3-8b-8192:\nThe question of pink!\n\nThe color pink has a long and complex history, and its associations and\nmeanings have evolved over time. Here are some possible reasons why pink might\nbe associated with certain qualities or themes:\n...\n$\n```\n\n\n## Overview\n\nThis is a project to play with various LLMs from the command line.\n\nAt the moment it works with [Groq](https://console.groq.com/) which you can use\nfor free with generous limits.\nIt's also pretty fast.\n\nIt also works with [OpenAI's API](https://platform.openai.com/docs/overview),\nwhich you have to pay for but costs pennies for single user interactive usage.\n\nThe tool is written in YAMLScript and requires a recent `ys`.\n\nYou can install it here (in `$PWD/bin/`) with `make install-ys`.\n\n\n## Installation\n\n* Get a Groq API key [here](https://console.groq.com/keys).\n* Or get an OpenAI API key [here](https://platform.openai.com/api-keys).\n* Or get an Anthropic API key [here](\n  https://console.anthropic.com/settings/keys).\n\nRun these commands:\n```\nexport YAMLLM_GROQ_API_KEY=\u003cyour-groq-api-key\u003e\n# or\nexport YAMLLM_OPENAI_API_KEY=\u003cyour-openai-api-key\u003e\n# or\nexport YAMLLM_ANTHROPIC_API_KEY=\u003cyour-anthropic-api-key\u003e\n\ngit clone https://github.com/yaml/yamllm\nsource .rc          # Adds `$PWD/bin` to your PATH (for bash or zsh)\n\nyamllm --help       # Ask it for some help\nyamllm 'Why pink?'  # Get to the important stuff\n```\n\n\n### Optional\n\nThese programs make it nicer to use but are not required:\n\n* Install `rlwrap` for readline support and query history.\n* Install `prettier` for 80 column output reformatting.\n  ```\n  npm install -g prettier\n  ```\n\n\n### Try in a Browser with Github Codespaces\n\nUse the [Codespace Quickstart Link](\nhttps://codespaces.new/yaml/yamllm?quickstart=1) to try out yamllm in a browser\nenvironment.\n\n\n## CLI Usage\n\nTo start a query loop:\n```\n$ yamllm\n```\n\nUse `ctl-d`, `exit` or `q` to exit.\n\nTo run a single query:\n```\n$ yamllm 'Tell me a story'\n```\n\n\n## Environment Variables\n\nTo use these variables, be sure to `export` them after setting them.\nOne of the first 2 here is required.\n\n* `YAMLLM_GROQ_API_KEY=\u003cgroq-api-key\u003e`\n\n  Required to access the Groq API (free).\n  Get one [here](https://console.groq.com/keys).\n\n* `YAMLLM_OPENAI_API_KEY=\u003copen-api-key\u003e`\n\n  Required to access the OpenAI API (not free, but not expensive).\n  Get one [here](https://platform.openai.com/api-keys).\n\n* `YAMLLM_MODEL=\u003cmodel-id\u003e`\n\n  Choose one of the Groq or OpenAI models:\n\n  ```\n  * llama3    (llama3-70b-8192      Meta)\n  * llama38b  (llama3-8b-8192       Meta)\n  * gemma     (gemma-7b-it          Google)\n  * gemma2    (gemma2-9b-it         Google)\n  * mixtral   (mixtral-8x7b-32768   Mistral)\n  * whisper   (whisper-large-v3     OpenAI)\n  * gpt4o-    (gpt-4o-mini          OpenAI)\n  * gpt4o     (gpt-4o               OpenAI)\n  * gpt4t     (gpt-4-turbo          OpenAI)\n  * gpt4      (gpt-4                OpenAI)\n  * gpt3      (gpt-3.5-turbo        OpenAI)\n  * dalle2    (dall-e-2             OpenAI)\n  * dalle3    (dall-e-3             OpenAI)\n  ```\n\n  Default is `llama3` if `YAMLLM_GROQ_API_KEY` is set, `gpt4o-` if\n  `YAMLLM_OPENAI_API_KEY` is set else error.\n\n* `YAMLLM_LOG_DIR=\u003cdirectory-path\u003e`\n\n  A directory to store query results.\n  Directory can be relative or absolute but must exist.\n\n* `YAMLLM_PRE=\u003cfile\u003e`\n\n  File containing text to prepend to every prompt sent to API.\n\n* `YAMLLM_POST=\u003cfile\u003e`\n\n  File containing text to append to every prompt sent to API.\n\n* `YAMLLM_PROMPT=\u003cfile\u003e`\n\n  File containing the prompt text to send to API.\n  `YAMLLM_PRE` and `YAMLLM_POST` are added if specified.\n\n* `YAMLLM_IMAGE_SIZE=\u003csize-indicator\u003e`\n\n  One of `1024x1024`, `1024x1792` or `1792x1024`.\n\n* `YAMLLM_TEMP=\u003cnumber 0.0 - 2.0\u003e`\n\n  Higher is more random.\n  Lower is more deterministic.\n  Default is 0.8.\n\n* `YAMLLM_TOPP=\u003cnumber 0.0 - 1.0\u003e`\n\n  Alternative way to do something like `YAMLLM_TEMP`.\n  Default is 1.0.\n\n* `YAMLLM_TEST_FILE=$PWD/test/test1/yaml`\n\n  Set this to run the YAML interaction test suite.\n\n* `YAMLLM_DEBUG=1`\n\n  Dump API payloads.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingydotnet%2Fyamllm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fingydotnet%2Fyamllm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingydotnet%2Fyamllm/lists"}