@@ -110,22 +110,41 @@ sudo apt install jq
110110 ```
111111## Creating a Terminal Alias (Recommended)
112112
113- For easier access, you can create an alias so you can use the script from anywhere without typing the full path.
113+ For easier access, you can create an alias so you can use the script from anywhere without typing the full path:
114114
115- You just need to add a shell function to your ` ~/.bashrc ` (bash users) or ` ~/.zshrc ` (zsh users) for proper argument forwarding:
115+ ** Option 1: Temporary alias (current session only) **
116116``` bash
117- # Open your shell config file
118- nano ~ /.bashrc # or ~/.zshrc for Zsh users
119-
120- # add this function (replace with your actual path):
121- ai () {
122- (cd /full/path/to/openrouter.ai && ./ai.sh " $@ " )
123- }
124- # Save and exit
125- # Reload your shell config
126- source ~ /.bashrc # or source ~/.zshrc
117+ alias ai=' /path/to/your/openrouter.ai/ai.sh'
127118```
128119
120+ ** Option 2: Permanent alias (recommended)**
121+
122+ 1 . ** For Bash users** - Add to your ` ~/.bashrc ` or ` ~/.bash_profile ` :
123+ ``` bash
124+ cd /path/to/your/openrouter.ai
125+ echo " alias ai='$( pwd) /ai.sh'" >> ~ /.bashrc
126+ source ~ /.bashrc
127+ ```
128+
129+ 2 . ** For Zsh users** - Add to your ` ~/.zshrc ` :
130+ ``` bash
131+ cd /path/to/your/openrouter.ai
132+ echo " alias ai='$( pwd) /ai.sh'" >> ~ /.zshrc
133+ source ~ /.zshrc
134+ ```
135+
136+ 3 . ** Manual method** - Edit your shell config file:
137+ ``` bash
138+ # Open your shell config file
139+ nano ~ /.bashrc # or ~/.zshrc for Zsh users
140+
141+ # Add this line (replace with your actual path):
142+ alias ai=' /full/path/to/openrouter.ai/ai.sh'
143+
144+ # Reload your shell config
145+ source ~ /.bashrc # or source ~/.zshrc
146+ ```
147+
129148** After setting up the alias, you can use it from anywhere:**
130149``` bash
131150# Instead of ./ai.sh question
0 commit comments