glab(1)
π¦ glab(1) β the search semantic era β¨
Okay so bestie, this page is your guide to glab-search-semantic β the subcommand that lives inside the glab command family. Yes, the header says glab(1) because that's the manual's name, but the star of THIS show is glab-search-semantic. Let's get into it π
πΈ NAME πΈ
glab-search-semantic β search your project code using natural language. Like asking your codebase a question instead of grepping for it. Iconic behaviour, honestly π
β¨ SYNOPSIS β¨
glab search semantic [flags]
That's it. Short synopsis, main character energy π«Ά
π DESCRIPTION π
Search project code using natural language β meaning semantic similarity, not "find the literal string" vibes. It's giving "ask and ye shall receive" π₯
Heads up, bestie: it requires the project to have semantic code search enabled via GitLab Duo. No Duo, no semantic slay π
Also a big one: this feature is in beta and might not be ready for production use. It might be unstable, and breaking changes can occur outside of major releases. So don't build your whole life plan on it yet π For the deets, the manpage points you at https://docs.gitlab.com/policy/development_stages_support/ β
π OPTIONS π
-d,--directory-path=""β Keep the search under this path only (likeapp/services/). Default is empty, i.e. no restriction π«--jq=""β Filter the JSON output with ajqexpression. Default empty. Get exactly the fields you want, no cap π--knn=0β How many nearest neighbours to retrieve, range1β100. Defaults to64server-side. Fine-tune that retrieval vibe π§-l,--limit=0β Max number of results, range1β100. Defaults to20server-side. Keep it cute and small if you want π-F,--output="text"β Format the output as:text,json. Default istextπ-q,--query=""β Your natural language search query. Default empty. This is where the magic words go β¨
π«Ά OPTIONS INHERITED FROM PARENT COMMANDS π«Ά
Yes bestie, these come from the parent command and are just visiting π
-h,--help[=false]β Show help for this command. Defaultfalseπ-R,--repo=""β Select another repository. You can pass eitherOWNER/REPOorGROUP/NAMESPACE/REPO, and the full URL or a Git URL is also accepted. Default empty, so it uses wherever you already are πΈ
β EXAMPLE β
Straight from the manpage, copied verbatim because we respect the source π
# Search for authentication-related code in the current project
glab search semantic -q "authentication middleware"
# Search within a specific directory
glab search semantic -q "rate limiting" -d app/services/
# Search in a specific project with JSON output
glab search semantic -q "CI pipeline triggers" -R gitlab-org/gitlab --output json
# Limit results
glab search semantic -q "database migrations" --limit 5
Look at those four little examples living their best lives ππ₯
π§ SEE ALSO π§
glab-search(1)β go say hi to the parent search page, iykyk π¦
Auto generated byspf13/cobraβ and dated Nov 2026, for theglab(1)manual. So if you're reading this from the future: hey bestie, you're slaying π
periodt. that's the whole manpage. go search something semantically gorgeous β¨π
π¦ where this page comes from
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms