> ## Documentation Index
> Fetch the complete documentation index at: https://gleanfeed.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI command reference

> Find Glean Feed CLI command groups, common options, write safeguards, pagination, and exit codes.

Run `gleanfeed COMMAND --help` for the installed version's complete option list.
This page explains the stable command groups and behavior; the
[REST endpoint reference](/api/endpoints) remains authoritative for resource
fields and the [scope table](/api/scopes) remains authoritative for access.

## Global options

| Option             | Behavior                                                                               |
| ------------------ | -------------------------------------------------------------------------------------- |
| `--profile <name>` | Select a named local profile before repository or active-profile resolution.           |
| `--json`           | Write exactly one machine-readable object to standard output.                          |
| `--debug`          | Write credential-safe command, profile, workspace, and endpoint diagnostics to stderr. |
| `--help`           | Show help for the selected command.                                                    |
| `--version`        | Print the installed CLI version.                                                       |

## Setup and identity

| Command                    | Purpose                                                                                 |
| -------------------------- | --------------------------------------------------------------------------------------- |
| `auth login`               | Open browser sign-in, or save an API key from the environment, masked prompt, or stdin. |
| `auth status`              | Validate and show the selected profile.                                                 |
| `auth logout`              | Revoke OAuth when possible and remove one local profile.                                |
| `profile list`             | List saved profiles without printing credentials.                                       |
| `profile switch <name>`    | Set the active user profile.                                                            |
| `init`                     | Bind the current Git repository to a profile and workspace.                             |
| `config get [key]`         | Read non-secret repository configuration.                                               |
| `config set <key> <value>` | Update a supported non-secret field.                                                    |
| `config validate`          | Validate schema and local workspace binding.                                            |
| `whoami`                   | Show selected profile, workspace, role, and scopes.                                     |
| `workspace show`           | Return a limited workspace setup snapshot.                                              |

See [Profiles and repository config](/api/cli-profiles) for selection order and
the `.gleanfeed.json` schema.

## Feedback

```bash theme={null}
gleanfeed feedback list --limit 10 --stage in_review --search "exports"
gleanfeed feedback get REQUEST_ID
gleanfeed feedback create --board product-ideas --title "Filter exports by board"
gleanfeed feedback update REQUEST_ID --description-file revised.md
gleanfeed feedback stage REQUEST_ID planned
gleanfeed feedback status REQUEST_ID rejected
gleanfeed feedback comment REQUEST_ID --body-file reply.md
gleanfeed feedback promote REQUEST_ID planned
gleanfeed feedback send-to-linear REQUEST_ID
```

`create` requires an explicit `--board` unless `.gleanfeed.json` provides
`defaultBoard`. Description input accepts exactly one of `--description`,
`--description-file`, or `--description-stdin`. Create and comment operations
accept `--idempotency-key`; a stable key makes retries return the original result.

Stage and moderation changes can affect the public portal. Promotion preserves
the original request and safely reuses its linked roadmap item. Linear delivery
previews the resolved destination and safely reuses the active linked issue.

## Roadmap

```bash theme={null}
gleanfeed roadmap list --limit 20
gleanfeed roadmap get ITEM_ID
gleanfeed roadmap create \
  --title "Public beta" \
  --board product-ideas \
  --stage planned \
  --target-precision quarter \
  --target-date 2027-04-01
gleanfeed roadmap update ITEM_ID --title "Public beta rollout"
gleanfeed roadmap move ITEM_ID in_progress
```

Supported stages are `planned`, `in_progress`, `done`, and `closed`. Exact dates
and quarter targets use `YYYY-MM-DD`; quarter targets must start on January 1,
April 1, July 1, or October 1. A move is customer-visible and requires approval.

## Changelog

```bash theme={null}
gleanfeed changelog list --limit 20
gleanfeed changelog get ENTRY_ID
gleanfeed changelog draft --title "Faster exports" --body-file release.md
gleanfeed changelog update ENTRY_ID --version 2.4.0 --no-comments
gleanfeed changelog publish ENTRY_ID
gleanfeed changelog comment ENTRY_ID --body "Thanks for the report."
gleanfeed changelog delete ENTRY_ID
```

`draft` never publishes. `publish` first reads and prints the stored title, body,
and schedule, then asks for approval. Publishing an entry that is already
published is a no-op; publishing again after returning it to draft can notify
subscribers again. Delete is permanent and approval-gated.

Schedule a draft with a future ISO 8601 date-time containing a UTC offset:

```bash theme={null}
gleanfeed changelog update ENTRY_ID \
  --schedule "2027-01-15T09:30:00-05:00" \
  --timezone America/New_York
```

## Import GitHub issues

The importer uses the local `gh` executable and never reads or stores its token.
Always preview first:

```bash theme={null}
gleanfeed import github-issues \
  --repo acme/product \
  --board product-ideas \
  --label customer-request \
  --state open \
  --dry-run \
  --json
```

Remove `--dry-run` after review. Bulk noninteractive writes require `--yes`.
Stable GitHub source identity and per-issue idempotency make retries safe;
partial failures return `continuation.retryArgs` for the failed issue numbers.

## Pagination and structured output

List commands accept `--limit` from 1 to 100 and an opaque `--cursor`. Keep the
same filters when requesting the next page.

```bash theme={null}
gleanfeed feedback list --limit 10 --json | jq '.data.items[] | {id, title, stage}'
```

JSON mode returns `{ "ok": true, "command": "...", "data": ... }` on success
and `{ "ok": false, "command": "...", "error": ... }` on failure. It writes no
extra prose to stdout.

## Approval boundaries

Interactive use asks before feedback stage/status changes, roadmap moves,
promotion, Linear delivery, changelog schedules, publication, and deletion.
Noninteractive or JSON callers must pass `--yes` for those writes. An approval
flag never bypasses authentication, scopes, workspace isolation, or server-side
validation.

## Exit codes

| Code | Meaning                     |
| ---: | --------------------------- |
|    0 | Success                     |
|    1 | Unexpected internal failure |
|    2 | Usage or validation error   |
|    3 | Authentication failure      |
|    4 | Authorization failure       |
|    5 | Resource not found          |
|    6 | Rate limited                |
|    7 | Remote service failure      |
