Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

feat: new style and prompts - #31

Merged
almeidazs merged 7 commits into
mainfrom
feat/better-cli
Jun 10, 2026
Merged

feat: new style and prompts#31
almeidazs merged 7 commits into
mainfrom
feat/better-cli

Conversation

@almeidazs

@almeidazs almeidazs commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Added interactive init command for project setup (providers, webhooks, DB, env).
    • Added --yes to generate to skip prompts and accept defaults.
    • trigger accepts event payload via stdin or --data.
    • listen and status now show CLI version and welcome banner.
  • Documentation

    • Expanded CLI docs to cover init, generate (first-run behavior, --yes), listen default port, and trigger stdin/data usage.
  • Chores

    • Updated CLI dependencies and ignore list.
  • Tests

    • Updated CLI tests to match new messages and client path handling.

@almeidazs almeidazs self-assigned this Jun 10, 2026
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
paymesh Ready Ready Preview, Comment Jun 10, 2026 2:16pm

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d9be1358-1a2f-4042-854d-a74a68b97c15

📥 Commits

Reviewing files that changed from the base of the PR and between b22ee14 and bcc48c6.

📒 Files selected for processing (3)
  • apps/web/.source/browser.ts
  • apps/web/.source/server.ts
  • apps/web/content/docs/reference/cli.mdx

📝 Walkthrough

Walkthrough

Adds an interactive paymesh init command and supporting modules (provider/db/framework detection, client/webhook code generation, env appending, package-manager installs). Enhances CLI UX (welcome banner, --yes, optional listen port, stdin trigger data), updates tests, web docs, and a small .gitignore entry.

Changes

Interactive Paymesh Project Initialization

Layer / File(s) Summary
Configuration and foundation modules
packages/cli/src/shared/providers.ts, packages/cli/src/shared/database.ts, packages/cli/src/shared/framework.ts, packages/cli/src/shared/generators.ts, packages/cli/src/shared/managers.ts, packages/cli/src/shared/env.ts, packages/cli/src/shared/stdin.ts, packages/cli/package.json
Provider metadata, database adapters, framework detection/webhook generation, client code generator, package-manager detection/install, .env append helper, stdin reader. @clack/prompts added to dependencies.
CLI version export and welcome styling
packages/cli/src/index.ts, packages/cli/src/lib/style.ts
Exports version from package.json and adds printWelcome ASCII banner renderer used by multiple commands.
Interactive init command implementation
packages/cli/src/commands/init.ts
New registerInitCommand that validates project, prompts for Paymesh install and env, selects/creates client file, optionally configures DB and provider, generates webhook handler and client code, queues writes, and installs deps unless --skip-install.
Existing command enhancements
packages/cli/src/commands/generate.ts, packages/cli/src/commands/listen.ts, packages/cli/src/commands/status.ts, packages/cli/src/commands/trigger.ts
generate adds --yes and first-run prompt flow; listen makes port optional (default 3000) and prints welcome; status prints welcome; trigger accepts payload via stdin or --data and updates parsing/validation paths.
Error message refinements
packages/cli/src/lib/utils.ts
Standardizes JSON parse/validation error messages to reference the input source (from ${param}).
Tests and validation
packages/cli/test/cli.test.ts
Updates expected CLI error messages and fixes test client module path resolution to use import.meta.url.
Web/docs registry and CLI docs
apps/web/.source/*, apps/web/content/docs/reference/cli.mdx
Reorders generated frontmatter imports/docs mapping and expands CLI docs to cover init, --yes, listen default port, and trigger stdin/data usage.
Misc edits
.gitignore
Adds client.ts to ignore list.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant InitCmd as "paymesh init"
  participant Prompts as "clack prompts"
  participant Generator as "generateClientCode / webhook generator"
  participant FS as "filesystem (mkdir/write/.env)"
  participant PkgMgr as "installDeps / pkg manager"

  User->>InitCmd: run init (with options)
  InitCmd->>Prompts: interactive prompts (install, PAYMESH_NAME, client path, DB, provider, webhook)
  Prompts-->>InitCmd: user responses
  InitCmd->>Generator: build client + webhook source
  Generator-->>InitCmd: generated code
  InitCmd->>FS: queue and write files (.ts, webhook, .env)
  FS-->>InitCmd: files written
  InitCmd->>PkgMgr: install scheduled deps (unless --skip-install)
  PkgMgr-->>InitCmd: install result
  InitCmd-->>User: completion message
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

documentation

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is entirely missing. The author provided no description despite a clear template being available with required sections. Add a description covering: what changes were made (new init command, prompts, styling), why they were added, related issues if any, and completion status of the checklist items
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'feat: new style and prompts' is vague and does not clearly convey the main scope of changes, which involve significant new CLI command implementations (init), major refactoring of existing commands, and new utility modules. Consider a more specific title that reflects the primary changes, such as 'feat: add init command and CLI prompts support' or 'feat: implement interactive init command with styling'
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/better-cli

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the enhancement New feature or request label Jun 10, 2026
@almeidazs
almeidazs merged commit b2963e7 into main Jun 10, 2026
12 of 13 checks passed
@almeidazs
almeidazs deleted the feat/better-cli branch June 10, 2026 14:18
@coderabbitai coderabbitai Bot added the documentation Improvements or additions to documentation label Jun 10, 2026
This was referenced Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant