1.0.0 • Published 7 months ago
@conectate/cli v1.0.0
ct-cli
CLI for managing common aliases and functions, based on specific zsh configurations.
Features
Provides the following commands:
ct ka [file] [...options]: Alias forkubectl apply -f [file] [...options]ct k [...args]: Alias forkubectl [...args]ct killports <port-or-range>: Kills processes on a port range (e.g.,4000-4010).ct completion <shell>: Generates shell completion script (bashorzsh).
Installation
- Clone the repository (or navigate to the directory if already created).
- Install dependencies:
pnpm install - Build the project:
pnpm build - Link the binary globally (or use it directly via
node dist/index.jsor./dist/index.jsafter making it executable):
This makes thepnpm link --globalctcommand available in your terminal.
Important: After installation, configure shell autocompletion for a better experience. See the Autocompletion Setup section below.
Usage
# Examples
ct k get pods
ct ka my-deployment.yaml
ct killports 4000
ct killports 4000-4010
# Get help
ct --help
ct k --helpAutocompletion Setup
Bash:
Add the following to your ~/.bashrc or ~/.bash_profile:
# ct completion
eval "$(ct completion bash)"Zsh:
Add the following to your ~/.zshrc:
# ct completion
autoload -U +X compinit && compinit
autoload -U +X bashcompinit && bashcompinit
eval "$(ct completion zsh)"
# Note: The generated script might need adjustments for optimal zsh completion.
# Consider using commander's native zsh completion features if needed.Remember to restart your shell or source your configuration file (source ~/.bashrc or source ~/.zshrc) after adding the completion setup.
Development
Run in watch mode:
pnpm dev1.0.0
7 months ago