{"id":43409649,"url":"https://github.com/matthewdeanmartin/paipi","last_synced_at":"2026-02-02T16:31:38.385Z","repository":{"id":318568326,"uuid":"1053094112","full_name":"matthewdeanmartin/paipi","owner":"matthewdeanmartin","description":"Pypi search, except the backend is an LLM's pixelated memory of Pypi.","archived":false,"fork":false,"pushed_at":"2026-01-26T19:51:21.000Z","size":630,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-27T07:16:04.390Z","etag":null,"topics":["code-generation","llm-search","pypi","python-packaging"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewdeanmartin.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":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T01:36:29.000Z","updated_at":"2026-01-13T23:49:34.000Z","dependencies_parsed_at":"2025-10-08T00:26:41.755Z","dependency_job_id":"c07e90a6-5136-44a1-95a0-c45d483e4b57","html_url":"https://github.com/matthewdeanmartin/paipi","commit_stats":null,"previous_names":["matthewdeanmartin/paipi"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matthewdeanmartin/paipi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fpaipi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fpaipi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fpaipi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fpaipi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewdeanmartin","download_url":"https://codeload.github.com/matthewdeanmartin/paipi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewdeanmartin%2Fpaipi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29015148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T16:17:30.374Z","status":"ssl_error","status_checked_at":"2026-02-02T15:58:50.469Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["code-generation","llm-search","pypi","python-packaging"],"created_at":"2026-02-02T16:31:37.244Z","updated_at":"2026-02-02T16:31:38.379Z","avatar_url":"https://github.com/matthewdeanmartin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PAIPI - AI-Powered PyPI Search\n\nPyPI search, except the backend is an LLM's pixelated memory of PyPI.\n\nA FastAPI server that provides PyPI-shaped search results powered by AI instead of a traditional database. The server\nqueries OpenRouter's AI service via an OpenAI-compatible interface to generate realistic Python package search results.\n\nThe query can be the same as what you use with pypi or conversational.\n\nThe UI shows real packages in blue, hallucinated ones are red. Information for real packages are fetched from pypi.\nTo hallucinate a README.md, click through to the detail click the generate. Once you have a readme, you can generate\nand download a package.\n\nUseful logging on disk as well.\n\n- pypi_cache - packages and sqlite database with real an imagined library info\n- logs - raw conversation\n\nThis is not exactly RAG. The LLM doesn't search Pypi and tell you the results, the LLM knows a lot of python packages\nand can guess if they're relevant. Ordinary code checks if packages are real or not and real packages are displayed\nwith real information.\n\n## Core Features\n\n- Search for real packages in an LLMs memory\n- Hallucinated packages you seem to want to exist and then imagine what their README.md would be\n- Generate a package for downloading based on a generated README.md\n\n## Technical Features\n- FastAPI-based REST API with automatic OpenAPI documentation\n- PyPI-compatible search response format\n- AI-powered package search using OpenRouter\n- Type hints throughout the codebase\n- Configurable via environment variables\n\n## Security\n- Don't run this on the open web\n- Package generation is inside a docker container\n\n## Installation\n\nTo install and run web server\n\n```bash\nuv sync\nuv run paipi\n```\n\nTo install and run UI\n\n```bash\ncd paipi-app\nnpm install\nng serve -o\n```\n\nTo generate packages, docker desktop will need to be running.\n\n## Configuration\n\nCopy `.env.example` to `.env` and configure your settings:\n\n```bash\ncp .env.example .env\n```\n\nRequired environment variables:\n\n- `OPENROUTER_API_KEY`: Your OpenRouter API key\n\nOptional environment variables:\n\n- `OPENROUTER_BASE_URL`: OpenRouter API base URL (default: https://openrouter.ai/api/v1)\n- `OPENROUTER_MODEL`: AI model to use (default: anthropic/claude-3.5-sonnet)\n- `HOST`: Server host (default: 0.0.0.0)\n- `PORT`: Server port (default: 8000)\n- `DEBUG`: Enable debug mode (default: false)\n- `OPENAI_API_KEY`: This is used for package generation using openinterpreter (running inside docer)\n\n## Usage\n\n### Running the server\n\n```bash\n# Using the CLI command\npaipi\n\n# Or directly with Python\npython -m paipi.main\n\n# Or with uvicorn\nuvicorn paipi.main:app --host 0.0.0.0 --port 8000\n```\n\n### API Endpoints\n\n- `GET /` - Root endpoint with basic information\n- `GET /health` - Health check endpoint\n- `GET /search?q=\u003cquery\u003e` - Search for Python packages\n- `GET /docs` - Interactive API documentation\n- `GET /redoc` - Alternative API documentation\n- `GET /search?q=\u003cquery\u003e` - Search for packages\n- `POST /readme` - Generate README.md\n- `POST /generate_package` - Generate package ZIP\n- `GET /cache/stats` - Get cache statistics\n- `DELETE /cache/clear` - Clear cache\n- `GET /docs` - Interactive API documentation\n- `GET /health` - Health check\n\n### Search Example\n\n```bash\ncurl \"http://localhost:8000/search?q=web+framework\u0026size=5\"\n```\n\nResponse format matches PyPI search API:\n\n```json\n{\n  \"info\": {\n    \"query\": \"web framework\",\n    \"count\": 5\n  },\n  \"results\": [\n    {\n      \"name\": \"fastapi\",\n      \"version\": \"0.104.1\",\n      \"description\": \"FastAPI framework, high performance, easy to learn...\",\n      \"summary\": \"Modern, fast web framework for building APIs\",\n      \"author\": \"Sebastián Ramirez\",\n      \"home_page\": \"https://github.com/tiangolo/fastapi\",\n      \"package_url\": \"https://pypi.org/project/fastapi/\",\n      \"keywords\": \"web, api, framework, fastapi\",\n      \"license\": \"MIT\",\n      \"classifiers\": [\n        ...\n      ],\n      \"requires_python\": \"\u003e=3.7\"\n    }\n  ]\n}\n```\n\n## Development\n\nCheck for python problems:\n\n```bash\nmake check\n```\n\n## License\n\nMIT.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewdeanmartin%2Fpaipi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewdeanmartin%2Fpaipi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewdeanmartin%2Fpaipi/lists"}