Update CLI to latest API#7
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Need help on this PR? Tag
@codesmithwith what you need.