Skip to content

Conversation

@gonengar
Copy link
Contributor

@gonengar gonengar commented Jan 28, 2026

Description

This PR adds documentation to AGENTS.md covering two critical patterns for CLI development: proper handling of non-TTY environments (CI/automated contexts) and user cancellation flows. These patterns ensure the CLI behaves correctly when run in piped output, automated scripts, or when users cancel interactive prompts.

Related Issue

None

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • Added section on handling user cancellation with @clack/prompts, emphasizing the use of CLIExitError(0) over process.exit(0)
  • Documented non-TTY environment detection pattern that sets CI=true to disable Clack animations
  • Enhanced error handling flow documentation to clarify that CLIExitError is passed through runCommand() without logging
  • Renumbered existing section 3 to section 4 to accommodate new content

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated AGENTS.md if I made architectural changes

Additional Notes

This documentation captures patterns implemented in commit 26b34d7, ensuring future contributors understand these important conventions for CLI reliability in different execution contexts.


🤖 Generated by Claude | 2026-01-28 20:35 UTC

Document patterns from commit 26b34d7:
- Non-TTY detection in entry points (sets CI=true for Clack)
- Proper user cancellation handling with CLIExitError(0)
- CLIExitError pass-through in runCommand

https://claude.ai/code/session_01GYHVhtq3sgn3LDJFN7V1qL
@github-actions
Copy link
Contributor

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.25-pr.152.43bb784

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.25-pr.152.43bb784"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.25-pr.152.43bb784"
  }
}

Preview published to npm registry — try new features instantly!

@gonengar gonengar requested a review from kfirstri January 28, 2026 20:30
@claude
Copy link

claude bot commented Jan 28, 2026


Code review

No issues found. Checked for bugs and CLAUDE.md compliance.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants