suzieq icon indicating copy to clipboard operation
suzieq copied to clipboard

Feature/auto completion cli

Open LanutiEmanuele opened this issue 5 months ago • 0 comments

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.
  • [x] I have explained my PR according to the information in the comments or in a linked issue.
  • [x] My PR source branch is created from the develop branch.
  • [x] My PR targets the develop branch.
  • [x] All my commits have --signoff applied

LanutiEmanuele avatar May 20 '25 14:05 LanutiEmanuele