{"id":18462701,"url":"https://github.com/extism/func-gen","last_synced_at":"2025-04-15T19:54:19.932Z","repository":{"id":161166980,"uuid":"633514449","full_name":"extism/func-gen","owner":"extism","description":"Generate unix text processing utilities from LLMs","archived":false,"fork":false,"pushed_at":"2023-05-04T03:27:15.000Z","size":394,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-15T19:54:13.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/extism.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-04-27T17:03:36.000Z","updated_at":"2024-11-22T00:44:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5e38a69-31fc-48eb-b1ae-394177b2827f","html_url":"https://github.com/extism/func-gen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extism%2Ffunc-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extism%2Ffunc-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extism%2Ffunc-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/extism%2Ffunc-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/extism","download_url":"https://codeload.github.com/extism/func-gen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249145296,"owners_count":21219966,"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-11-06T09:04:08.468Z","updated_at":"2025-04-15T19:54:19.927Z","avatar_url":"https://github.com/extism.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# func-gen\n\nfunc-gen can be used to generate unix text processing utilities from English text.\nIt uses [langchain](https://python.langchain.com/en/latest/index.html) to create javascript functions\nto process text, and it uses [Extism](https://extism.org/) and the [JavaScript PDK](https://extism.org/docs/write-a-plugin/js-pdk)\nto safely execute the code in a Wasm sandbox.\n\n\u003e **Warning**: This only works for very small, simple functions. We have yet to learn about all the tools and techniques to build a reliable code generation model. We'd love some help making the model better and incorporating things like teaching the model documentation for people's Extism plug-in systems.\n\n## Demo Video\n\n[https://www.loom.com/share/d956147a1a7d449391ec0778ebe12918](https://www.loom.com/share/d956147a1a7d449391ec0778ebe12918)\n\n## Install\n\n\u003e **Note**: First you need to [install Extism](https://extism.org/docs/install) on your machine if you have not:\n\n```bash\npip install --upgrade extism-func-gen\n```\n\n## Run\n\n```bash\n# Need to set the OpenAI API key\nexport OPENAI_API_KEY=\"sk-\u003cpaste-key-here\u003e\"\n\n# Create a func\nfunc-gen count_vowels -d \"Write a function that counts the number of vowels in an input string\"\n\n# Use a func\necho \"hello world\" | func-gen count_vowels\n# 3\n\n\n# List the funcs\nfunc-gen --list\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextism%2Ffunc-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fextism%2Ffunc-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fextism%2Ffunc-gen/lists"}