{"id":13437582,"url":"https://github.com/dalance/ptags","last_synced_at":"2025-04-09T11:08:37.548Z","repository":{"id":30425175,"uuid":"124861486","full_name":"dalance/ptags","owner":"dalance","description":"A parallel universal-ctags wrapper for git repository","archived":false,"fork":false,"pushed_at":"2025-03-24T21:28:04.000Z","size":669,"stargazers_count":131,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T10:11:09.331Z","etag":null,"topics":["code-navigation","ctags","developer-tools","rust","universal-ctags"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/dalance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"dalance"}},"created_at":"2018-03-12T09:02:21.000Z","updated_at":"2025-03-28T06:27:51.000Z","dependencies_parsed_at":"2024-01-05T11:57:31.867Z","dependency_job_id":"8dcd7b91-5a4a-44d2-9df8-5a0e6d559eae","html_url":"https://github.com/dalance/ptags","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fptags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fptags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fptags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fptags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalance","download_url":"https://codeload.github.com/dalance/ptags/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027407,"owners_count":21035594,"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":["code-navigation","ctags","developer-tools","rust","universal-ctags"],"created_at":"2024-07-31T03:00:58.477Z","updated_at":"2025-04-09T11:08:37.525Z","avatar_url":"https://github.com/dalance.png","language":"Rust","readme":"# ptags\nA parallel [universal-ctags](https://ctags.io) wrapper for git repository\n\n[![Actions Status](https://github.com/dalance/ptags/workflows/Regression/badge.svg)](https://github.com/dalance/ptags/actions)\n[![Crates.io](https://img.shields.io/crates/v/ptags.svg)](https://crates.io/crates/ptags)\n[![codecov](https://codecov.io/gh/dalance/ptags/branch/master/graph/badge.svg)](https://codecov.io/gh/dalance/ptags)\n\n## Description\n\n**ptags** is a [universal-ctags](https://ctags.io) wrapper to have the following features.\n- Search git tracked files only ( `.gitignore` support )\n- Call `ctags` command in parallel for acceleration\n    - Up to x5 faster than universal-ctags\n\n## Install\n\n### Download binary\n\nDownload from [release page](https://github.com/dalance/ptags/releases/latest), and extract to the directory in PATH.\n\n### Arch Linux\n\nYou can install from AUR.\n\n- https://aur.archlinux.org/packages/ptags/\n- https://aur.archlinux.org/packages/ptags-git/\n\nIf you use `yay`, you can install like below:\n\n```\nyay -S ptags       // latest tagged version\nyay -S ptags-git   // current master of git repo\n```\n\n### Cargo\n\nYou can install by [cargo](https://crates.io).\n\n```\ncargo install ptags\n```\n\n## Requirement\n\n**ptags** uses `ctags` and `git` command internally.\nThe tested version is below.\n\n| Command   | Version                                               |\n| --------- | ----------------------------------------------------- |\n| `ctags`   | Universal Ctags 0.0.0(f9e6e3c1) / Exuberant Ctags 5.8 |\n| `git`     | git version 2.14.2                                    |\n| `git-lfs` | git-lfs/2.3.3                                         |\n\n## Usage\n\n```\nptags 0.1.12-pre\ndalance@gmail.com\nA parallel universal-ctags wrapper for git repository\n\nUSAGE:\n    ptags [FLAGS] [OPTIONS] [--] [DIR]\n\nFLAGS:\n        --config               Generate configuration sample file\n        --exclude-lfs          Exclude git-lfs tracked files\n    -h, --help                 Prints help information\n        --include-ignored      Include ignored files\n        --include-submodule    Include submodule files\n        --include-untracked    Include untracked files\n    -s, --stat                 Show statistics\n        --unsorted             Disable tags sort\n        --validate-utf8        Validate UTF8 sequence of tag file\n    -V, --version              Prints version information\n    -v, --verbose              Verbose mode\n\nOPTIONS:\n        --bin-ctags \u003cbin_ctags\u003e           Path to ctags binary [default: ctags]\n        --bin-git \u003cbin_git\u003e               Path to git binary [default: git]\n        --completion \u003ccompletion\u003e         Generate shell completion file [possible values: bash, fish,\n                                          zsh, powershell]\n    -e, --exclude \u003cexclude\u003e...            Glob pattern of exclude file ( ex. --exclude '*.rs' )\n    -c, --opt-ctags \u003copt_ctags\u003e...        Options passed to ctags\n    -g, --opt-git \u003copt_git\u003e...            Options passed to git\n        --opt-git-lfs \u003copt_git_lfs\u003e...    Options passed to git-lfs\n    -f, --file \u003coutput\u003e                   Output filename ( filename '-' means output to stdout ) [default: tags]\n    -t, --thread \u003cthread\u003e                 Number of threads [default: 8]\n\nARGS:\n    \u003cDIR\u003e    Search directory [default: .]\n```\n\nYou can pass options to `ctags` by`-c`/`--ctags_opt` option like below.\n\n```\nptags -c --links=no -c --languages=Rust\n```\n\nSearched file types per options are below.\n`--include-submodule` and `--include_untracked` are exclusive.\nThis is the restriction of `git ls-files`.\nAny include/exclude options without the above combination can be used simultaneously.\n\n| File type     | Default  | --exclude-lfs | --include-ignored | --include-submodule | --include-untracked |\n| ------------- | -------- | ------------- | ----------------- | ------------------- | ------------------- |\n| tracked       | o        | o             | o                 | o                   | o                   |\n| untracked     | x        | x             | x                 | x                   | o                   |\n| ignored       | x        | x             | o                 | x                   | x                   |\n| lfs tracked   | o        | x             | o                 | o                   | o                   |\n| in submodules | x        | x             | x                 | o                   | x                   |\n\nYou can override any default option by `~/.ptags.toml` like below.\nThe complete example of `~/.ptags.toml` can be generated by `--config` option.\n\n```toml\nthread = 16\nbin_ctags = \"ctags2\"\nbin_git = \"git2\"\n```\n\n## Benchmark\n\n### Environment\n- CPU: Ryzen Threadripper 1950X\n- MEM: 128GB\n- OS : CentOS 7.4.1708\n\n### Data\n\n| Name    | Repository                           | Revision     | Files  | Size[GB] |\n| ------- | ------------------------------------ | ------------ | ------ | -------- |\n| source0 | https://github.com/neovim/neovim     | f5b0f5e17    | 2370   | 0.1      |\n| source1 | https://github.com/llvm-mirror/llvm  | ddf9edb4020  | 29670  | 1.2      |\n| source2 | https://github.com/torvalds/linux    | 071e31e254e0 | 52998  | 2.2      |\n| source3 | https://github.com/chromium/chromium | d79c68510b7e | 293205 | 13       |\n\n### Result\n\n**ptags** is up to x5 faster than universal-ctags.\n\n| Command       | Version                         | source0         | source1         | source2          | source3         |\n| ------------- | ------------------------------- | --------------- | --------------- | ---------------- | --------------- |\n| `ctags -R`    | Universal Ctags 0.0.0(f9e6e3c1) | 0.41s ( x1 )    | 3.42s ( x1 )    | 23.64s ( x1 )    | 32.23 ( x1 )    |\n| `ptags -t 16` | ptags 0.1.4                     | 0.13s ( x3.15 ) | 0.58s ( x5.90 ) | 4.24s  ( x5.58 ) | 7.27s ( x4.43 ) |\n\n","funding_links":["https://github.com/sponsors/dalance"],"categories":["Development tools","开发工具 Development tools","开发工具"],"sub_categories":["Web Servers","Web服务器 Web Servers","Web 服务器","Workflow Automation","网络服务端 Web Servers"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fptags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalance%2Fptags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fptags/lists"}