fix: add headless mode validation and documentation#14
Open
Conversation
eportis-cloudinary
requested changes
May 7, 2026
Collaborator
eportis-cloudinary
left a comment
There was a problem hiding this comment.
Couple of tweaks; only important one is that I don't think we should check for --projectName, because the default (my-cloudinary-app) is used if you don't supply it.
| })); | ||
| } catch (e) { | ||
| console.error(chalk.red(`Error: ${e.message}`)); | ||
| console.error(chalk.gray('Tip: If a flag value starts with a dash, use --flag=value syntax (e.g., --cloudName=-myvalue)')); |
Collaborator
There was a problem hiding this comment.
Are cloud names or upload preset names allowed to start with a dash? At the very least, this feels kind of rare to show every time anyone encounters any error
|
|
||
| const errors = []; | ||
|
|
||
| if (!values.projectName) { |
Collaborator
There was a problem hiding this comment.
Not actually required, because of the default of my-cloudinary-app (we should still keep the "does the directory already exist" check though!)
| For CI/CD pipelines, scripts, or automated workflows, pass `--headless` along with all options as flags to skip the interactive prompts: | ||
|
|
||
| ```bash | ||
| npx create-cloudinary-react -- --headless \ |
Collaborator
There was a problem hiding this comment.
I think we don't need the --
| | `--startDev` | boolean | `false` | Start the dev server after install | | ||
| | `--packageManager` | string | *(auto-detected)* | `npm`, `pnpm`, `yarn`, or `bun` | | ||
|
|
||
| > **Note:** If a flag value starts with a dash, use `--flag=value` syntax (e.g. `--cloudName=-myvalue`). Shell variables should be quoted: `--cloudName "$CLOUD_NAME"`. |
Collaborator
There was a problem hiding this comment.
Ditto for my above note. Feels...rare.
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.
add headless mode validation and documentation