Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

glean-cli

FreeNo executable scriptsNot checked

Provides knowledge on using the `glean` CLI tool to access company knowledge and documents through Glean. Use when the user asks you to use Glean to search…

sammcjby sammcj★ 175 GitHub stars

About this skill

Glean CLI

glean is a local CLI that authenticates to a company's Glean instance and exposes its REST API. It can search the corporate index, talk to Glean Assistant, look up people, fetch and summarise documents, and manage Glean-side resources (collections, pins, go-links, announcements, curated answers, agents, verification workflows).

Output is JSON on stdout, errors on stderr, exit code reflects success. This makes the CLI ideal for piping into jq.

Prerequisite check

Before using anything in this skill, make sure the binary is on $PATH:

command -v glean

The glean CLI command is provided by brew install gleanwork/tap/glean-cli

If the command isn't found, you shoulkd ask the user if they wish you to install it for them.

If unauthenticated (run glean auth status upon authentication errors) and the user is at a terminal: glean auth login (browser OAuth). For CI or scripts, set GLEAN_API_TOKEN and GLEAN_HOST env vars instead - credentials resolve in the order: env vars -> system keyring -> ~/.glean/config.json.

Always introspect first

glean schema is the source of truth for commands and flags - Glean ships updates, and the schema reflects whatever version is installed locally. Before invoking a command you haven't used in this session, run:

glean schema <command>          # full machine-readable schema for one command
glean schema | jq '.commands'   # list every available command

The reference file in this skill (references/commands.md) is a fast lookup, but if glean schema disagrees, schema wins.

Calling pattern

glean <command> [subcommand] [flags]

Three flags are global and worth knowing up front:

Flag Purpose
--output <json|ndjson|text> Default json. Use ndjson when streaming results to a pipeline.
--json '<payload>' Send a complete JSON request body. Overrides every other flag - use this for any non-trivial request, the schema documents the body shape.
--dry-run Print the request that would be sent, send nothing. Always use this before any create/update/delete operation.

Short positional flags exist for ergonomic queries (glean search "vacation policy", glean chat "what are the holidays?"), but anything beyond a single string should go through --json.

Commands at a glance

Read-only:

Command Use for
glean search Find documents across all enterprise sources.
glean chat Ask Glean Assistant a question; streams an AI answer.
glean documents Fetch a doc's metadata, content, permissions, or AI summary.
glean entities Look up people, teams, or custom entities.
glean messages Read a specific Slack/Teams message by ID.
glean insights Pull search/usage analytics.
glean agents List, inspect, and run Glean AI agents.
glean tools List and run Glean platform tools.
glean answers List/get curated Q&A pairs.

Write/admin:

Command Use for
glean collections Create/update/delete document collections; add/remove items.
glean pins Promote a document to the top of results for given queries.
glean shortcuts Manage go-links (e.g. go/wiki).
glean announcements Create/update/delete time-bounded company announcements.
glean answers Create/update curated answers.
glean verification Mark documents verified; send verification reminders.
glean activity Log user activity events; submit relevance feedback.
glean api Raw authenticated HTTP call to any Glean REST endpoint (escape hatch).

For flag-level detail and worked examples on any of these, read references/commands.md - it's organised by command in the same order as the tables above.

Common workflows

Search and pipe into jq. Search returns JSON wit

Full SKILL.md on GitHub

Install glean-cli in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

references/commands.md

FAQ

What does the glean-cli skill do?

Provides knowledge on using the `glean` CLI tool to access company knowledge and documents through Glean. Use when the user asks you to use Glean to search, read or otherwise access knowledge from their company's Confluence, Slack, Google Drive Files (Slides, Documents, Sheets) etc.

How do I install the glean-cli skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the glean-cli skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare glean-cli with