Command Suggestions
AI command autocomplete (inline ghost text accepted with Tab) and next-step suggestions based on your last command and its output.
Overview
NetStacks offers two AI-powered suggestion features inside the terminal. Both are optional, run on the LLM provider you configure, and are off the moment you toggle them off.
- Command Autocomplete — As you type, the AI predicts the command you are entering and renders the remainder as inline ghost text. Press
Tabto accept it orEscto dismiss it. This is controlled by theai.inlineSuggestionssetting. - Next Step Suggestions — After a command finishes and the device prompt returns, the AI analyzes the last command and its output, then shows a small “Suggested Next Steps” panel with up to three follow-up commands you can click to insert. This is controlled by the
ai.nextStepSuggestionssetting.
Both features pass recent terminal context to the LLM with a platform-aware prompt so suggestions match the device you are connected to (Linux/Unix or a network OS such as Cisco IOS, IOS-XR, NX-OS, Juniper Junos, Arista EOS, Palo Alto PAN-OS, or Fortinet FortiOS).
Suggestion prompts are sent through the same chat pipeline as AI Chat, so your configured sanitization rules (IP, MAC, hostname, username redaction, and custom regex patterns) apply before anything reaches the LLM provider. See AI Chat for how sanitization works.
Both features call your configured AI provider. If no provider is set up, suggestions simply do not appear (they fail silently). Configure a provider at LLM Configuration first.
Command Autocomplete
Command Autocomplete shows a single inline suggestion as ghost text to the right of your cursor — the same style as editor inline completions. Only the portion you have not typed yet is shown, and a small Tab hint appears next to it.
How it behaves
- Suggestions begin once you have typed at least 2 characters on the command line.
- Requests are debounced by about 300 ms after you stop typing, so the AI is not called on every keystroke.
- The suggestion only renders if it actually starts with what you have typed (case-insensitive). If it does not match, nothing is shown.
- Pressing
Enter(running the command) or pressingBackspaceback under 2 characters clears the suggestion.
Keyboard shortcuts
| Action | Key |
|---|---|
| Accept the inline suggestion | Tab |
| Dismiss the inline suggestion | Esc |
There is no manual trigger key and no way to cycle through alternatives — autocomplete offers one best guess at a time and updates it as you type. If a suggestion is not what you want, keep typing and it will refine itself.
Next Step Suggestions
When a command completes and the device prompt returns, NetStacks can suggest logical follow-up commands. These appear in a small Suggested Next Steps panel rather than as inline ghost text.
How it behaves
- Generation is triggered automatically after the prompt is detected following a command, using the last command and its recent output as context.
- Up to 3 suggestions are returned, after a roughly 500 ms debounce.
- Each suggestion has a category and a confidence level (see below).
- Click a suggestion to insert it; the panel then closes. As soon as you start typing your own command, the panel auto-dismisses. You can also dismiss it with the close (×) button.
Suggestion categories
- Verify
- Verify the result of what was just done.
- Related
- Explore related information.
- Diagnose
- Diagnose potential issues seen in the output.
- Document
- View the config or save output.
Confidence levels
Each suggestion is tagged high, medium, or low confidence, shown as a small indicator on the right of the row.
Platform Awareness (CLI Flavor)
Both suggestion features tailor their prompt to the device platform using the session’s CLI flavor. When set to auto, the AI infers from terminal output whether you are on a Linux/Unix shell or a network device CLI. You can also pin a flavor explicitly so suggestions are always scoped to the right syntax.
The supported CLI flavors are:
| Flavor value | Platform |
|---|---|
auto | Detect from terminal output |
linux | Linux/Unix bash shell |
cisco-ios | Cisco IOS / IOS-XE |
cisco-ios-xr | Cisco IOS-XR |
cisco-nxos | Cisco NX-OS |
juniper | Juniper Junos |
arista | Arista EOS |
paloalto | Palo Alto PAN-OS |
fortinet | Fortinet FortiOS |
If a device has a customized banner or prompt that confuses auto-detection, set the CLI flavor on the session so suggestions stay on the correct platform.
Settings & Model Selection
Both features are configured under the AI settings, in the AI Automation section. Each is a simple on/off toggle:
| Toggle | Setting key | Default |
|---|---|---|
| Command Autocomplete | ai.inlineSuggestions | On |
| Next Step Suggestions | ai.nextStepSuggestions | On |
The autocomplete toggle is labeled in the UI as “AI suggests commands as you type in terminals (uses API after 300ms debounce)”. There is no separate trigger-delay control — the 300 ms (autocomplete) and ~500 ms (next-step) debounces are fixed.
Which model is used
Command Autocomplete and Next Step Suggestions both use your default AI provider and model — there is no separate per-feature provider or model override for these two features (unlike the AI agent, which has its own override). Because suggestions favor speed over deep reasoning, picking a small, fast model as your default helps them feel responsive. See LLM Configuration for how to choose your default provider and model.
The AI Automation section notes that disabling these features reduces API usage and cost. Turn off autocomplete if you do not want a request fired shortly after you type, or turn off next-step suggestions if you do not want an extra call after each command completes.
Examples
Inline autocomplete (ghost text)
With the CLI flavor set to juniper, typing the start of a command shows the remainder as ghost text. Press Tab to accept it:
user@edge-rtr-01> show bgp sum▮ summary
└ ghost text; press Tab to accept ┘What the autocomplete request looks like under the hood
The autocomplete prompt asks the model to complete the partial command using recent session output, constrained to the detected/selected platform. The model must return JSON whose first item starts with exactly what you typed:
[
{
"command": "show bgp summary",
"description": "Display BGP neighbor summary and session states"
}
]Next-step suggestions response shape
After a command runs, the next-step feature requests up to three follow-ups as a JSON array. Each item has a command, a short reason, a confidence, and a category:
[
{
"command": "show ip bgp neighbors 10.0.2.2",
"description": "Inspect the neighbor that is stuck in Active state",
"confidence": "high",
"category": "troubleshoot"
},
{
"command": "ping 10.0.2.2 source loopback0",
"description": "Verify IP reachability to the neighbor",
"confidence": "medium",
"category": "verification"
},
{
"command": "show running-config | section router bgp",
"description": "Review the BGP configuration",
"confidence": "medium",
"category": "documentation"
}
]In the terminal these render as a clickable “Suggested Next Steps” panel; clicking a row inserts that command on the command line.
Same task, different platforms
Because the prompt is scoped to the CLI flavor, the suggested syntax differs by platform. For example, a BGP summary is expressed differently on Cisco IOS versus Juniper Junos:
cisco-ios → show ip bgp summary
cisco-nxos → show ip bgp summary
juniper → show bgp summary
arista → show ip bgp summary
paloalto → show routing protocol bgp summaryQuestions & Answers
- How do I accept an inline command suggestion?
- Press
Tab. The ghost text to the right of your cursor is inserted on the command line. PressEscto dismiss it instead. There is no key to cycle through multiple inline suggestions — autocomplete shows one best guess that updates as you type. - Is there a manual trigger or hotkey to summon suggestions?
- No. Inline autocomplete appears automatically once you have typed at least two characters (after a ~300 ms debounce), and next-step suggestions appear automatically after a command completes. There is no Cmd/Ctrl+Space or similar manual trigger.
- What is the difference between autocomplete and next-step suggestions?
- Command Autocomplete completes the command you are currently typing as inline ghost text. Next Step Suggestions wait until a command finishes, then propose follow-up commands in a separate clickable panel based on the command’s output.
- How do I turn suggestions off?
- In the AI settings, under the AI Automation section, toggle Command Autocomplete (
ai.inlineSuggestions) and/or Next Step Suggestions (ai.nextStepSuggestions) off. Disabling them reduces API usage. - Do suggestions work for non-Cisco platforms?
- Yes. The CLI flavor can be
auto,linux,cisco-ios,cisco-ios-xr,cisco-nxos,juniper,arista,paloalto, orfortinet. The prompt is scoped to that platform so the syntax matches. - Is my terminal output sent to the AI provider?
- Recent output is included as context so suggestions are relevant, but it passes through your configured sanitization rules first (IP, MAC, hostname, username redaction and custom regex patterns), exactly like AI Chat.
- Can I use a different (faster) model just for suggestions?
- Not separately — both suggestion features use your default AI provider and model, and there is no per-feature model override for them (only the AI agent has its own override). To make suggestions faster, set a small, fast model as your default at LLM Configuration.
Troubleshooting
| Issue | Likely cause | Resolution |
|---|---|---|
| No inline suggestions appear | Feature off, no LLM configured, or fewer than 2 characters typed | Confirm Command Autocomplete is on in AI settings, that a provider is configured at LLM Configuration, and type at least two characters. |
| Ghost text shows but Tab does nothing | Suggestion does not start with what you typed | Inline suggestions only render and accept when they begin with your current input. Keep typing so the suggestion refines, then press Tab. |
| No “Suggested Next Steps” panel after a command | Feature off, prompt not detected, or output captured before the prompt returned | Confirm Next Step Suggestions is on. The panel triggers once the device prompt returns after a command; unusual prompts can delay detection. |
| Suggestions use the wrong platform syntax | CLI flavor is auto and misdetected, or set incorrectly | Pin the session’s CLI flavor to the correct platform (for example cisco-nxos instead of relying on auto). |
| Suggestions feel slow | Large model or high provider latency | Set a smaller, faster model as your default provider/model in LLM Configuration (both features use the default). The built-in debounces (~300 ms / ~500 ms) are fixed and not configurable. |
Related Features
- AI Chat — Conversational assistance and the sanitization pipeline that suggestion prompts also use.
- LLM Configuration — Configure your AI providers and choose the default model that suggestions and next-step suggestions use.
- Quick Actions — Right-click terminal selections to explain, fix, or get command suggestions from the AI.
- Quick Prompts — Reusable prompt templates for common network tasks.
- Terminal Overview — The terminal environment where suggestions operate alongside your SSH sessions.
- Device Types — Supported platforms and how NetStacks identifies them.