Skip to content

feat: add --project and --name CLI flags for setting project name#384

Open
austintgriffith wants to merge 1 commit intomainfrom
feature/add-project-name-flag
Open

feat: add --project and --name CLI flags for setting project name#384
austintgriffith wants to merge 1 commit intomainfrom
feature/add-project-name-flag

Conversation

@austintgriffith
Copy link

Summary

  • Adds --project, -p, and --name CLI flags to set the project name directly from the command line
  • Previously, project name could only be passed as a positional argument (npx create-eth my-project)
  • Now supports both positional and named flags for more explicit usage

Usage

# Positional (existing behavior, still works)
npx create-eth my-dapp

# Named flags (new)
npx create-eth --project my-dapp
npx create-eth -p my-dapp
npx create-eth --name my-dapp

This is useful for scripting and automation where named flags are clearer than positional arguments.

Test plan

  • yarn build succeeds
  • yarn cli --project testapp --solidity-framework foundry --skip-install creates project correctly
  • Positional argument still works: yarn cli testapp --solidity-framework foundry --skip-install
  • Help message (yarn cli --help) shows new options

Adds the ability to specify the project name via named flags in addition
to the existing positional argument support:

- `--project` / `-p` / `--name` flags to set the project name
- Updates help message to document the new options

This allows for more explicit CLI usage:
  npx create-eth --project my-dapp --solidity-framework foundry
Copy link
Collaborator

@technophile-04 technophile-04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useful for scripting and automation where named flags are clearer than positional arguments.

Just trying to understand, what error you get while using positional arg during scripting?

I am up for adding these flags, but I think all the major create- cli follow project name as positional arg only. Like create-next-app, create-vite app as well? Also since it's common pattern followed by other CLI's so AI might be good at it as well? So maybe we don't need this flag?

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.

2 participants