Skip to content

docs: fix CLI option examples#373

Open
JONASXZB wants to merge 4 commits into
profullstack:masterfrom
JONASXZB:codex/fix-cli-gig-sort-docs
Open

docs: fix CLI option examples#373
JONASXZB wants to merge 4 commits into
profullstack:masterfrom
JONASXZB:codex/fix-cli-gig-sort-docs

Conversation

@JONASXZB
Copy link
Copy Markdown

@JONASXZB JONASXZB commented Jun 1, 2026

Summary

  • replace the unsupported recent gig sort option with the supported newest value
  • document the missing oldest gig sort option so the docs match CLI help and validation
  • fix the gig budget filter example from --min-budget / --max-budget to --budget-min / --budget-max
  • replace the unsupported feed trending sort example with implemented feed sort values and a valid rising example
  • include the following feed sort option from the shared validation schema

Fixes #372.

Verification

  • Confirmed https://ugig.net/api/gigs?sort=recent&limit=1 returns 400
  • Confirmed https://ugig.net/api/gigs?sort=newest&limit=1 returns 200
  • Confirmed https://ugig.net/api/feed?sort=trending&limit=1 returns 400
  • Confirmed https://ugig.net/api/feed?sort=hot&limit=1 returns 200
  • Confirmed https://ugig.net/api/feed?sort=following&limit=1 is accepted as a valid sort and reaches auth handling (401 login required), rather than validation failure
  • Confirmed cli/src/commands/gigs.ts defines --budget-min and --budget-max
  • Ran git diff --check -- src/app/docs/cli/page.tsx

Docs-only change; no build was run.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 1, 2026

Greptile Summary

This PR fixes four documentation errors in the CLI reference page where the documented flag names and sort values diverged from what the CLI and API actually accept.

  • Corrects budget filter flags from --min-budget/--max-budget to --budget-min/--budget-max, matching the Commander.js option definitions in cli/src/commands/gigs.ts.
  • Updates gig sort options to newest, oldest, budget_high, budget_low and feed sort options to hot, new, top, rising, following, both matching their respective Zod enum schemas in src/lib/validations.ts.

Confidence Score: 5/5

Safe to merge — all four documentation corrections are verified against the live CLI source and Zod validation schemas.

Every changed value was cross-checked: budget flag names match cli/src/commands/gigs.ts option definitions, gig sort values match the gigsFiltersSchema enum in src/lib/validations.ts, and all five feed sort values (hot, new, top, rising, following) now match feedFiltersSchema exactly. No logic or runtime code is touched.

No files require special attention.

Important Files Changed

Filename Overview
src/app/docs/cli/page.tsx Docs-only fix: corrects budget flag names, gig sort options, and feed sort options to match actual CLI and API validation schemas

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CLI Docs Page] --> B[Gigs Section]
    A --> C[Feed Section]

    B --> B1["--budget-min / --budget-max\n✅ matches gigs.ts CLI options"]
    B --> B2["Sort: newest, oldest, budget_high, budget_low\n✅ matches gigsFiltersSchema enum"]

    C --> C1["Sort: hot, new, top, rising, following\n✅ matches feedFiltersSchema enum"]
    C --> C2["Example: ugig feed --sort rising\n✅ valid enum value"]
Loading

Reviews (4): Last reviewed commit: "docs: include following feed sort option" | Re-trigger Greptile

@JONASXZB JONASXZB changed the title docs: fix CLI gig sort options docs: fix CLI option examples Jun 1, 2026
Comment thread src/app/docs/cli/page.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI docs examples use unsupported flags and sort values

1 participant