{"id":17946484,"url":"https://github.com/darkceptor44/lookfor","last_synced_at":"2025-08-16T01:32:21.394Z","repository":{"id":259750395,"uuid":"879368356","full_name":"DarkCeptor44/lookfor","owner":"DarkCeptor44","description":"Cross-Platform file finder","archived":false,"fork":false,"pushed_at":"2024-10-27T18:21:49.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-27T20:04:38.704Z","etag":null,"topics":["cli","rust","rust-lang","search"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/lookfor","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DarkCeptor44.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":"2024-10-27T18:09:00.000Z","updated_at":"2024-10-27T18:21:52.000Z","dependencies_parsed_at":"2024-10-27T20:04:43.267Z","dependency_job_id":"466b0f82-13fb-4ffc-8791-33d95e49e63a","html_url":"https://github.com/DarkCeptor44/lookfor","commit_stats":null,"previous_names":["darkceptor44/lookfor"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCeptor44%2Flookfor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCeptor44%2Flookfor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCeptor44%2Flookfor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarkCeptor44%2Flookfor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DarkCeptor44","download_url":"https://codeload.github.com/DarkCeptor44/lookfor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222004788,"owners_count":16914877,"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":["cli","rust","rust-lang","search"],"created_at":"2024-10-29T07:05:49.168Z","updated_at":"2025-08-16T01:32:21.012Z","avatar_url":"https://github.com/DarkCeptor44.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lookfor\n\nA cross-platform CLI tool to find and highlight files or folders that match a pattern.\n\n## Features\n\n- Cross-platform\n- Asynchronous\n- Case-sensitive and insensitive search (insensitive by default)\n- Customizable colored output for highlighting (can be disabled by setting a `NO_COLOR` environment variable to any value)\n\n## Installation\n\n- From [crates.io](https://crates.io/crates/lookfor): `cargo install lookfor`\n- From [GitHub](https://github.com/DarkCeptor44/lookfor): `cargo install --git https://github.com/DarkCeptor44/lookfor`\n- From [releases](https://github.com/DarkCeptor44/lookfor/releases/latest).\n- Manually:\n\n```sh\ngit clone https://github.com/DarkCeptor44/lookfor\ncd lookfor\ncargo install --path .\n```\n\n## Usage\n\n![usage](usage.png)\n\n```sh\n$ lookfor -h\nCross-Platform file finder\n\nUsage: lookfor [OPTIONS] \u003cPATTERN\u003e\n\nArguments:\n  \u003cPATTERN\u003e  Pattern to search for\n\nOptions:\n      --in \u003cPATH\u003e       Path to search in [default: .]\n  -c, --color \u003cCOLOR\u003e   Color of the highlighted text (off for no color) [default: blue] [possible values: red, black, green, yellow, blue, \nmagenta, cyan, white, bright-black, bright-red, bright-green, bright-yellow, bright-blue, bright-magenta, bright-cyan, bright-white]        \n  -I, --case-sensitive  Case sensitive search\n  -h, --help            Print help\n  -V, --version         Print version\n```\n\n```sh\n$ lookfor clap\n.\\target\\debug\\.fingerprint\\clap-df93454be42887a2\\lib-clap.json\n.\\target\\debug\\.fingerprint\\clap-df93454be42887a2\n.\\target\\debug\\.fingerprint\\clap-df93454be42887a2\\dep-lib-clap\n.\\target\\debug\\.fingerprint\\clap-df93454be42887a2\\invoked.timestamp\n.\\target\\debug\\.fingerprint\\clap-df93454be42887a2\\lib-clap\n.\\target\\debug\\.fingerprint\\clap_builder-7a64f8b7e0ac51c1\n.\\target\\debug\\.fingerprint\\clap_builder-7a64f8b7e0ac51c1\\invoked.timestamp\n.\\target\\debug\\.fingerprint\\clap_builder-7a64f8b7e0ac51c1\\dep-lib-clap_builder\n.\\target\\debug\\.fingerprint\\clap_builder-7a64f8b7e0ac51c1\\lib-clap_builder\n.\\target\\debug\\.fingerprint\\clap_builder-7a64f8b7e0ac51c1\\lib-clap_builder.json\n.\\target\\debug\\.fingerprint\\clap_derive-19d5354e6d08a992\n.\\target\\debug\\.fingerprint\\clap_derive-19d5354e6d08a992\\dep-lib-clap_derive\n.\\target\\debug\\.fingerprint\\clap_derive-19d5354e6d08a992\\invoked.timestamp\n.\\target\\debug\\.fingerprint\\clap_derive-19d5354e6d08a992\\lib-clap_derive\n.\\target\\debug\\.fingerprint\\clap_derive-19d5354e6d08a992\\lib-clap_derive.json\n.\\target\\debug\\.fingerprint\\clap_lex-1195a16252b95268\n.\\target\\debug\\.fingerprint\\clap_lex-1195a16252b95268\\dep-lib-clap_lex\n.\\target\\debug\\.fingerprint\\clap_lex-1195a16252b95268\\invoked.timestamp\n.\\target\\debug\\.fingerprint\\clap_lex-1195a16252b95268\\lib-clap_lex\n.\\target\\debug\\.fingerprint\\clap_lex-1195a16252b95268\\lib-clap_lex.json\n.\\target\\debug\\deps\\clap-df93454be42887a2.d\n\n...\n```\n\n## Todo\n\n- [ ] Add support for regular expressions.\n- [ ] Add highlighting for every matching part of a line.\n- [ ] Write better tests.\n\n## Tests\n\n```sh\ncargo build\ncargo test\n```\n\n## Benchmarks\n\nThe benchmarks were performed using [Hyperfine](https://github.com/sharkdp/hyperfine) at the root of the repository after running both `cargo build` and `cargo build -r`, to find anything with `clap` in the `target` directory.\n\n### TLDR\n\nThe new results are different even for `dir`, `findstr` and `find` but essentially:\n\n- On Windows the async version is **24% faster** than `dir`, where sync version was **19%**, and **1176% faster** than `findstr`, where sync version was **~900%**\n- On Linux the async version is **9% slower** than `find`, where sync version was **2% faster**, this probably comes from the overhead of `tokio` and I don't think it's worth fixing\n\n### Windows\n\n- AMD64, 32GB RAM, Ryzen 7 3800X, Windows 10.\n\n| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |\n|:---|---:|---:|---:|---:|\n| `dir /s /b *clap*` | 56.9 ± 2.0 | 54.3 | 66.9 | 1.24 ± 0.18 |\n| `findstr /s /m /c:clap *` | 538.1 ± 18.3 | 525.7 | 577.7 | 11.76 ± 1.69 |\n| `target\\release\\lookfor.exe clap` | 45.8 ± 6.4 | 39.2 | 72.1 | 1.00 |\n\n### Linux\n\n- ARM64, 1GB RAM, Orange Pi Zero2, Debian 12.\n\n| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |\n|:---|---:|---:|---:|---:|\n| `find . -iname \"*clap*\"` | 20.5 ± 0.3 | 19.7 | 21.5 | 1.00 |\n| `target/release/lookfor clap` | 73.3 ± 1.3 | 70.6 | 76.5 | 3.57 ± 0.09 |\n\n## License\n\nThis project is licensed under the terms of the [GNU General Public License](LICENSE) version 3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkceptor44%2Flookfor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarkceptor44%2Flookfor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarkceptor44%2Flookfor/lists"}