{"id":15432987,"url":"https://github.com/simonw/llm-clip","last_synced_at":"2025-10-26T20:08:30.315Z","repository":{"id":194184063,"uuid":"690409026","full_name":"simonw/llm-clip","owner":"simonw","description":"Generate embeddings for images and text using CLIP with LLM","archived":false,"fork":false,"pushed_at":"2024-04-15T07:58:51.000Z","size":10,"stargazers_count":64,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-19T09:12:19.987Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonw.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-09-12T06:27:17.000Z","updated_at":"2024-12-04T07:57:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"867f7a7f-4bdc-42f7-a460-364c9a482d4c","html_url":"https://github.com/simonw/llm-clip","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"f87311aca8e5e64884b8a57f8f18b4fb72b36ced"},"previous_names":["simonw/llm-clip"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-clip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-clip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-clip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fllm-clip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/llm-clip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248885337,"owners_count":21177623,"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-10-01T18:29:59.410Z","updated_at":"2025-10-26T20:08:30.226Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# llm-clip\n\n[![PyPI](https://img.shields.io/pypi/v/llm-clip.svg)](https://pypi.org/project/llm-clip/)\n[![Changelog](https://img.shields.io/github/v/release/simonw/llm-clip?include_prereleases\u0026label=changelog)](https://github.com/simonw/llm-clip/releases)\n[![Tests](https://github.com/simonw/llm-clip/workflows/Test/badge.svg)](https://github.com/simonw/llm-clip/actions?query=workflow%3ATest)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/llm-clip/blob/main/LICENSE)\n\n[LLM](https://llm.datasette.io/) plugin for embedding images and text using [CLIP](https://openai.com/research/clip)\n\n## Installation\n\nInstall this plugin in the same environment as LLM.\n```bash\nllm install llm-clip\n```\n\n## Usage\n\nOnce you have installed an embedding model you can use it to embed text like this:\n\n```bash\nllm embed -m clip -c 'Hello world'\n```\nOr an image like this:\n```bash\nllm embed -m clip --binary -i IMG_4801.jpeg\n```\n\nEmbeddings are more useful if you store them in a database - see [the LLM documentation](https://llm.datasette.io/en/stable/embeddings/cli.html#storing-embeddings-in-sqlite) for details.\n\nTo embed every photograph in a folder and save them in a collection called \"photos\":\n\n```bash\nllm embed-multi photos -m clip --binary --files photos/ '*.jpg'\n```\nYou can then search for photos of specific things like this:\n```bash\nllm similar photos -c 'bunny'\n```\n\n## Development\n\nTo set up this plugin locally, first checkout the code. Then create a new virtual environment:\n```bash\ncd llm-clip\npython3 -m venv venv\nsource venv/bin/activate\n```\nNow install the dependencies and test dependencies:\n```bash\npip install -e '.[test]'\n```\nTo run the tests:\n```bash\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fllm-clip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fllm-clip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fllm-clip/lists"}