{"id":49458278,"url":"https://github.com/ogrodev/pi-thoth","last_synced_at":"2026-04-30T08:04:05.761Z","repository":{"id":342176752,"uuid":"1172061361","full_name":"ogrodev/pi-thoth","owner":"ogrodev","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-05T03:29:24.000Z","size":541,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T08:43:38.385Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/ogrodev.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-03T22:48:32.000Z","updated_at":"2026-03-05T03:29:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ogrodev/pi-thoth","commit_stats":null,"previous_names":["ogrodev/pi-thoth"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ogrodev/pi-thoth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodev%2Fpi-thoth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodev%2Fpi-thoth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodev%2Fpi-thoth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodev%2Fpi-thoth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ogrodev","download_url":"https://codeload.github.com/ogrodev/pi-thoth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ogrodev%2Fpi-thoth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32458241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-04-30T08:03:59.981Z","updated_at":"2026-04-30T08:04:05.756Z","avatar_url":"https://github.com/ogrodev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://i.imgur.com/5EJK9OF.png\" alt=\"th0th\" style=\"visibility: visible; max-width: 60%; display: block; margin: 0 auto;\" /\u003e\n\n# pi-thoth\n\n**Semantic search, persistent memory, and context compression for AI assistants**\n\nSingle-process MCP server. No separate API server. No Docker required.\n\n---\n\n## Quick Start\n\n```bash\n# 1. Per-project setup — run inside your project directory\ncd /path/to/my-project\nbunx pi-thoth-config init\n\n# 2. Add to your editor MCP config\n#    \"mcpServers\": { \"th0th\": { \"command\": [\"bunx\", \"pi-thoth\"] } }\n```\n\nThe server reads `.th0th/config.json` from the directory it is started in.\nEach project keeps its own databases under `.th0th/data/` (gitignored automatically).\n---\n\n## Editor Integration\n\n### Oh My Pi\n\n```json\n{\n  \"mcpServers\": {\n    \"th0th\": {\n      \"command\": [\"bunx\", \"pi-thoth\"],\n      \"enabled\": true\n    }\n  }\n}\n```\n\n### Any MCP-compatible editor\n\n```json\n{\n  \"mcpServers\": {\n    \"th0th\": {\n      \"command\": [\"bunx\", \"pi-thoth\"]\n    }\n  }\n}\n```\n\n---\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `th0th_index` | Index a project directory for semantic search |\n| `th0th_index_status` | Check status of a background indexing job |\n| `th0th_search` | Hybrid vector + keyword search with RRF ranking |\n| `th0th_remember` | Store information in persistent memory (SQLite) |\n| `th0th_recall` | Search stored memories from previous sessions |\n| `th0th_compress` | Compress context (keeps structure, removes details) |\n| `th0th_optimized_context` | Search + memory + compress in one call |\n| `th0th_analytics` | Usage patterns and cache performance metrics |\n\n---\n\n## Configuration\n\npi-thoth uses **per-project** configuration. Run `init` once in each project:\n\n```bash\nbunx pi-thoth-config init                        # Ollama (local, default)\nbunx pi-thoth-config init --mistral your-key     # Mistral\nbunx pi-thoth-config init --openai your-key      # OpenAI\nbunx pi-thoth-config show                        # Print active config\nbunx pi-thoth-config set embedding.model bge-m3:latest\nbunx pi-thoth-config use ollama --model bge-m3:latest\n```\n\nConfig file: `.th0th/config.json` (project root, gitignored)\nData dir:    `.th0th/data/` (SQLite databases, gitignored)\n\nTo create a **global template** used as default for new projects:\n\n```bash\nbunx pi-thoth-config init --global  # writes ~/.config/th0th/config.json\n```\n\n### Embedding providers\n\n| Provider | Model | Cost | Quality |\n|----------|-------|------|---------|\n| **Ollama** (default) | nomic-embed-text | Free | Good |\n| **Mistral** | mistral-embed | Paid | Great |\n| **OpenAI** | text-embedding-3-small | Paid | Great |\n\n---\n\n## From Source\n\n```bash\ngit clone \u003crepo-url\u003e\ncd th0th\nbun install\n./scripts/setup-local-first.sh   # Ollama + model + config\nbun run build\n```\n\n---\n\n## Architecture\n\n```\nEditor/agent (stdio)\n       |\n  apps/pi-thoth          Single-process MCP server + CLI\n       |\n  packages/core          Search, memory, compression, embeddings\n       |\n  packages/shared        Config, types, utilities\n       |\n  \u003cproject\u003e/.th0th/      Per-project config + SQLite databases\n        data/*.db        (gitignored, created by `pi-thoth-config init`)\n```\n\n| Component | Description |\n|-----------|-------------|\n| **Semantic Search** | Hybrid vector + keyword with RRF ranking |\n| **Embeddings** | Ollama (local) or Mistral/OpenAI API |\n| **Compression** | Rule-based code structure extraction (70-98% reduction) |\n| **Memory** | Persistent SQLite storage across sessions |\n| **Cache** | Multi-level L1/L2 with TTL |\n\n---\n\n## Scripts\n\n| Command | Description |\n|---------|-------------|\n| `bun run build` | Build all packages |\n| `bun run dev:mcp` | Run pi-thoth with hot reload |\n| `bun run start` | Start pi-thoth MCP server |\n| `bun run test` | Run tests |\n| `bun run type-check` | Type checking |\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogrodev%2Fpi-thoth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogrodev%2Fpi-thoth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogrodev%2Fpi-thoth/lists"}