{"id":13993012,"url":"https://github.com/nomeata/loogle","last_synced_at":"2025-04-27T22:45:41.676Z","repository":{"id":189404755,"uuid":"680453196","full_name":"nomeata/loogle","owner":"nomeata","description":"Mathlib search tool","archived":false,"fork":false,"pushed_at":"2025-04-13T14:13:47.000Z","size":305,"stargazers_count":85,"open_issues_count":15,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-25T15:07:53.406Z","etag":null,"topics":["lean","lean4"],"latest_commit_sha":null,"homepage":"https://loogle.lean-lang.org/","language":"Lean","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/nomeata.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}},"created_at":"2023-08-19T09:38:12.000Z","updated_at":"2025-04-14T10:41:47.000Z","dependencies_parsed_at":"2023-08-19T21:46:45.714Z","dependency_job_id":"6ab4a90e-06b5-405a-8a4d-3b6c59349fa8","html_url":"https://github.com/nomeata/loogle","commit_stats":null,"previous_names":["nomeata/loogle"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomeata%2Floogle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomeata%2Floogle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomeata%2Floogle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nomeata%2Floogle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nomeata","download_url":"https://codeload.github.com/nomeata/loogle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250840634,"owners_count":21495909,"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":["lean","lean4"],"created_at":"2024-08-09T14:02:12.191Z","updated_at":"2025-04-25T15:07:58.249Z","avatar_url":"https://github.com/nomeata.png","language":"Lean","funding_links":[],"categories":["Lean"],"sub_categories":[],"readme":"loogle\n======\n\nLoogle is a search tool for [Lean]/[Mathlib], and can be used on the web, via a\nzulip bot, via APIs, from VSCode or nvim extensions as a Lean command or a command line tool.\n\nTry it at \u003chttps://loogle.lean-lang.org/\u003e!\n\n\n    $ loogle '(List.replicate (_ + _) _ = _)'\n    Found 5 declarations mentioning List.replicate, HAdd.hAdd and Eq.\n    Of these, 3 match your patterns.\n\n    List.replicate_add\n    List.replicate_succ\n    List.replicate_succ'\n\n[lean]: https://leanprover.github.io/\n[mathlib]: https://github.com/leanprover-community/mathlib4\n\nRunning locally\n---------------\n\nTo use `loogle` locally:\n\n1. check out this repository\n2. install [elan](https://github.com/leanprover/elan)\n3. run `lake exe cache get`\n4. run `lake exe loogle --help` (or other options)\n\nIf you use `loogle` on a large repository like Mathlib, the startup-time will\nbe rather large. Run `lake build LoogleMathlibCache` if you want to pre-compute\nthe index for Mathlib.\n\n[elan]: https://github.com/leanprover/elan\n\nCLI Usage\n---------\n\n    USAGE:\n      loogle [OPTIONS] [QUERY]\n\n    OPTIONS:\n      --help\n      --interactive, -i     read querys from stdin\n      --json, -j            print result in JSON format\n      --module mod          import this module (default: Mathlib)\n      --path path           search for .olean files here (default: the build time path)\n      --write-index file    persists the search index to a file\n      --read-index file     read the search index from a file. This file is blindly trusted!\n\nBy default, it will create an internal index upon starting,  which takes a bit.\nYou can use `--write-index` and `--read-index` to cache that, but it is your\nresponsibility to pass the right index for the given module and search path. In\nthe nix setup, the index is built as part of the build process.\n\nWeb service\n-----------\n\nThis tool is the backend of \u003chttps://loogle.lean-lang.org/\u003e. This is currently\nrunning on a virtual host with a nixos system with a ngingx reverse proxy (for\nSSL) in front of a small python HTTP server (see `./server.py`) that uses\n`loogle`. The query processing is locked down using SECCOMP (see\n`./loogle_seccomp.c`). It automatically tries to upgrade to the latest\nmathlib every 6 hours.\n\nYou can run this server locally as well, either using `./server.py` after you\nbuilt `loogle` via `lake`.\n\nAt the path `/json?q=…` (instead of `/?q=…`), the result is returned in JSON\nformat. No stability of the format is guaranteed at this point.\n\nZulip bot\n---------\n\nThe [leanprover Zulip chat](https://leanprover.zulipchat.com/) has a bot called\n`loogle` that will respond to messages with the first two hits from loogle.\nJust write `@**loogle** query` in a public stream.\n\nIt is implemented via an outgoing webhook to the above web service.\n\nEditor integration\n------------------\n\nThese are created by their respective maintainers; reach out to them if you have questions\n\n* [VS Code extension “Loogle Lean”](https://marketplace.visualstudio.com/items?itemName=ShreyasSrinivas.loogle-lean)\n* [`lean.nvim`](https://github.com/Julian/lean.nvim#features) has built-in support for loogle.\n\nContact\n-------\n\nThis tool was created by Joachim Breitner \u003c\u003cmail@joachim-breitner.de\u003e\u003e. Feel free\nto use this repository to report issues or (even better) submit PRs that\nresolves such issues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomeata%2Floogle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnomeata%2Floogle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnomeata%2Floogle/lists"}