Command Line Tools#
CocoPack provides several command-line utilities to help with common tasks. These tools are automatically installed when you install the package.
Main Command: cocopack#
The main command is cocopack, which provides access to all shell script utilities in the package.
cocopack <command> [args...]
Available commands:
colorcode- Colorize text in the terminalezshell- Various shell utilities
Examples:
# Show colorized text
cocopack colorcode RED "This text will be red"
# Show disk usage for current directory
cocopack ezshell show_storage
Direct Commands#
For convenience, CocoPack also provides direct command shortcuts for common operations:
Shell Script Wrappers#
These commands are wrappers around shell scripts:
cocopack-colorcode- Colorize text (wraps colorcode.sh)cocopack-ezshell- Shell utilities (wraps ezshell.sh)cocopack-prompt- Prompt utilities (wraps prompt.sh)cocopack-helpers-jekyll- Jekyll helpers (wraps helpers/jekyll.sh)cocopack-scripts-clear_git_history- Git history cleanup (wraps scripts/clear_git_history.sh)cocopack-scripts-install_cocopack- Installation helper (wraps scripts/install_cocopack.sh)
Python Function Wrappers#
These commands are direct wrappers for functions in the shell scripts:
color-wrap- Colorize text (wraps color_wrap function)show-symlinks- List symlinks in current directoryshow-storage- Show storage usagesafe-remove- Safely remove filesrecursive-cd- Recursively change to subdirectorymove-with-symlink- Move file and create a symlinksplit-path- Split a path into componentspath-cleanup- Clean up a path
Installation#
All command-line tools are automatically installed when you install CocoPack:
pip install cocopack
If you need to manually install the shell script wrappers (in case they’re missing), you can run:
cocopack-install
Troubleshooting#
If you encounter issues with the shell script wrappers:
Make sure the shell scripts are installed correctly by running
cocopack-installCheck that the scripts have executable permissions
Try using the Python function wrappers instead (e.g.,
color-wrapinstead ofcocopack-colorcode)