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 (like app/services/). Default is empty, i.e. no restriction πŸ’«
  • --jq="" β€” Filter the JSON output with a jq expression. Default empty. Get exactly the fields you want, no cap πŸ“
  • --knn=0 β€” How many nearest neighbours to retrieve, range 1–100. Defaults to 64 server-side. Fine-tune that retrieval vibe 🧚
  • -l, --limit=0 β€” Max number of results, range 1–100. Defaults to 20 server-side. Keep it cute and small if you want πŸŽ€
  • -F, --output="text" β€” Format the output as: text, json. Default is text πŸ‘‘
  • -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. Default false πŸ’€
  • -R, --repo="" β€” Select another repository. You can pass either OWNER/REPO or GROUP/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 by spf13/cobra β€” and dated Nov 2026, for the glab(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