fix: resolve CI test failure in output.py

- Fixed undefined 'tool' variable in display_history function
- Changed '[tool]' markup tag usage to proper Rich syntax
- All tests now pass (38/38 unit tests)
- Type checking passes with mypy --strict
This commit is contained in:
Auto User
2026-01-31 06:22:27 +00:00
commit 95459fb4c8
57 changed files with 9370 additions and 0 deletions

238
commands/docker.yaml Normal file
View File

@@ -0,0 +1,238 @@
version: "1.0"
description: Docker command patterns
patterns:
- name: list_containers
description: List running containers
patterns:
- list running containers
- show running containers
- list containers
- show all containers
- docker ps
template: docker ps
explanation: Lists all running containers with their IDs, images, and status.
- name: list_all_containers
description: List all containers including stopped ones
patterns:
- list all containers including stopped
- show all containers
- list all docker containers
template: docker ps -a
explanation: Lists all containers, including stopped ones.
- name: list_images
description: List Docker images
patterns:
- list docker images
- show images
- list images
- docker images
template: docker images
explanation: Lists all Docker images stored locally.
- name: run_container
description: Run a new container
patterns:
- run a container
- start a new container
- run docker container
- docker run
template: docker run -d --name {name} {image}
explanation: Starts a new detached container with the specified image.
- name: run_container_interactive
description: Run a container in interactive mode
patterns:
- run container interactively
- run container with terminal
- docker run -it
template: docker run -it --rm {image}
explanation: Runs a container interactively with a terminal.
- name: stop_container
description: Stop a running container
patterns:
- stop container
- stop docker container
- stop running container
template: docker stop {container}
explanation: Stops the specified running container.
- name: start_container
description: Start a stopped container
patterns:
- start container
- start docker container
template: docker start {container}
explanation: Starts a previously stopped container.
- name: remove_container
description: Remove a container
patterns:
- remove container
- delete container
- docker rm
template: docker rm {container}
explanation: Removes the specified container.
- name: remove_container_force
description: Force remove a running container
patterns:
- force remove container
- delete container forcefully
- remove container force
template: docker rm -f {container}
explanation: Forcefully removes a running container.
- name: remove_image
description: Remove a Docker image
patterns:
- remove image
- delete image
- docker rmi
template: docker rmi {image}
explanation: Removes the specified Docker image.
- name: pull_image
description: Pull a Docker image
patterns:
- pull image
- download image
- docker pull
template: docker pull {image}
explanation: Pulls a Docker image from the registry.
- name: build_image
description: Build a Docker image from Dockerfile
patterns:
- build image
- build docker image
- docker build
template: docker build -t {tag} .
explanation: Builds a Docker image tagged with the specified name.
- name: push_image
description: Push an image to registry
patterns:
- push image
- push to registry
- docker push
template: docker push {image}
explanation: Pushes a Docker image to the registry.
- name: container_logs
description: View container logs
patterns:
- view logs
- container logs
- docker logs
template: docker logs -f {container}
explanation: Shows logs from the specified container.
- name: exec_container
description: Execute command in container
patterns:
- exec into container
- run command in container
- docker exec
template: docker exec -it {container} {command}
explanation: Executes a command inside a running container.
- name: inspect_container
description: Inspect container details
patterns:
- inspect container
- container details
- docker inspect
template: docker inspect {container}
explanation: Shows detailed information about a container.
- name: container_stats
description: Show container resource usage
patterns:
- container stats
- resource usage
- docker stats
template: docker stats
explanation: Shows live resource usage statistics for containers.
- name: prune_containers
description: Remove stopped containers
patterns:
- prune containers
- cleanup containers
- remove stopped containers
template: docker container prune -f
explanation: Removes all stopped containers.
- name: prune_images
description: Remove unused images
patterns:
- prune images
- cleanup images
- remove unused images
template: docker image prune -f
explanation: Removes unused (dangling) images.
- name: prune_all
description: Remove all unused resources
patterns:
- prune all
- cleanup everything
- docker system prune
template: docker system prune -af
explanation: Removes all stopped containers, unused networks, and dangling images.
- name: docker_compose_up
description: Start services with docker-compose
patterns:
- docker compose up
- start services
- docker-compose up
template: docker-compose up -d
explanation: Starts all services defined in docker-compose.yml.
- name: docker_compose_down
description: Stop services with docker-compose
patterns:
- docker compose down
- stop services
- docker-compose down
template: docker-compose down
explanation: Stops and removes all services defined in docker-compose.yml.
- name: docker_compose_logs
description: View docker-compose logs
patterns:
- compose logs
- docker compose logs
- docker-compose logs
template: docker-compose logs -f
explanation: Shows logs from all compose services.
- name: docker_compose_build
description: Build docker-compose services
patterns:
- compose build
- docker compose build
- docker-compose build
template: docker-compose build
explanation: Builds all services defined in docker-compose.yml.
- name: network_list
description: List Docker networks
patterns:
- list networks
- docker network ls
template: docker network ls
explanation: Lists all Docker networks.
- name: volume_list
description: List Docker volumes
patterns:
- list volumes
- docker volume ls
template: docker volume ls
explanation: Lists all Docker volumes.

559
commands/git.yaml Normal file
View File

@@ -0,0 +1,559 @@
version: "1.0"
description: Git command patterns
patterns:
- name: git_init
description: Initialize a new git repository
patterns:
- initialize git
- start git repo
- git init
template: git init
explanation: Initializes a new Git repository in the current directory.
- name: git_clone
description: Clone a repository
patterns:
- clone repository
- clone repo
- git clone
template: git clone {url}
explanation: Clones a remote repository to the local machine.
- name: git_clone_branch
description: Clone a specific branch
patterns:
- clone branch
- git clone branch
template: git clone -b {branch} {url}
explanation: Clones a specific branch from a repository.
- name: git_status
description: Show working tree status
patterns:
- git status
- check status
- show changes
template: git status
explanation: Shows the current status of the working directory.
- name: git_add
description: Add file contents to index
patterns:
- add file
- stage file
- git add
template: git add {file}
explanation: Adds file contents to the staging area.
- name: git_add_all
description: Add all changes to index
patterns:
- add all
- stage all
- git add .
template: git add .
explanation: Adds all changes to the staging area.
- name: git_add_pattern
description: Add files matching pattern
patterns:
- add pattern
- git add glob
template: git add '{pattern}'
explanation: Adds all files matching the glob pattern.
- name: git_commit
description: Commit changes
patterns:
- commit changes
- make commit
- git commit
template: git commit -m "{message}"
explanation: Records changes in the repository with a message.
- name: git_commit_amend
description: Amend last commit
patterns:
- amend commit
- modify last commit
- git commit --amend
template: git commit --amend -m "{message}"
explanation: Modifies the last commit with new changes or message.
- name: git_commit_amend_no_msg
description: Amend last commit without changing message
patterns:
- amend without message
- git commit amend
template: git commit --amend --no-edit
explanation: Adds changes to the last commit without changing the message.
- name: git_push
description: Push changes to remote
patterns:
- push changes
- git push
template: git push origin {branch}
explanation: Pushes commits to the remote repository.
- name: git_push_tags
description: Push tags to remote
patterns:
- push tags
- git push tags
template: git push origin --tags
explanation: Pushes all tags to the remote repository.
- name: git_push_force
description: Force push changes
patterns:
- force push
- overwrite remote
- git push --force
template: git push --force origin {branch}
explanation: Force pushes changes, overwriting remote history.
- name: git_pull
description: Fetch and integrate changes
patterns:
- pull changes
- git pull
template: git pull origin {branch}
explanation: Fetches and merges changes from remote.
- name: git_pull_rebase
description: Pull with rebase
patterns:
- pull with rebase
- git pull rebase
template: git pull --rebase origin {branch}
explanation: Fetches and rebases changes on top of local commits.
- name: git_fetch
description: Fetch remote changes
patterns:
- fetch changes
- git fetch
template: git fetch origin
explanation: Fetches changes from remote without merging.
- name: git_fetch_all
description: Fetch from all remotes
patterns:
- fetch all
- git fetch --all
template: git fetch --all
explanation: Fetches changes from all remotes.
- name: git_branch
description: List branches
patterns:
- list branches
- show branches
- git branch
template: git branch
explanation: Lists all local branches.
- name: git_branch_remote
description: List remote branches
patterns:
- remote branches
- git branch -r
template: git branch -r
explanation: Lists all remote branches.
- name: git_branch_all
description: List all branches
patterns:
- all branches
- git branch -a
template: git branch -a
explanation: Lists all local and remote branches.
- name: git_checkout
description: Switch to a branch
patterns:
- switch branch
- checkout branch
- git checkout
template: git checkout {branch}
explanation: Switches to the specified branch.
- name: git_checkout_new
description: Create and switch to new branch
patterns:
- create branch
- new branch
- git checkout -b
template: git checkout -b {branch}
explanation: Creates a new branch and switches to it.
- name: git_checkout_file
description: Discard changes to a file
patterns:
- discard file changes
- checkout file
- git checkout -- file
template: git checkout -- {file}
explanation: Discards local changes to a file.
- name: git_merge
description: Merge a branch
patterns:
- merge branch
- git merge
template: git merge {branch}
explanation: Merges the specified branch into current branch.
- name: git_merge_no_ff
description: Merge with no fast-forward
patterns:
- merge no fast forward
- git merge --no-ff
template: git merge --no-ff {branch}
explanation: Creates a merge commit even if fast-forward is possible.
- name: git_merge_abort
description: Abort merge
patterns:
- abort merge
- git merge --abort
template: git merge --abort
explanation: Aborts the current merge.
- name: git_rebase
description: Rebase onto a branch
patterns:
- rebase
- git rebase
template: git rebase {branch}
explanation: Rebases current branch onto the specified branch.
- name: git_rebase_interactive
description: Interactive rebase
patterns:
- interactive rebase
- git rebase -i
template: git rebase -i {commit}
explanation: Starts an interactive rebase to edit commits.
- name: git_rebase_continue
description: Continue rebase
patterns:
- continue rebase
- git rebase --continue
template: git rebase --continue
explanation: Continues rebase after resolving conflicts.
- name: git_rebase_abort
description: Abort rebase
patterns:
- abort rebase
- git rebase --abort
template: git rebase --abort
explanation: Aborts the current rebase.
- name: git_log
description: Show commit history
patterns:
- show history
- git log
template: git log --oneline
explanation: Shows commit history in a compact format.
- name: git_log_detailed
description: Show detailed commit history
patterns:
- detailed log
- git log full
template: git log
explanation: Shows detailed commit history.
- name: git_log_graph
description: Show commit history with graph
patterns:
- graph log
- git log graph
template: git log --oneline --graph --all
explanation: Shows commit history with a text-based graph.
- name: git_log_stat
description: Show commit history with stats
patterns:
- log with stats
- git log --stat
template: git log --stat
explanation: Shows commit history with file change statistics.
- name: git_diff
description: Show changes between commits
patterns:
- show diff
- git diff
template: git diff
explanation: Shows uncommitted changes.
- name: git_diff_staged
description: Show staged changes
patterns:
- staged diff
- git diff --cached
template: git diff --cached
explanation: Shows staged changes in the index.
- name: git_diff_branch
description: Compare branches
patterns:
- diff branches
- compare branches
template: git diff {branch1} {branch2}
explanation: Shows differences between two branches.
- name: git_show
description: Show a commit
patterns:
- show commit
- git show
template: git show {commit}
explanation: Shows details of a specific commit.
- name: git_stash
description: Stash changes
patterns:
- stash changes
- git stash
template: git stash
explanation: Temporarily shelves changes.
- name: git_stash_save
description: Stash changes with message
patterns:
- stash with message
- git stash save
template: git stash save "{message}"
explanation: Stashes changes with a descriptive message.
- name: git_stash_list
description: List stashed changes
patterns:
- stash list
- git stash list
template: git stash list
explanation: Lists all stashed changes.
- name: git_stash_pop
description: Apply and remove stashed changes
patterns:
- stash pop
- git stash pop
template: git stash pop
explanation: Applies stashed changes and removes from stash.
- name: git_stash_apply
description: Apply stashed changes
patterns:
- stash apply
- git stash apply
template: git stash apply
explanation: Applies stashed changes without removing them.
- name: git_stash_drop
description: Drop a stash
patterns:
- drop stash
- git stash drop
template: git stash drop
explanation: Removes a stashed change.
- name: git_tag
description: Create a tag
patterns:
- create tag
- git tag
template: git tag {tag_name}
explanation: Creates a tag at the current commit.
- name: git_tag_annotated
description: Create an annotated tag
patterns:
- annotated tag
- git tag -a
template: git tag -a {tag_name} -m "{message}"
explanation: Creates an annotated tag with a message.
- name: git_tag_delete
description: Delete a tag
patterns:
- delete tag
- git tag -d
template: git tag -d {tag_name}
explanation: Deletes a local tag.
- name: git_remote_add
description: Add a remote
patterns:
- add remote
- git remote add
template: git remote add origin {url}
explanation: Adds a new remote repository.
- name: git_remote_remove
description: Remove a remote
patterns:
- remove remote
- git remote remove
template: git remote remove origin
explanation: Removes a remote repository.
- name: git_remote_set_url
description: Change remote URL
patterns:
- set remote url
- git remote set-url
template: git remote set-url origin {url}
explanation: Changes the URL of a remote.
- name: git_remote_show
description: Show remote details
patterns:
- show remote
- git remote -v
template: git remote -v
explanation: Shows remote URLs with names.
- name: git_clean
description: Remove untracked files
patterns:
- clean untracked
- git clean
template: git clean -fd
explanation: Removes untracked files and directories.
- name: git_reset
description: Reset current HEAD
patterns:
- reset head
- git reset
template: git reset HEAD
explanation: Unstages changes but keeps them.
- name: git_reset_hard
description: Hard reset to commit
patterns:
- hard reset
- git reset --hard
template: git reset --hard {commit}
explanation: Resets to a commit, discarding all changes.
- name: git_reset_soft
description: Soft reset to commit
patterns:
- soft reset
- git reset --soft
template: git reset --soft {commit}
explanation: Resets to a commit but keeps changes staged.
- name: git_config_global
description: Set global git config
patterns:
- set git config
- git config global
template: git config --global {key} "{value}"
explanation: Sets a global Git configuration value.
- name: git_config_local
description: Set local git config
patterns:
- set local config
- git config local
template: git config --local {key} "{value}"
explanation: Sets a local Git configuration value.
- name: git_config_show
description: Show git config
patterns:
- show git config
- git config list
template: git config --list
explanation: Lists all Git configuration settings.
- name: git_grep
description: Search for a pattern
patterns:
- search code
- git grep
template: git grep "{pattern}"
explanation: Searches for a pattern in tracked files.
- name: git_blame
description: Show blame for a file
patterns:
- blame file
- git blame
template: git blame {file}
explanation: Shows who modified each line of a file.
- name: git_cherry_pick
description: Apply a commit
patterns:
- cherry pick
- git cherry-pick
template: git cherry-pick {commit}
explanation: Applies the changes from a specific commit.
- name: git_bisect_start
description: Start bisect session
patterns:
- start bisect
- git bisect
template: git bisect start
explanation: Starts a binary search for bugs.
- name: git_bisect_good
description: Mark commit as good
patterns:
- mark good
- git bisect good
template: git bisect good
explanation: Marks the current commit as good for bisect.
- name: git_bisect_bad
description: Mark commit as bad
patterns:
- mark bad
- git bisect bad
template: git bisect bad
explanation: Marks the current commit as bad for bisect.
- name: git_bisect_reset
description: Reset bisect
patterns:
- reset bisect
- git bisect reset
template: git bisect reset
explanation: Resets the bisect session.
- name: git_submodule_add
description: Add a submodule
patterns:
- add submodule
- git submodule add
template: git submodule add {url} {path}
explanation: Adds a Git repository as a submodule.
- name: git_submodule_update
description: Update submodules
patterns:
- update submodules
- git submodule update
template: git submodule update --init --recursive
explanation: Initializes and updates all submodules.
- name: git_submodule_status
description: Check submodule status
patterns:
- submodule status
- git submodule status
template: git submodule status
explanation: Shows the status of submodules.

354
commands/kubectl.yaml Normal file
View File

@@ -0,0 +1,354 @@
version: "1.0"
description: kubectl command patterns
patterns:
- name: get_pods
description: List pods in a namespace
patterns:
- list pods
- get pods
- show pods
- kubectl get pods
template: kubectl get pods -n {namespace}
explanation: Lists all pods in the specified namespace.
- name: get_all_pods
description: List all pods in all namespaces
patterns:
- list all pods
- get all pods
- kubectl get pods -A
template: kubectl get pods -A
explanation: Lists all pods across all namespaces.
- name: get_pod_details
description: Get detailed pod information
patterns:
- pod details
- describe pod
- kubectl describe pod
template: kubectl describe pod {pod_name} -n {namespace}
explanation: Shows detailed information about a specific pod.
- name: get_pod_yaml
description: Get pod YAML configuration
patterns:
- pod yaml
- get pod yaml
- kubectl get pod -o yaml
template: kubectl get pod {pod_name} -n {namespace} -o yaml
explanation: Returns the YAML configuration for a pod.
- name: delete_pod
description: Delete a pod
patterns:
- delete pod
- remove pod
- kubectl delete pod
template: kubectl delete pod {pod_name} -n {namespace}
explanation: Deletes the specified pod.
- name: delete_pod_force
description: Force delete a pod
patterns:
- force delete pod
- delete pod immediately
template: kubectl delete pod {pod_name} -n {namespace} --grace-period=0 --force
explanation: Forcefully deletes a pod without waiting for graceful termination.
- name: get_deployments
description: List deployments
patterns:
- list deployments
- get deployments
- kubectl get deployments
template: kubectl get deployments -n {namespace}
explanation: Lists all deployments in the namespace.
- name: get_deployment
describe: Get deployment details
patterns:
- deployment details
- describe deployment
template: kubectl describe deployment {name} -n {namespace}
explanation: Shows detailed information about a deployment.
- name: scale_deployment
description: Scale a deployment
patterns:
- scale deployment
- set replicas
- kubectl scale
template: kubectl scale deployment {name} --replicas={replicas} -n {namespace}
explanation: Scales a deployment to the specified number of replicas.
- name: rollout_status
description: Check deployment rollout status
patterns:
- rollout status
- deployment status
- kubectl rollout status
template: kubectl rollout status deployment/{name} -n {namespace}
explanation: Shows the rollout status of a deployment.
- name: rollout_restart
description: Restart a deployment
patterns:
- restart deployment
- rollout restart
- kubectl rollout restart
template: kubectl rollout restart deployment/{name} -n {namespace}
explanation: Triggers a rolling restart of a deployment.
- name: rollout_undo
description: Undo deployment rollout
patterns:
- undo rollout
- rollback deployment
- kubectl rollout undo
template: kubectl rollout undo deployment/{name} -n {namespace}
explanation: Rolls back a deployment to the previous revision.
- name: get_services
description: List services
patterns:
- list services
- get services
- kubectl get services
template: kubectl get services -n {namespace}
explanation: Lists all services in the namespace.
- name: describe_service
description: Describe a service
patterns:
- service details
- describe service
template: kubectl describe service {name} -n {namespace}
explanation: Shows detailed information about a service.
- name: get_configmaps
description: List configmaps
patterns:
- list configmaps
- get configmaps
- kubectl get configmap
template: kubectl get configmaps -n {namespace}
explanation: Lists all configmaps in the namespace.
- name: get_secrets
description: List secrets
patterns:
- list secrets
- get secrets
- kubectl get secrets
template: kubectl get secrets -n {namespace}
explanation: Lists all secrets in the namespace.
- name: get_namespaces
description: List namespaces
patterns:
- list namespaces
- get namespaces
- kubectl get namespaces
template: kubectl get namespaces
explanation: Lists all namespaces in the cluster.
- name: create_namespace
description: Create a namespace
patterns:
- create namespace
- new namespace
template: kubectl create namespace {namespace}
explanation: Creates a new namespace.
- name: use_namespace
description: Set current namespace
patterns:
- switch namespace
- use namespace
- kubens
template: kubectl config set-context --current --namespace={namespace}
explanation: Sets the current namespace for kubectl context.
- name: apply_config
description: Apply a configuration file
patterns:
- apply config
- apply yaml
- kubectl apply
template: kubectl apply -f {file}
explanation: Applies a configuration from a YAML file.
- name: apply_kustomize
description: Apply a kustomization
patterns:
- apply kustomize
- kustomize apply
template: kubectl apply -k {directory}
explanation: Applies a kustomization from a directory.
- name: get_events
description: Get cluster events
patterns:
- get events
- list events
- kubectl get events
template: kubectl get events --sort-by='.lastTimestamp'
explanation: Lists all events in the cluster.
- name: get_nodes
description: List cluster nodes
patterns:
- list nodes
- get nodes
- kubectl get nodes
template: kubectl get nodes
explanation: Lists all nodes in the cluster.
- name: describe_node
description: Describe a node
patterns:
- node details
- describe node
template: kubectl describe node {node_name}
explanation: Shows detailed information about a node.
- name: get_logs
description: Get pod logs
patterns:
- get logs
- pod logs
- kubectl logs
template: kubectl logs {pod_name} -n {namespace}
explanation: Retrieves logs from a pod.
- name: get_logs_follow
description: Follow pod logs
patterns:
- follow logs
- tail logs
- kubectl logs -f
template: kubectl logs -f {pod_name} -n {namespace}
explanation: Follows logs from a pod in real-time.
- name: get_logs_container
description: Get logs from specific container
patterns:
- logs container
- kubectl logs container
template: kubectl logs {pod_name} -c {container} -n {namespace}
explanation: Retrieves logs from a specific container in a pod.
- name: exec_pod
description: Execute command in pod
patterns:
- exec into pod
- kubectl exec
template: kubectl exec -it {pod_name} -n {namespace} -- {command}
explanation: Executes a command in a pod.
- name: port_forward
description: Port forward to pod
patterns:
- port forward
- forward port
- kubectl port-forward
template: kubectl port-forward {pod_name} {local_port}:{remote_port} -n {namespace}
explanation: Forwards a local port to a pod.
- name: get_statefulsets
description: List statefulsets
patterns:
- list statefulsets
- get statefulsets
template: kubectl get statefulsets -n {namespace}
explanation: Lists all statefulsets in the namespace.
- name: get_ingresses
description: List ingresses
patterns:
- list ingresses
- get ingresses
template: kubectl get ingresses -n {namespace}
explanation: Lists all ingresses in the namespace.
- name: get_hpa
description: List horizontal pod autoscalers
patterns:
- list hpa
- get hpa
template: kubectl get hpa -n {namespace}
explanation: Lists all HPA resources in the namespace.
- name: top_pods
description: Show pod resource usage
patterns:
- top pods
- pod metrics
- kubectl top pods
template: kubectl top pods -n {namespace}
explanation: Shows CPU and memory usage for pods.
- name: top_nodes
description: Show node resource usage
patterns:
- top nodes
- node metrics
template: kubectl top nodes
explanation: Shows CPU and memory usage for nodes.
- name: cluster_info
description: Show cluster information
patterns:
- cluster info
- cluster details
template: kubectl cluster-info
explanation: Shows information about the cluster.
- name: cluster_contexts
description: List kubeconfig contexts
patterns:
- list contexts
- get contexts
template: kubectl config get-contexts
explanation: Lists all contexts in the kubeconfig.
- name: current_context
description: Show current context
patterns:
- current context
- show context
template: kubectl config current-context
explanation: Shows the current context.
- name: switch_context
description: Switch context
patterns:
- switch context
- use context
template: kubectl config use-context {context}
explanation: Switches to the specified context.
- name: get_all
description: Get all resources in namespace
patterns:
- get all
- list all resources
template: kubectl get all -n {namespace}
explanation: Lists all resources (pods, services, deployments) in the namespace.
- name: diff_config
description: Diff configuration against cluster
patterns:
- diff config
- kubectl diff
template: kubectl diff -f {file}
explanation: Shows differences between local config and cluster config.
- name: explain_resource
description: Explain resource fields
patterns:
- explain resource
- kubectl explain
template: kubectl explain {resource}
explanation: Explains the fields of a resource.

789
commands/unix.yaml Normal file
View File

@@ -0,0 +1,789 @@
version: "1.0"
description: Unix command patterns
patterns:
- name: list_files
description: List directory contents
patterns:
- list files
- list directory
- ls
- show files
template: ls -la
explanation: Lists all files including hidden ones with details.
- name: list_files_simple
description: List files simply
patterns:
- simple list
- basic ls
template: ls
explanation: Lists files in the current directory.
- name: change_directory
description: Change directory
patterns:
- change directory
- go to directory
- cd
template: cd {path}
explanation: Changes the current working directory.
- name: go_home
description: Go to home directory
patterns:
- go home
- home directory
template: cd ~
explanation: Changes to the home directory.
- name: go_previous
description: Go to previous directory
patterns:
- go back
- previous directory
template: cd -
explanation: Changes to the previous working directory.
- name: print_working_directory
description: Print working directory
patterns:
- print directory
- pwd
- current path
template: pwd
explanation: Prints the current working directory path.
- name: make_directory
description: Create a directory
patterns:
- make directory
- create folder
- mkdir
template: mkdir -p {path}
explanation: Creates a directory (and parent directories if needed).
- name: remove_file
description: Remove a file
patterns:
- remove file
- delete file
- rm
template: rm {file}
explanation: Removes a file.
- name: remove_directory
description: Remove a directory
patterns:
- remove directory
- delete folder
- rmdir
template: rm -rf {path}
explanation: Removes a directory and its contents.
- name: copy_file
description: Copy a file
patterns:
- copy file
- cp
template: cp {source} {destination}
explanation: Copies a file to the destination.
- name: copy_directory
description: Copy a directory
patterns:
- copy directory
- cp -r
template: cp -r {source} {destination}
explanation: Copies a directory recursively.
- name: move_file
description: Move or rename a file
patterns:
- move file
- rename file
- mv
template: mv {source} {destination}
explanation: Moves or renames a file or directory.
- name: view_file
description: View file contents
patterns:
- view file
- cat
- show file
template: cat {file}
explanation: Displays file contents.
- name: view_file_paged
description: View file with paging
patterns:
- less file
- more file
template: less {file}
explanation: Views file with scroll capability.
- name: head_file
description: View file head
patterns:
- head file
- first lines
template: head -n {lines} {file}
explanation: Shows the first N lines of a file.
- name: tail_file
description: View file tail
patterns:
- tail file
- last lines
template: tail -n {lines} {file}
explanation: Shows the last N lines of a file.
- name: follow_tail
description: Follow file changes
patterns:
- follow tail
- tail -f
template: tail -f {file}
explanation: Shows the last lines of a file and follows changes.
- name: search_file
description: Search for text in files
patterns:
- search text
- grep
- find text
template: grep -r "{pattern}" .
explanation: Searches for a pattern recursively in files.
- name: search_case_insensitive
description: Search case-insensitively
patterns:
- search case insensitive
- grep -i
template: grep -ri "{pattern}" .
explanation: Searches for a pattern case-insensitively.
- name: search_files_only
description: List matching files only
patterns:
- find files with text
- grep -l
template: grep -rl "{pattern}" .
explanation: Lists files containing the pattern.
- name: search_count
description: Count matching lines
patterns:
- count matches
- grep -c
template: grep -rc "{pattern}" .
explanation: Counts lines matching the pattern.
- name: find_files
description: Find files by name
patterns:
- find file
- locate file
template: find . -name "{pattern}"
explanation: Finds files by name pattern.
- name: find_files_type
description: Find files by type
patterns:
- find by type
- find directories
template: find . -type {type}
explanation: Finds files of a specific type (f=file, d=directory).
- name: find_executable
description: Find executable
patterns:
- which command
- locate executable
template: which {command}
explanation: Shows the location of a command.
- name: find_executable_all
description: Find all executables
patterns:
- whereis command
- find binary
template: whereis {command}
explanation: Shows binary, source, and manual locations.
- name: file_info
description: Show file information
patterns:
- file info
- file type
template: file {file}
explanation: Shows file type information.
- name: disk_usage
description: Show disk usage
patterns:
- disk usage
- du
template: du -sh {path}
explanation: Shows disk usage of a directory.
- name: disk_usage_all
description: Show disk usage for all
patterns:
- disk usage all
- du -h
template: du -h
explanation: Shows disk usage for all directories.
- name: disk_usage_sorted
description: Show disk usage sorted
patterns:
- du sorted
- largest directories
template: du -h | sort -rh | head -n {n}
explanation: Shows largest directories sorted by size.
- name: free_memory
description: Show memory usage
patterns:
- memory usage
- free memory
template: free -h
explanation: Shows memory and swap usage.
- name: cpu_info
description: Show CPU info
patterns:
- cpu info
- processor info
template: lscpu
explanation: Shows detailed CPU information.
- name: process_list
description: List processes
patterns:
- list processes
- show processes
- ps
template: ps aux
explanation: Lists all running processes.
- name: process_tree
description: List process tree
patterns:
- process tree
- pstree
template: pstree -p
explanation: Shows processes in a tree format.
- name: kill_process
description: Kill a process
patterns:
- kill process
- terminate process
template: kill {pid}
explanation: Sends a termination signal to a process.
- name: kill_force
description: Force kill a process
patterns:
- kill -9
- force kill
template: kill -9 {pid}
explanation: Forcefully kills a process.
- name: top_processes
description: Show top processes
patterns:
- top processes
- htop
template: htop
explanation: Shows interactive process viewer (use top if htop not available).
- name: network_status
description: Show network status
patterns:
- network status
- netstat
template: netstat -tuln
explanation: Shows listening network ports.
- name: connections
description: Show network connections
patterns:
- network connections
- ss
template: ss -tuln
explanation: Shows network socket statistics.
- name: ping_host
description: Ping a host
patterns:
- ping host
- test connectivity
template: ping -c {count} {host}
explanation: Sends packets to test connectivity.
- name: trace_route
description: Trace route to host
patterns:
- trace route
- traceroute
template: traceroute {host}
explanation: Shows the route to a host.
- name: download_file
description: Download a file
patterns:
- download file
- wget
template: wget {url}
explanation: Downloads a file from URL.
- name: download_curl
description: Download with curl
patterns:
- curl download
template: curl -O {url}
explanation: Downloads a file using curl.
- name: curl_headers
description: Get HTTP headers
patterns:
- check headers
- curl head
template: curl -I {url}
explanation: Shows HTTP response headers.
- name: ssh_connect
description: Connect via SSH
patterns:
- ssh connect
- connect to server
template: ssh {user}@{host}
explanation: Connects to a host via SSH.
- name: ssh_with_key
description: SSH with specific key
patterns:
- ssh with key
- ssh -i
template: ssh -i {key_file} {user}@{host}
explanation: Connects using a specific SSH key.
- name: scp_copy
description: Copy over SSH
patterns:
- scp copy
- secure copy
template: scp {source} {user}@{host}:{path}
explanation: Copies files over SSH.
- name: sync_files
description: Sync files with rsync
patterns:
- rsync
- sync directories
template: rsync -avz {source} {destination}
explanation: Synchronizes directories efficiently.
- name: change_permissions
description: Change file permissions
patterns:
- chmod
- change permissions
template: chmod {mode} {file}
explanation: Changes file permissions (e.g., 755, +x).
- name: change_owner
description: Change file owner
patterns:
- chown
- change owner
template: chown {user}:{group} {file}
explanation: Changes file owner and group.
- name: change_group
description: Change file group
patterns:
- change group
- chgrp
template: chgrp {group} {file}
explanation: Changes file group.
- name: compress_tar
description: Create tar archive
patterns:
- tar compress
- create tar
template: tar -czvf {archive}.tar.gz {path}
explanation: Creates a compressed tar archive.
- name: extract_tar
description: Extract tar archive
patterns:
- extract tar
- untar
template: tar -xzvf {archive}.tar.gz
explanation: Extracts a tar archive.
- name: list_tar
description: List tar contents
patterns:
- list tar
- tar -t
template: tar -tzvf {archive}.tar.gz
explanation: Lists contents of a tar archive.
- name: create_zip
description: Create zip archive
patterns:
- zip file
- create zip
template: zip -r {archive}.zip {path}
explanation: Creates a zip archive.
- name: extract_zip
description: Extract zip archive
patterns:
- unzip
- extract zip
template: unzip {archive}.zip
explanation: Extracts a zip archive.
- name: list_zip
description: List zip contents
patterns:
- list zip
- unzip -l
template: unzip -l {archive}.zip
explanation: Lists contents of a zip archive.
- name: show_date
description: Show current date
patterns:
- current date
- date
template: date
explanation: Shows current date and time.
- name: show_calendar
description: Show calendar
patterns:
- calendar
- cal
template: cal
explanation: Shows a calendar.
- name: show_calendar_year
description: Show calendar for year
patterns:
- calendar year
- cal year
template: cal -y
explanation: Shows calendar for the entire year.
- name: whoami
description: Show current user
patterns:
- current user
- who am i
template: whoami
explanation: Shows the current username.
- name: hostname
description: Show hostname
patterns:
- hostname
- machine name
template: hostname
explanation: Shows the machine hostname.
- name: uname
description: Show system info
patterns:
- system info
- uname
template: uname -a
explanation: Shows all system information.
- name: environment
description: Show environment variables
patterns:
- environment
- env
template: env
explanation: Shows all environment variables.
- name: echo_variable
description: Echo environment variable
patterns:
- echo env
- show variable
template: echo ${VAR}
explanation: Shows the value of an environment variable.
- name: set_variable
description: Set environment variable
patterns:
- export variable
- set env
template: export VAR=value
explanation: Sets an environment variable.
- name: add_path
description: Add to PATH
patterns:
- add to path
- PATH export
template: export PATH=$PATH:{path}
explanation: Adds a directory to PATH.
- name: show_man_page
description: Show manual page
patterns:
- man page
- manual
template: man {command}
explanation: Shows the manual page for a command.
- name: show_help
description: Show command help
patterns:
- command help
- --help
template: "{command} --help"
explanation: Shows help for a command.
- name: show_builtin_help
description: Show shell builtin help
patterns:
- builtin help
- help command
template: help {command}
explanation: Shows help for a shell builtin.
- name: locate_file
description: Locate files quickly
patterns:
- locate
- find quickly
template: locate {pattern}
explanation: Searches for files using a database (updatedb first if needed).
- name: updatedb
description: Update locate database
patterns:
- update locate
- updatedb
template: sudo updatedb
explanation: Updates the file database for locate.
- name: sort_file
description: Sort file contents
patterns:
- sort file
- sort lines
template: sort {file}
explanation: Sorts file contents.
- name: sort_numeric
description: Sort numerically
patterns:
- sort numbers
- sort -n
template: sort -n {file}
explanation: Sorts file contents numerically.
- name: unique_lines
description: Remove duplicate lines
patterns:
- unique
- uniq
template: sort {file} | uniq
explanation: Removes duplicate lines from sorted input.
- name: count_lines
description: Count lines
patterns:
- line count
- wc -l
template: wc -l {file}
explanation: Counts the number of lines in a file.
- name: count_words
description: Count words
patterns:
- word count
- wc
template: wc {file}
explanation: Counts lines, words, and characters in a file.
- name: word_count
description: Count occurrences
patterns:
- count occurrences
- wc -c
template: wc -c {file}
explanation: Counts characters or bytes in a file.
- name: cut_columns
description: Cut columns from file
patterns:
- cut columns
- cut fields
template: cut -d'{delimiter}' -f{fields} {file}
explanation: Extracts specific columns from a delimited file.
- name: paste_columns
description: Paste columns
patterns:
- paste columns
- merge columns
template: paste {file1} {file2}
explanation: Merges lines of files horizontally.
- name: join_files
description: Join files
patterns:
- join files
- join fields
template: join {file1} {file2}
explanation: Joins lines of two files on a common field.
- name: compare_files
description: Compare files
patterns:
- compare files
- diff
template: diff {file1} {file2}
explanation: Shows differences between two files.
- name: compare_side_by_side
description: Side by side comparison
patterns:
- side by side diff
- diff -y
template: diff -y {file1} {file2}
explanation: Shows differences side by side.
- name: patch_file
description: Apply patch
patterns:
- apply patch
- patch
template: patch -p1 < {patch_file}
explanation: Applies a patch to files.
- name: stream_editor
description: Stream editor
patterns:
- sed substitute
- sed replace
template: sed -i 's/{old}/{new}/g' {file}
explanation: Replaces text in a file using sed.
- name: awk_print
description: Process with awk
patterns:
- awk print
- awk process
template: awk '{print ${column}}' {file}
explanation: Extracts and prints specific columns.
- name: xargs
description: Build and execute commands
patterns:
- xargs
- pipe to command
template: find . -name "{pattern}" | xargs {command}
explanation: Builds and executes commands from standard input.
- name: tee_output
description: Split output
patterns:
- tee
- save and display
template: "{command} | tee {file}"
explanation: Saves output to a file while displaying it.
- name: nohup_command
description: Run command immune to hangups
patterns:
- nohup
- run in background
template: nohup {command} > {output} 2>&1 &
explanation: Runs a command immune to hangups in background.
- name: screen_create
description: Create a screen session
patterns:
- create screen
- screen new
template: screen -S {name}
explanation: Creates a new detached screen session.
- name: screen_list
description: List screen sessions
patterns:
- screen list
- screen -ls
template: screen -ls
explanation: Lists all screen sessions.
- name: screen_attach
description: Attach to screen
patterns:
- attach screen
- screen -r
template: screen -r {name}
explanation: Attaches to a screen session.
- name: tmux_create
description: Create a tmux session
patterns:
- create tmux
- tmux new
template: tmux new -s {name}
explanation: Creates a new tmux session.
- name: tmux_list
description: List tmux sessions
patterns:
- tmux list
- tmux ls
template: tmux ls
explanation: Lists all tmux sessions.
- name: tmux_attach
description: Attach to tmux
patterns:
- attach tmux
- tmux attach
template: tmux attach -t {name}
explanation: Attaches to a tmux session.
- name: alias_create
description: Create an alias
patterns:
- create alias
- alias
template: alias {name}='{command}'
explanation: Creates a shell alias.
- name: source_file
description: Source a file
patterns:
- source file
- . file
template: source {file}
explanation: Executes commands from a file in current shell.
- name: export_function
description: Export a function
patterns:
- export function
- export -f
template: export -f {function_name}
explanation: Exports a shell function to child shells.