Skip to content

Add interactive tern-cli package and dashboard handler snippet support#9

Merged
Prateek32177 merged 3 commits intomainfrom
codex/enhance-cli-aesthetics-and-responsiveness
Mar 22, 2026
Merged

Add interactive tern-cli package and dashboard handler snippet support#9
Prateek32177 merged 3 commits intomainfrom
codex/enhance-cli-aesthetics-and-responsiveness

Conversation

@Prateek32177
Copy link
Contributor

Motivation

  • Provide an interactive CLI to guide users through webhook handler setup and local testing for the tern ecosystem.
  • Surface provider/framework context to the UI so the dashboard can offer ready-to-copy handler snippets.

Description

  • Introduces a new package @hookflo/tern-cli with an interactive wizard (src/wizard.ts), file generators (src/files.ts), tunnel orchestration (src/tunnel.ts), platform/framework templates (src/templates.ts) and small utilities (browser.ts, clipboard.ts, colors.ts, config.ts, index.ts) plus TypeScript types and tsconfig.json and README.md.
  • Adds handler templates and path generation logic for multiple platforms and frameworks and writes tern.config.json automatically with ensureConfig when needed.
  • Integrates CLI tunnel output with @hookflo/tern-dev and copies the public relay URL to the clipboard and prints a formatted box for easy provider configuration.
  • Extends core tern-dev to include platform and framework in TernConfig, exposes them via the UI status endpoint, and updates tern-config.schema.json accordingly.
  • Enhances the UI (src/ui/index.html) and client JS to detect provider headers, surface a snippet FAB/popup, generate framework-aware handler snippets, copy snippets to clipboard, and show snippet suggestions when events arrive.

Testing

  • Performed TypeScript typecheck for the new CLI package using tsc --noEmit -p packages/tern-cli/tsconfig.json, which completed successfully.
  • Ran the repository test suite (pnpm test) and existing tests passed after the changes.

Codex Task

@Hookflo Hookflo deleted a comment from chatgpt-codex-connector bot Mar 22, 2026
@Prateek32177 Prateek32177 merged commit 0b18d9b into main Mar 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant