Skip to content

Update CLI to latest API#7

Merged
yosriady merged 5 commits into
mainfrom
chore/update-api
May 18, 2026
Merged

Update CLI to latest API#7
yosriady merged 5 commits into
mainfrom
chore/update-api

Conversation

@yosriady
Copy link
Copy Markdown
Contributor

@yosriady yosriady commented May 18, 2026


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new analytics command to the CLI, providing access to pre-built analytics pipes such as KPIs, funnels, and retention. It also updates the profiles search command to require typed paths for filter fields (e.g., users.net_worth_usd), as the API now ignores bare field names. Corresponding documentation updates were made to README.md and SKILLS.md, and comprehensive tests for the new analytics functionality were added. I have no feedback to provide.

yosriady and others added 4 commits May 18, 2026 15:52
The API is being updated so /v0/funnel and /v0/flow accept snake_case
date_from/date_to like every other pipe. Drop the CAMEL_DATE_PIPES
special-case so the CLI always sends snake_case, and remove the
now-unused `pipe` arg from buildAnalyticsParams.

Live funnel/flow integration tests are skipped until the API-side fix
deploys (production still only accepts camelCase for these two pipes,
so a snake_case call returns HTTP 400); the deterministic snake_case
unit test keeps the CLI behavior locked meanwhile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
incur renders flag definitions in kebab-case (--date-from, --order-by,
--tag-id, …) and that matches the Node/TS CLI ecosystem standard
(oclif/commander/yargs), but the docs and hand-written CLI strings used
camelCase, so a user copying from `formo <cmd> --help`'s flag list got a
form the docs didn't show.

Normalize every user-facing flag reference to kebab-case across README.md,
SKILLS.md, command describe()/hint/error strings, and update the test
assertions that matched the old camelCase error text. Both spellings still
work at runtime (incur accepts camelCase too); this is consistency only.

Known limitation: incur renders in-code `examples:` option keys verbatim
(camelCase) because they are type-bound to the zod schema, so the example
lines in `--help` remain camelCase. Not fixable without an incur change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…S pagination

- Patch incur (pnpm patchedDependencies, patches/incur.patch) so
  formatExamples() kebab-cases option keys like the flag-definition
  renderer already does — `--help` example lines now match the flag
  list (--order-by, --date-from, …) and so do generated skills/MCP.
- profiles search: validate --conditions field paths client-side.
  A bare/untyped field (e.g. "net_worth_usd") is silently ignored by
  the API and returns the entire unfiltered dataset; now it fails fast
  with an actionable error. Added parseSearchConditions() + tests.
- SKILLS.md: profiles search documented --limit/--offset but the CLI
  exposes --page/--size; corrected table and examples (matches README).

Addresses Codex review P1 (unenforced typed-path requirement) and
P2 (SKILLS.md pagination drift).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The earlier patch only fixed formatExamples(). Three other incur
renderers still emitted raw camelCase keys:

- Skill.js renderCommandBody(): the `--llms`/`--llms-full` Options
  tables (`| --triggerType |`) — agent-facing manifest.
- Help.js formatCommand(): explicit usage-pattern option lines.
- Cli.js formatCta(): suggested-command / error-CTA strings.

All now apply the same kebab transform, so every user- and
agent-facing flag surface (help, examples, manifest, skills, MCP,
CTAs) is consistent. patches/incur.patch now carries 4 hunks.

Verified: `--llms-full` option tables and `--help` examples both
kebab; build/lint pass; 87 passing / 0 failing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yosriady yosriady merged commit 9e36959 into main May 18, 2026
5 checks passed
@yosriady yosriady deleted the chore/update-api branch May 18, 2026 10:16
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.

1 participant