{"id":18837974,"url":"https://github.com/nextjournal/tafuta","last_synced_at":"2026-01-28T08:30:13.774Z","repository":{"id":103034672,"uuid":"355150420","full_name":"nextjournal/tafuta","owner":"nextjournal","description":"Searching git repositories made easy.","archived":false,"fork":false,"pushed_at":"2021-04-28T13:14:03.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-16T15:06:22.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextjournal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-04-06T10:37:51.000Z","updated_at":"2021-10-10T23:22:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7b42914-3108-4ae7-a109-58ec067f9b4a","html_url":"https://github.com/nextjournal/tafuta","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/nextjournal%2Ftafuta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Ftafuta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Ftafuta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextjournal%2Ftafuta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextjournal","download_url":"https://codeload.github.com/nextjournal/tafuta/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774338,"owners_count":19694700,"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-08T02:37:20.882Z","updated_at":"2026-01-28T08:30:13.738Z","avatar_url":"https://github.com/nextjournal.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tafuta\n\n**This is pre-alpha quality. Don't use it.**\n\n* Tafuta - _Search_ in Swahili\n\nA small clojure library for searching code, files and directories inside\na git repository. For the the pattern search of files the library shells out to\n[ag](https://github.com/ggreer/the_silver_searcher) or\n[ripgrep](https://github.com/BurntSushi/ripgrep) and leverages the speed of those tools.\nThe results are returned as Clojure data.\n\nThe API exposes two functions. In the following `directory` should always be the root of\nsome git repository.\n\n`(search pattern directory)` - where `pattern` is some pattern you want to look for across tracked\ngit files.\n\n```clj\n(require '[nextjournal.tafuta :as tafuta])\n\n(tafuta/search \"foo\" \".\")\n=\u003e ({:line-number 26,\n     :occurences [[22 3]],\n     :line \"              :line \\\" foo bar\\\",\",\n     :file \"test/nextjournal/tafuta_tests.clj\"}\n    {:line-number 30,\n     :occurences [[22 3] [25 3]],\n     :line \"              :line \\\" foofoo barbar\\\",\",\n     :file \"test/nextjournal/tafuta_tests.clj\"}\n    {:line-number 33,\n     :occurences [[32 3] [53 3] [56 3]],\n     :line\n     \"            \\\":yarn.lock\\\\n1;1 2: foo bar\\\\n2;1 2,5 12: foofoo barbar\\\")))))\",\n     :file \"test/nextjournal/tafuta_tests.clj\"}\n    {:line-number 12,\n     :occurences [[16 3]],\n     :line \"(tafuta/search \\\"foo\\\" \\\".\\\")\",\n     :file \"README.md\"})\n```\n\n`(search-file pattern directory)` - where `pattern` matches the files one is interested in fuzzily.\n\n```clj\n(search-file \"clj\")\n=\u003e ({:path \"src/nextjournal/tafuta.clj\"}\n    {:path \"test/nextjournal/tafuta_tests.clj\"})\n```\n\n## Requirements\n\nFor the library to work you need to have one of [ag](https://github.com/ggreer/the_silver_searcher) or\n[ripgrep](https://github.com/BurntSushi/ripgrep) installed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextjournal%2Ftafuta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextjournal%2Ftafuta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextjournal%2Ftafuta/lists"}