{"id":20317434,"url":"https://github.com/thimc/cmpdb","last_synced_at":"2025-08-21T15:10:57.588Z","repository":{"id":193783740,"uuid":"689418321","full_name":"thimc/cmpdb","owner":"thimc","description":"editor agnostic tool for generating json compilation database files","archived":false,"fork":false,"pushed_at":"2023-10-17T17:25:26.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T13:16:46.963Z","etag":null,"topics":["c","clangd","cli","compilation-database","cpp","makefile"],"latest_commit_sha":null,"homepage":"","language":"Go","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/thimc.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":"2023-09-09T18:34:55.000Z","updated_at":"2023-11-05T18:00:57.000Z","dependencies_parsed_at":"2023-09-10T02:15:52.799Z","dependency_job_id":"ec8f6244-1e99-49c2-abbf-d35618f621c2","html_url":"https://github.com/thimc/cmpdb","commit_stats":null,"previous_names":["thimc/cmpdb"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thimc%2Fcmpdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thimc%2Fcmpdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thimc%2Fcmpdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thimc%2Fcmpdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thimc","download_url":"https://codeload.github.com/thimc/cmpdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241818898,"owners_count":20025212,"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":["c","clangd","cli","compilation-database","cpp","makefile"],"created_at":"2024-11-14T18:31:59.658Z","updated_at":"2025-03-04T09:16:20.059Z","avatar_url":"https://github.com/thimc.png","language":"Go","readme":"# cmpdb\n\ncmpdb (**c**o**mp**ilation **d**ata**b**ase) is a go rewrite of [compiledb](https://github.com/nickdiego/compiledb).\n\nThis tool is suitable for make-based projects and is used to generate a\n[JSON Compilation Database file](https://clang.llvm.org/docs/JSONCompilationDatabase.html)\nfor programs such as the popular LSP server [clangd](https://clangd.llvm.org/).\n\n## Usage\nBefore you invoke cmpdb, make sure your current working directory is the root\nof your project.\n\ncmpdb does not require any any flags. Granted, the output will be printed to\nstdout rather than to a file, so to store the output you will need to redirect\nthe output of cmpdb like so `cmpdb \u003e compile_commands.json`. Another solution\nis to simply pass the `-w` flag which will write the file on disk.\n\nIf you wish to alter the behaviour of cmpdb, these flags are available:\n```\n-c  output the compilation command as a single string instead of a list of arguments\n-d  sets the working directory\n-f  expands the compiler executable path\n-h  displays a help message\n-i  sets the json indentation (default \"  \")\n-m  adds the compilers predefined macros to the argument list\n-w  writes the content to \"compile_commands.json\" (default behaviour is to write to stdout)\n```\n\n## Installation\n\n    go build -o cmpdb .\n    cp ./cmpdb /usr/local/bin/\n\n### Unit tests\n\n    go test -v ./...\n\n### Benchmarks:\n\n    go test -v -bench=. -run=^#\n\n\nNote: The benchmark is somewhat of a fork bomb as it spawns a new process\ncontinuously in order to measure the total run time of what cmpdb's code\nfunctionality does\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthimc%2Fcmpdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthimc%2Fcmpdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthimc%2Fcmpdb/lists"}