Skip to content

feat(cli): polish command surface (remote group, bare note, note-search dedup, examples) - #78

Open
olddognewflex wants to merge 1 commit into
mainfrom
feat/cli-surface-polish
Open

feat(cli): polish command surface (remote group, bare note, note-search dedup, examples)#78
olddognewflex wants to merge 1 commit into
mainfrom
feat/cli-surface-polish

Conversation

@olddognewflex

Copy link
Copy Markdown
Owner

Closes #61.

CLI surface inconsistencies at the edges (§2.2, §2.6).

1. qi remote status|drain

The cloud-queue verbs were hyphenated top-levels (remote-status / remote-drain) — inconsistent with every other command group. Grouped under a qi remote parent. The old spellings survive as deprecated aliases (built by the same newRemote*Command(cfg, use) builders, so no logic is duplicated) that still run but print a one-line pointer to the grouped form.

2. Bare qi note shows help

It used to silently create an untitled inbox note and open Obsidian — an undocumented, side-effecting surprise where every sibling group shows help. Now it shows help; qi note new is the create path. (Removed the now-dead openURL call from note; openURL itself stays — daily.go uses it.)

3. note search → deprecated

qi note search <q> duplicated qi search <q> --kind note. Kept working but marked Deprecated, pointing at the canonical unified-search path.

4. Cobra Example blocks

Added where the syntax is non-obvious — especially date/repeat on task add / schedule / list, plus search / capture / note new. e.g.:

$ qi task add -h
Examples:
  qi task add "Ship the release" --due 2026-08-01
  qi task add "Water plants" --schedule tomorrow --repeat "every 3 days"
  qi task add "Weekly review" --repeat "every week" --project ops
  qi task add "Send invoice" --client acme --due 2026-08-15

Tests

remote_test.go: the remote group has status/drain; the deprecated aliases carry a pointer; bare qi note is non-runnable (help) and note search is deprecated. Full go test ./..., go vet, go build ./... green; smoke-tested each surface change.

Merge-order note

Touches internal/commands/task.go (Examples) and capture.go. Overlaps #60 and #62 on those files — trivial rebase for whichever merges later.

CLI edge inconsistencies (closes #61):

- Group the cloud-queue verbs under `qi remote status|drain`, matching
  every other command family. The hyphenated `qi remote-status` /
  `qi remote-drain` survive as deprecated aliases (same builders, no
  duplicated logic) that still run but point at the grouped form.
- Bare `qi note` now shows help instead of silently creating an
  untitled inbox note and opening Obsidian — an undocumented,
  surprising side effect. Use `qi note new` to create.
- Deprecate `qi note search` in favor of `qi search <q> --kind note`
  (the canonical unified-search path); it still runs.
- Add cobra Example blocks for the non-obvious date/repeat syntax
  (task add/schedule/list) plus search/capture/note new.
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 surface polish: qi remote group, bare-qi note surprise, note-search dupe, cobra Examples

1 participant