{"id":23803925,"url":"https://github.com/wberrier/clip","last_synced_at":"2026-04-28T21:34:04.814Z","repository":{"id":146870293,"uuid":"243333593","full_name":"wberrier/clip","owner":"wberrier","description":"Command Line Interface Project: project command wrapper","archived":false,"fork":false,"pushed_at":"2022-12-20T18:55:58.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T06:40:15.353Z","etag":null,"topics":["build","cli","cmake","cpp","emacs","lsp","mesonbuild","ninja-build","python3","vim"],"latest_commit_sha":null,"homepage":"","language":"Python","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/wberrier.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":"2020-02-26T18:19:06.000Z","updated_at":"2023-01-31T17:56:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"e3b75cbf-07fe-4397-a817-1d953cfbff4e","html_url":"https://github.com/wberrier/clip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wberrier/clip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wberrier%2Fclip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wberrier%2Fclip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wberrier%2Fclip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wberrier%2Fclip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wberrier","download_url":"https://codeload.github.com/wberrier/clip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wberrier%2Fclip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32400866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["build","cli","cmake","cpp","emacs","lsp","mesonbuild","ninja-build","python3","vim"],"created_at":"2025-01-01T22:36:18.431Z","updated_at":"2026-04-28T21:34:04.771Z","avatar_url":"https://github.com/wberrier.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clip: CLI Project\n\nThis is really just a command wrapper around various commands to run\nat a project root level.\n\nOriginally it was to build/debug/run c++ stuff from an editor\n(emacs!), but there's no reason it should be tied to c++ or emacs.\n\nMaybe it's more necessary for c++ since there's a lack of standard\ntooling.  In some sense, this project is inspired by rust's cargo\ntool.\n\n# Intended Audience\n\nVim and Emacs support `:make` / `M-x compile` but those are rarely used to\nbuild a project.  The intent is to provide a cli tool that runs some\nhigh level commands on a project basis that can be easily used from\nvarious editors.  The configuration file to capture these commands can\nbe persisted with the source.\n\n# Config File\n\nHere's a sample configuration file using meson/ninja.  This would be\nplaced at the root of a project as `.clip.yaml`.\n\n```yaml\n---\n# parameters that will build this project\nbuild:\n  # Various \"profiles\"\n  release:\n    command: ninja -j@NUM_CORES_TO_USE@\n    working_dir: build\n  debug:\n    command: ninja -j@NUM_CORES_TO_USE@\n    working_dir: build-debug\n  cross:\n    command: ninja -j@NUM_CORES_TO_USE@\n    working_dir: build-cross\n  test:\n    # Can set environment variables when running profiles\n    env:\n      BOOST_TESTS_TO_RUN: subset\n    command: ninja test\n    working_dir: build-debug\n\n# run the \"tests\" binary with gdb in the \"build-debug\" directory\ndebug:\n  program: tests\n  working_dir: build-debug\n  program_args:\n  # \"env\" also supported here\n\n# Process compile_commands.json file[s] in various ways to\n# generate a new one to stdout\ncompile_commands:\n  working_dir: build-debug\n  # ignore_args:\n  #   - args to ignore\n\n  # additional_args:\n  #   - args to add if missing\n\n  # Option to override compilers\n  compiler_overrides:\n    gcc: /usr/local/bin/my-special-gcc\n    g++: /usr/local/bin/my-special-g++\n\n  # Filter compile_commands.json\n  # {directory_,command_,file_,arguments_,output_}filter_regexes\n  # filter_regexes:\n  #   regex: replacement\n\n  # You can specify more than one file that will get merged into one\n  files:\n    - compile_commands.json\n    - compile_commands2.json\n\n  # Some options to pass to clangd\n  clangd:\n    log_level: verbose\n    query_driver: /usr/bin/**/clang-*\n    #extra_args: --pretty\n    #executable: /usr/local/bin/clangd\n```\n\n`NUM_CORES_TO_USE` is referenced from the environment in order to cap\nparallel jobs to be less than cores+1.  Otherwise a machine can be\nbrought to it's knees...\n\n## Compile Commands\n\nSupport was added to this tool in order to cater to the `cquery` c++\nlanguage server.  It was easier to provide a script that combined\ncompile_commands.json than it was to teach `cquery` to read multiple\nfiles.  The regex stuff was added to take compile databases from cross\ncompiled builds and still run them through `cquery`.\n\nSimilar support was added to start `clangd` after first generating\ncompile_commands.json and then passing that directory to `clangd`.\n\n# Usage\n\n```\n./clip \u003csub command\u003e \u003csub command arguments\u003e\n\n Sub commands:\n\n  build [profile]\n  debug\n  generate-compile-db\n  start-clangd\n```\n\n# TODO\n\n* `clip build --target=profile` instead of `clip build profile`\n* Make \"Config\" object to handle loading, munging, and accessing\n* tests?\n* more flexible yaml schema for handling debugging targets and tests\n* better schema?\n* give this script some python \"love\"\n  * setup.py?\n  * better module layout?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwberrier%2Fclip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwberrier%2Fclip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwberrier%2Fclip/lists"}