Skip to content

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Jan 8, 2026

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes #<replace_with_issue_number>

This PR updates the documentation for the netlify init command to accurately reflect its full scope, including its use for projects without continuous deployment or Git integration. It also adds examples to the command's help text.


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If youre fixing a typo or something thats on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)


Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Jan 8, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

📊 Benchmark results

Comparing with 669706a

  • Dependency count: 1,052 (no change)
  • Package size: 317 MB ⬆️ 0.00% increase vs. 669706a
  • Number of ts-expect-error directives: 372 (no change)

Copy link
Member Author

@serhalp serhalp left a comment

Choose a reason for hiding this comment

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

Comment on lines +27 to +29
'netlify init --manual',
'netlify init --force',
'netlify init --git-remote-name upstream',
Copy link
Member Author

Choose a reason for hiding this comment

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

Include inline 'comments' explaining what these examples do

Suggested change
'netlify init --manual',
'netlify init --force',
'netlify init --git-remote-name upstream',
'netlify init --manual # foo what does this mean',
'netlify init --force',
'netlify init --git-remote-name upstream',

.command('init')
.description(
'Configure continuous deployment for a new or existing project. To create a new project without continuous deployment, use `netlify sites:create`',
`Initialize a Netlify project in the current directory
Copy link
Member Author

Choose a reason for hiding this comment

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

Let's go with "Configure a new or existing Netlify project in the current directory"

And let's keep some mention of sites:create, but just not in the first line (which serves as the 'title'). Maybe near the bottom, after having explained everything that init does, call sites:create out as an alternative that does much less.

`Initialize a Netlify project in the current directory
Links this directory to a new or existing Netlify project and saves the project ID locally.
\`netlify init\` can be used with or without Git/continuous deployment.
Copy link
Member Author

Choose a reason for hiding this comment

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

Clarify this. Be more explicit. Assume the user is initializing their very first Netlify project, so they aren't familiar with these concepts.

Links this directory to a new or existing Netlify project and saves the project ID locally.
\`netlify init\` can be used with or without Git/continuous deployment.
The init command can:
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
The init command can:
The init command will:

If no Git remote is detected, you can still create a project and deploy manually with \`netlify deploy\`.`,
)
.option('-m, --manual', 'Manually configure a git remote for CI')
Copy link
Member Author

Choose a reason for hiding this comment

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

What exactly does this mean? When should it be used? Document this.

The init command can:
- Create a new Netlify project, or link to an existing one
- Add \`.netlify/\` to \`.gitignore\`
- Create or update \`netlify.toml\` with detected build settings (optional)
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
- Create or update \`netlify.toml\` with detected build settings (optional)
- Configure your project's build settings (optionally automatically)
- Create or update \`netlify.toml\` with these build settings (optional)

- Create a new Netlify project, or link to an existing one
- Add \`.netlify/\` to \`.gitignore\`
- Create or update \`netlify.toml\` with detected build settings (optional)
- Connect a Git repository for continuous deployment (optional)
Copy link
Member Author

Choose a reason for hiding this comment

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

Could this link to the relevant page in the Netlify docs?

- Create or update \`netlify.toml\` with detected build settings (optional)
- Connect a Git repository for continuous deployment (optional)
If no Git remote is detected, you can still create a project and deploy manually with \`netlify deploy\`.`,
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
If no Git remote is detected, you can still create a project and deploy manually with \`netlify deploy\`.`,

@serhalp serhalp changed the title Netlify init documentation update fix: improve init command help and docs Jan 8, 2026
@serhalp
Copy link
Member Author

serhalp commented Jan 8, 2026

hello @cursoragent please address the feedback

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.

3 participants