Hey dev.to community! 👋
How much time do you spend re-typing the same kubectl, helm, argocd, terraform, or custom script commands every day? Switching contexts, finding resource names, managing environments... it often involves:
- Running one command to get an ID or name.
- Copying that output.
- Pasting it into the next command.
- Repeating. 😩
Aliases help, sure. k for kubectl is great, but it doesn’t solve the core problem of constantly tweaking arguments or chaining commands manually.
From Repetitive Typing to Interactive Templates
This is where IntelliShell changes the game. It’s a smart command-line assistant that lets you turn those repetitive commands into reusable, interactive templates.
Think…
Hey dev.to community! 👋
How much time do you spend re-typing the same kubectl, helm, argocd, terraform, or custom script commands every day? Switching contexts, finding resource names, managing environments... it often involves:
- Running one command to get an ID or name.
- Copying that output.
- Pasting it into the next command.
- Repeating. 😩
Aliases help, sure. k for kubectl is great, but it doesn’t solve the core problem of constantly tweaking arguments or chaining commands manually.
From Repetitive Typing to Interactive Templates
This is where IntelliShell changes the game. It’s a smart command-line assistant that lets you turn those repetitive commands into reusable, interactive templates.
Think of it like this: instead of typing kubectl logs -n my-namespace my-app-pod-123xyz --since 10m over and over, you save a template once:
# Bookmark this with Ctrl+B or 'intelli-shell new'
kubectl logs -n {{namespace}} {{pod}} --since {{time|5m}}
Now, when you need logs:
- Hit
Ctrl+Space(or your hotkey). - Type
kube logs(or even justlogs). - Select the template.
- IntelliShell prompts you for
namespace,pod, andtime.
The Magic: Variables & Smart Suggestions
IntelliShell makes this powerful through a few key features:
1. Variables
Any part of your command wrapped in {{ }} becomes a placeholder. IntelliShell guides you through filling them in.
2. Intelligent History
It remembers the values you use for each variable (my-namespace, my-app-pod-123xyz). Next time, those values are suggested first.
3. Context-Aware Ranking
Suggestions are ranked based on how often you use them and your current working directory. Running terraform apply -var-file=envs/{{env}}.tfvars in /project-a/ will prioritize staging if that’s what you used there most.
4. Dynamic Completions
You can even configure variables like {{pod}} to fetch suggestions live by running a background command (e.g., kubectl get pods -n <selected-namespace> -o name). No more get pods | grep my-app just to find the name!
Simplifying Multi-Step Workflows
Imagine common tasks with tools like Kubernetes, Helm, ArgoCD, Terraform, etc.:
Port Forwarding: IntelliShell remembers your common services and its ports.
kubectl port-forward -n {{namespace}} svc/{{service}} {{local_port}}:{{remote_port}}
Helm Upgrade: Easily switch releases and environments.
helm upgrade --install {{release_name}} {{chart}} -n {{namespace}} --values values-{{env}}.yaml
ArgoCD Sync: Quickly sync specific apps or branches.
argocd app sync {{app_name}} --revision {{branch|main}}
Executing in a Pod: Get a shell in the right pod without copy-pasting names.
kubectl exec -n {{namespace}} -it {{pod}} -- {{/bin/bash|sh}}
Terraform Plans/Applies: Avoid typos when targeting environments.
terraform {{plan|apply}} -var-file=envs/{{env}}.tfvars
Instead of chaining commands or digging through history, you trigger one template and fill in the blanks with smart suggestions. It drastically reduces typos and saves precious time.
Give it a Try
Ready to stop re-typing and start automating your common terminal tasks?
Check out IntelliShell on GitHub or follow the Book to get started.
Check Out Some Examples
After installing, a great way to see IntelliShell in action is to import some pre-made examples. Check out this sample Gist file for kubectl commands.
You can import them directly into your library with:
intelli-shell import --gist 137846d029efcc59468ff2c9d2098b4f/kubectl.sh
Now, try searching for kubectl commands using Ctrl+Space!