a simple api call in bash script just for sake of ask question in terminal.
clone the repo to Try
git clone git@github.com:Aishete/terminal_chat.gitthen ask it will ask you to add token and just following it
sh ai.sh hey hello This method creates an alias, which is a shortcut within your shell.
make sure you make it execute able first
chmod +x ai.sh-
Open your shell's configuration file: This is usually
.bashrc(Bash),.zshrc(Zsh), or a similar file. -
Add an alias: Add the following line to the file, replacing
/path/to/ai.shwith the actual path:alias ai="/path/to/ai.sh"
-
Source the configuration file: Save the file and then source it to apply the changes:
source ~/.bashrc Now, typing ai will execute ai.sh, but only within the shell session where you defined the alias.
- use bash for the sake of learning
- able to add and use api key to interact with ai in clould
- able to interact with terminal such as create file etc
- able store some ref memory
- able to use local ai model as a brain