-
Notifications
You must be signed in to change notification settings - Fork 0
Development #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development #9
Conversation
… tagging, and releases.
…ures, and updated CLI options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enhances the nxt-gen-cli project by improving documentation, adding GitHub Packages publishing support, and making minor cosmetic cleanups. The changes aim to increase project visibility and provide clearer guidance for users.
Key changes include:
- Added GitHub Packages publishing workflow with dual registry support (npm + GitHub Packages)
- Completely revamped README.md with modern formatting, badges, improved feature descriptions, and clearer installation instructions
- Added
preferGlobal: trueto package.json to indicate global installation preference
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
.github/workflows/auto-publish.yml |
Added permissions for GitHub Packages and new publishing step with scoped package name configuration |
package.json |
Added preferGlobal: true field to indicate the package is intended for global installation |
README.md |
Complete documentation overhaul with centered header, badges, reorganized features section, and enhanced contribution guidelines |
src/templates/examples.ts |
Removed rocket emoji from generated template footer for cleaner appearance |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Configure npm to use GitHub Packages registry | ||
| echo "@PrabothCharith:registry=https://npm.pkg.github.com" > .npmrc | ||
| # Temporarily change the package name to the scoped version for GPR | ||
| npm pkg set name="@PrabothCharith/nxt-gen-cli" | ||
| # Publish using the GITHUB_TOKEN | ||
| npm publish |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GitHub Packages publishing step modifies package.json in place without cleanup, which could cause issues with subsequent workflow steps or runs. Additionally, the step doesn't set up authentication correctly for GitHub Packages registry. The NODE_AUTH_TOKEN environment variable is used, but npm should be configured to use the GitHub Packages registry before running npm publish. Consider using a dedicated .npmrc configuration step or reverting package.json changes after publishing.
| # Configure npm to use GitHub Packages registry | |
| echo "@PrabothCharith:registry=https://npm.pkg.github.com" > .npmrc | |
| # Temporarily change the package name to the scoped version for GPR | |
| npm pkg set name="@PrabothCharith/nxt-gen-cli" | |
| # Publish using the GITHUB_TOKEN | |
| npm publish | |
| # Backup original package.json | |
| cp package.json package.json.bak | |
| # Configure npm to use GitHub Packages registry with authentication | |
| cat <<EOF > .npmrc | |
| @PrabothCharith:registry=https://npm.pkg.github.com | |
| //npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} | |
| always-auth=true | |
| EOF | |
| # Temporarily change the package name to the scoped version for GitHub Packages | |
| npm pkg set name="@PrabothCharith/nxt-gen-cli" | |
| # Publish to GitHub Packages using the configured registry and token | |
| npm publish | |
| # Restore original package.json and clean up temporary config | |
| mv package.json.bak package.json | |
| rm .npmrc |
| ### GitHub Packages | ||
| ```bash |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The installation instructions for GitHub Packages are incomplete. The command shown will fail without first configuring npm to authenticate with GitHub Packages registry. Users need to either create an .npmrc file with authentication token or set up npm with GitHub authentication before running this command. Consider adding a note about authentication requirements or providing complete setup instructions.
| ### GitHub Packages | |
| ```bash | |
| ### GitHub Packages | |
| Before installing from GitHub Packages, configure npm with a token that has at least the `read:packages` scope: | |
| ```bash | |
| echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> ~/.npmrc | |
| ``` | |
| Then install the package: | |
| ```bash |
| ```bash | ||
| nxt-gen-cli my-project --orm prisma --react-query --axios --ui shadcn --framer-motion --lucide | ||
| # Create a full-stack app | ||
| npx nxt-gen-cli my-app --orm prisma --ui shadcn --auth next-auth --react-query --pnpm |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example command includes a '--pnpm' flag that is not documented in the CLI Options section below. This could confuse users who try to use this flag. Either add the '--pnpm' option to the CLI Options documentation or update the example to use only documented flags.
| npx nxt-gen-cli my-app --orm prisma --ui shadcn --auth next-auth --react-query --pnpm | |
| npx nxt-gen-cli my-app --orm prisma --ui shadcn --auth next-auth --react-query |
| # Configure npm to use GitHub Packages registry | ||
| echo "@PrabothCharith:registry=https://npm.pkg.github.com" > .npmrc |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The registry configuration overwrites the entire .npmrc file, which could remove the authentication token set by the 'setup-node' action in line 29-32. The setup-node action with 'registry-url' automatically creates an .npmrc with authentication. Instead of overwriting with '>', consider appending with '>>' or using 'npm config set' to preserve the existing authentication configuration.
| # Configure npm to use GitHub Packages registry | |
| echo "@PrabothCharith:registry=https://npm.pkg.github.com" > .npmrc | |
| # Configure npm to use GitHub Packages registry without overwriting existing .npmrc | |
| npm config set @PrabothCharith:registry "https://npm.pkg.github.com" |
This pull request updates the publishing workflow and significantly improves the documentation for
nxt-gen-cli. The changes enhance the project's visibility, make installation and usage instructions clearer, and add support for publishing to GitHub Packages. Additionally, minor improvements and cleanups have been made throughout the codebase and documentation.Documentation and Project Presentation Improvements:
README.mdwith a new header, badges, clearer installation and usage instructions, detailed feature breakdowns, and improved contribution guidelines. The documentation now better explains the CLI's capabilities, options, and project structure. [1] [2] [3]"preferGlobal": truetopackage.jsonto indicate that the CLI is intended for global installation.Publishing and Workflow Enhancements:
.github/workflows/auto-publish.ymlto add permissions and a new step for publishing the package to GitHub Packages, including configuration for the scoped package name. [1] [2]Minor Cleanups: