macOS
brew install wegglilocal Homebrew formula metadata
brew / rank 11975
Fast and robust semantic search tool for C and C++ codebases. Version 0.2.4 via Homebrew; verified from local package data. Also installable with nix: nix profile install nixpkgs#weggli.
install
brew install wegglilocal Homebrew formula metadata
sudo apk add weggliAlpine Linux edge package indexes · weggli · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#wegglinixpkgs package indexes · pkgs/by-name/we/weggli/package.nix · source: api.github.com
sudo zypper install weggliopenSUSE Tumbleweed package metadata · weggli · source: download.opensuse.org
overview
Fast and robust semantic search tool for C and C++ codebases
history
weggli is a Rust semantic-search tool for C and C++ codebases, designed for security researchers who want fast, code-shaped queries over large or incomplete source trees. Its README says it matches user-provided patterns on abstract syntax trees and uses a query language that resembles C and C++.
The current GitHub repository was created in September 2021, and crates.io metadata shows package publication beginning in October 2021. The README states that weggli is inspired by Semgrep, Coccinelle, joern, and CodeQL, but intentionally makes different tradeoffs for C/C++ review.
Those tradeoffs define the project: first-class support for modern C++ constructs, minimal setup without requiring a successful build, interactive performance, and greedy matching that finds useful variants even at the cost of false positives. The implementation is built on tree-sitter C and C++ grammars, with queries translated into tree-sitter query machinery plus weggli-specific behavior.
weggli's adoption is strongest in vulnerability research and manual code-review circles rather than general developer search. A 2024 HN Security article described converting C/C++ vulnerability patterns from Semgrep into weggli queries and using the tool to identify hotspots such as buffer overflows, integer issues, format strings, memory-management mistakes, and command-injection patterns.
By July 2026, the repository had about 2.5 thousand GitHub stars, which is sizable for a specialized security CLI. Its package-manager niche is clear: it gives reviewers a fast semantic grep for C and C++ without requiring a full CodeQL database, compiler build, or heavyweight SAST workflow.
A typical invocation is `weggli <PATTERN> <PATH>`, where the pattern is written in a C/C++-like language with metavariables and wildcards. For example, patterns can look for a stack buffer followed by a `memcpy` call, suspicious arithmetic before allocation, or API-specific call sequences.
In practice, users run weggli interactively while reading source: write a pattern, inspect matches, refine the query, and then manually audit nearby code. It is especially useful for variant analysis after one bug is found and for quickly mapping attack-surface idioms in unfamiliar C/C++ projects.
weggli is package-nerd significant because it is the small, installable middle ground between `grep` and heavyweight static-analysis platforms. It makes AST-aware C/C++ searching feel like a fast CLI habit rather than an infrastructure project.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
weggli | executable | indexed executable | Discovered from the local executable index. |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:weggli |
|---|---|
| Version | 0.2.4 |
| Package manager | Homebrew |
| Homepage | https://github.com/weggli-rs/weggli |
| Repository | https://github.com/weggli-rs/weggli |
| Bottle | not recorded |
| Service | none declared |
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
weggli
nix profile install nixpkgs#weggliweggli 0.2.4-r1
Semantic search tool for C and C++ codebases
https://github.com/googleprojectzero/weggli
sudo apk add weggliweggli 0.2.4-2.13
A semantic search tool for C and C++ codebases
https://github.com/googleprojectzero/weggli
sudo zypper install wegglisource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.