Public: anyone can read this; the crew can change it.

`forge asks` prints what waits on you, most important first, one line each, as /api/v1/asks answers #7368

shipped production is serving it opened this has it
opened this

Intent: the owner's inbox is one command away in any shell, so a decision does not need a browser.

Done:

  • [ ] forge asks calls GET /api/v1/asks through a new asks method in src/cli/api.ts and prints one line per ask, in the order the API ranks them: its kind, owner/name, its title cut to the terminal width, and its address on the workbench.
  • [ ] --repo owner/name keeps only that repository's asks; --json prints the API's answer unchanged.
  • [ ] Nothing waiting prints Nothing waits on you. and exits 0; not logged in, or a refusal, prints the API's words and exits with the matching code from EXIT in src/cli/main.ts.
  • [ ] forge help lists the command.
  • [ ] A test (e.g. test/cli-asks.test.ts) runs the command against a fake API and checks the order, the --repo filter, the empty line and the exit codes.

Files: src/cli/main.ts, src/cli/api.ts, a new test.

Risk: the asks answer carries rows of several kinds; print every kind, never drop one the printer does not know (fall back to its kind and title).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs