Natural language to shell commands using Claude Code.
howto clone anthropics/claude-code with gh # → gh repo clone anthropics/claude-code
howto find python files over 1mb # → fd -e py -S +1m
howto -m opus complex k8s query # use opus for harder tasksnpm install -g @anthropic-ai/claude-codecurl -o ~/.local/bin/howto https://gist.githubusercontent.com/yy/ebe1851fcb7e4279614ae03131c41a9d/raw/howto
chmod +x ~/.local/bin/howtoThe script outputs the command; this function handles display and execution. Add to ~/.zshrc:
howto() {
local cmd
cmd=$("$HOME/.local/bin/howto" "$@") || return 1
echo "$cmd"
echo -n "Execute? [Y/n/e] "
read -r REPLY
case "$REPLY" in
[nN]) echo "Aborted." ;;
[eE]) vared -p "Edit: " cmd && eval "$cmd" ;;
*) eval "$cmd" ;;
esac
}For bash, replace vared -p "Edit: " cmd with read -e -i "$cmd" -p "Edit: " cmd.
Then reload: source ~/.zshrc