Skip to content

Conversation

@AmirSa12
Copy link

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR introduces tab completion functionality for the nitro cli, improving developer experience by allowing shell(zsh, powershell, fish, bash) autocompletion for commands, options, values, and flags. With this PR, users can navigate available commands, options and values faster!

A small video of how this looks:

nuxi.mp4

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@AmirSa12 AmirSa12 requested a review from pi0 as a code owner October 13, 2025 10:45
@vercel
Copy link

vercel bot commented Oct 13, 2025

@AmirSa12 is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

const minifyOption = buildCommand.options.get("minify");
if (minifyOption) {
minifyOption.handler = (complete) => {
complete("true", "Enable minification");
Copy link
Member

Choose a reason for hiding this comment

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

Could we somehow integrate it with citty core to avoid custom logic for each arg? (we have an object of args with their meta)

Copy link
Author

Choose a reason for hiding this comment

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

Yes, that's what I'm trying to do.
There is an open PR that integrates tab with citty core:
unjs/citty#211

with this, we can avoid this part.

const presetOption = buildCommand.options.get("preset");
if (presetOption) {
presetOption.handler = (complete) => {
complete("node-server", "Node.js server");
Copy link
Member

Choose a reason for hiding this comment

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

(TODO for myself): List can come from auto gen file

@AmirSa12
Copy link
Author

Salam @pi0! I heard there were concerns about tab depending on the mri package. I just wanted to let you know that tab no longer depends on mri (tab now has zero dependencies), and I’ll be publishing a new version soon!
Thank you!

@pi0
Copy link
Member

pi0 commented Oct 16, 2025

Amazin @AmirSa12! I will also try to find some time moving citty PR forward to make it happen!

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