Skip to content

Add examples to api command and subcommands#244

Merged
jeremy merged 1 commit intomainfrom
api-examples
Mar 11, 2026
Merged

Add examples to api command and subcommands#244
jeremy merged 1 commit intomainfrom
api-examples

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 11, 2026

Summary

  • Adds Example field to the api parent command and all four subcommands (get, post, put, delete)
  • Examples surface in --help output and in missingArg/noChanges machine-mode error hints

Context

DHH feedback card 9660578055 — the api command was unclear without concrete examples showing what paths and payloads look like.

Test plan

  • bin/ci passes
  • basecamp api -h / basecamp api get -h show examples

Summary by cubic

Add concrete examples to the api command and its get, post, put, and delete subcommands. Examples now show common paths, absolute URLs, and -d payloads in --help and error hints to make raw API usage clearer.

  • New Features
    • Added Example strings to the parent api command and all subcommands.
    • Examples appear in --help and in missingArg/noChanges machine-mode hints.

Written for commit 1743834. Summary will update on new commits.

@jeremy jeremy requested a review from a team as a code owner March 11, 2026 03:23
Copilot AI review requested due to automatic review settings March 11, 2026 03:23
@github-actions github-actions bot added the commands CLI command implementations label Mar 11, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the usability of the basecamp api CLI command by adding concrete, copy/paste-ready examples to the parent api command and each HTTP-verb subcommand, making the raw API interface easier to understand from --help and from machine-mode usage hints.

Changes:

  • Add Example text for basecamp api (parent) to show common GET/POST usage.
  • Add Example text for basecamp api get|post|put|delete to demonstrate paths, full URLs, and JSON payload usage.
  • Ensure agent/machine-mode missingArg hints can include a meaningful first example line for post/put when --data is missing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Concrete usage examples surface in --help output and in missingArg/noChanges
machine-mode error hints, giving both humans and agents a clear starting point.
@github-actions github-actions bot added the enhancement New feature or request label Mar 11, 2026
@jeremy jeremy merged commit 641b11e into main Mar 11, 2026
25 checks passed
@jeremy jeremy deleted the api-examples branch March 11, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants