Skip to content

[failproofai] feat: unknown flag error with closest-match suggestion + v0.0.1-beta.2#16

Merged
NiveditJain merged 2 commits into
mainfrom
ef-16
Apr 7, 2026
Merged

[failproofai] feat: unknown flag error with closest-match suggestion + v0.0.1-beta.2#16
NiveditJain merged 2 commits into
mainfrom
ef-16

Conversation

@NiveditJain

@NiveditJain NiveditJain commented Apr 6, 2026

Copy link
Copy Markdown
Member

Summary

  • Unknown flags (e.g. --verison) no longer silently fall through to dashboard launch — the CLI now prints the unrecognized flag and suggests the closest known flag via Levenshtein distance, then exits with code 1
  • Bumped version from 0.0.1-beta.10.0.1-beta.2 in package.json

Test plan

  • failproofai --verisonUnknown flag: --verison / Did you mean: --version?, exits 1
  • failproofai --foo → suggests closest known flag, exits 1
  • failproofai --version → still prints version, exits 0
  • failproofai --install-policies → still works normally
  • failproofai (no args) → still launches dashboard

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Improved CLI error handling with helpful suggestions when unrecognized flags are entered.
  • Chores

    • Updated package version to 0.0.1-beta.2.

…0.0.1-beta.2

Unknown flags no longer silently fall through to dashboard launch.
The CLI now prints the unrecognized flag and suggests the closest
known flag via Levenshtein distance, then exits with code 1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 3bd8e3d2-3db8-4b01-98ba-63ffb5be9019

📥 Commits

Reviewing files that changed from the base of the PR and between ca824cc and 9bccc69.

📒 Files selected for processing (2)
  • bin/failproofai.mjs
  • package.json

📝 Walkthrough

Walkthrough

The pull request adds CLI validation to detect unknown flags in the command-line interface and suggests the closest matching known flag using Levenshtein distance. Additionally, the package version is incremented from 0.0.1-beta.1 to 0.0.1-beta.2.

Changes

Cohort / File(s) Summary
CLI Unknown-Flag Detection
bin/failproofai.mjs
Added validation block that detects unrecognized command-line flags, calculates Levenshtein distance to suggest the closest matching flag, outputs error messages, and exits with status code 1 before launching the dashboard.
Version Bump
package.json
Incremented package version from 0.0.1-beta.1 to 0.0.1-beta.2.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A tiny hop, a flag so bold,
"Did you mean?" now gently told,
Levenshtein's dance, so swift and bright,
Beta-two hops into the night!


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

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

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NiveditJain NiveditJain merged commit 4808361 into main Apr 7, 2026
@NiveditJain NiveditJain deleted the ef-16 branch April 7, 2026 00:31
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