Skip to content

Feature/auto completion cli #986

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

LanutiEmanuele
Copy link
Collaborator

@LanutiEmanuele LanutiEmanuele commented May 20, 2025

Description

This PR introduces autocompletion support in the CLI by replacing the official nubia package with a custom fork .

Previously, CLI commands like:

address show vrf=

would not provide any dynamic suggestions. Now, this command and others support real-time autocompletion for available options, improving user experience and CLI discoverability.

Key implementation details:

  • Replaced nubia with a custom fork.

  • Modified several CLI functions to align with the fork structure.

  • Added autocompletion definitions and helper functions.

Type of change

New feature (non-breaking change which adds functionality)

New Behavior

When using the CLI, users can now trigger autocompletion on supported arguments and filters, Suggestions will appear based on available options.

Contrast to Current Behavior

Before:

  • CLI provided no completion support

After:

  • Autocompletion works dynamically for supported commands inside the CLI

Discussion: Benefits and Drawbacks

Benefits

  • Improves productivity and usability of CLI

  • Backward-compatible; does not impact command execution

Drawbacks

  • CLI functions refactored to support base class requirements

  • Requires Poetry environment update (poetry install) to fetch the fork

Proposed Release Note Entry

  • Added autocompletion support in the CLI
  • Switched from official nubia package to a custom fork

Comments

  • The autocompletion feature was tested manually and with automated tests.

  • Requires running poetry install after pulling the branch to ensure correct dependencies are installed (replaces standard nubia package).

  • Still writing tests

Double Check

  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR source branch is created from the develop branch.
  • My PR targets the develop branch.
  • All my commits have --signoff applied

Signed-off-by: Emanuele Lanuti <emanuele.lanuti@stardustsystems.net>
Signed-off-by: Emanuele Lanuti <emanuele.lanuti@stardustsystems.net>
Signed-off-by: Emanuele Lanuti <emanuele.lanuti@stardustsystems.net>
Signed-off-by: Emanuele Lanuti <emanuele.lanuti@stardustsystems.net>
Signed-off-by: Emanuele Lanuti <emanuele.lanuti@stardustsystems.net>
@LanutiEmanuele LanutiEmanuele force-pushed the feature/auto_completion_cli branch from fea8d7b to 76fbb42 Compare May 21, 2025 08:44
Copy link
Contributor

@rickstardust rickstardust left a comment

Choose a reason for hiding this comment

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

The auto-completion works indeed:
Schermata del 2025-05-23 12-12-47
Schermata del 2025-05-23 12-11-25

Signed-off-by: Emanuele Lanuti <emanuele.lanuti@stardustsystems.net>
@LanutiEmanuele LanutiEmanuele force-pushed the feature/auto_completion_cli branch from 71c48ae to 225dba8 Compare May 30, 2025 12:39
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.

4 participants