Skip to content

Conversation

@PrabothCharith
Copy link
Owner

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:

  • Revamped README.md with 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]
  • Added "preferGlobal": true to package.json to indicate that the CLI is intended for global installation.

Publishing and Workflow Enhancements:

  • Updated .github/workflows/auto-publish.yml to add permissions and a new step for publishing the package to GitHub Packages, including configuration for the scoped package name. [1] [2]
  • Improved release notes in the workflow to include GitHub Packages installation instructions and minor formatting adjustments. [1] [2]

Minor Cleanups:

  • Removed the rocket emoji from the generated footer in the example template for a cleaner look.

@PrabothCharith PrabothCharith self-assigned this Jan 2, 2026
Copilot AI review requested due to automatic review settings January 2, 2026 10:03
@PrabothCharith PrabothCharith added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 2, 2026
@github-project-automation github-project-automation bot moved this to Backlog in nxt-gen-cli Jan 2, 2026
@PrabothCharith PrabothCharith moved this from Backlog to Done in nxt-gen-cli Jan 2, 2026
@PrabothCharith PrabothCharith merged commit 04ea35b into main Jan 2, 2026
6 checks passed
Copy link

Copilot AI left a 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: true to 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.

Comment on lines +50 to +55
# 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
Copy link

Copilot AI Jan 2, 2026

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.

Suggested change
# 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

Copilot uses AI. Check for mistakes.
Comment on lines +84 to +85
### GitHub Packages
```bash
Copy link

Copilot AI Jan 2, 2026

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.

Suggested change
### 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

Copilot uses AI. Check for mistakes.
```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
Copy link

Copilot AI Jan 2, 2026

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Comment on lines +50 to +51
# Configure npm to use GitHub Packages registry
echo "@PrabothCharith:registry=https://npm.pkg.github.com" > .npmrc
Copy link

Copilot AI Jan 2, 2026

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.

Suggested change
# 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"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants