Skip to content

Commit aa336c9

Browse files
committed
Simplify configuration instructions
1 parent d47deeb commit aa336c9

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,28 @@ make install PREFIX=~
7373
```
7474

7575
## Run
76-
* Under __Linux__ and __Cygwin__ set the `LD_PRELOAD` environment variable
77-
to load the library using its full path.
78-
For example, under _bash_ run
79-
`export LD_PRELOAD=/usr/local/lib/ai_cli.so` (global installation) or
80-
`export LD_PRELOAD=/home/myname/lib/ai_cli.so` (local installation).
81-
* Under __macOS__ set the `DYLD_INSERT_LIBRARIES` environment variable to load the
82-
library using its full path.
83-
For example, under _bash_ run
84-
`export DYLD_INSERT_LIBRARIES=/Users/myname/lib/ai_cli.dylib`.
85-
Also set the `DYLD_LIBRARY_PATH` environment variable to include
86-
the Homebrew library directory, e.g.
87-
`export DYLD_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_LIBRARY_PATH`.
76+
* Configure the _ai-cli_ library to be activated when your _bash_
77+
shell starts up by adding the following lines in your `.bashrc` file
78+
(ideally near its beginning for performance reasons).
79+
Adjust the provided path match the _ai-cli_ library installation path;
80+
it is currently set for a local installation in your home directory.
81+
```bash
82+
# Initialize the ai-cli library
83+
source $HOME/share/ai-cli/ai-cli-activate-bash.sh
84+
```
85+
* Alternatively, implement one of the following system-specific configurations.
86+
* Under __Linux__ and __Cygwin__ set the `LD_PRELOAD` environment variable
87+
to load the library using its full path.
88+
For example, under _bash_ run
89+
`export LD_PRELOAD=/usr/local/lib/ai_cli.so` (global installation) or
90+
`export LD_PRELOAD=/home/myname/lib/ai_cli.so` (local installation).
91+
* Under __macOS__ set the `DYLD_INSERT_LIBRARIES` environment variable to
92+
load the library using its full path.
93+
For example, under _bash_ run
94+
`export DYLD_INSERT_LIBRARIES=/Users/myname/lib/ai_cli.dylib`.
95+
Also set the `DYLD_LIBRARY_PATH` environment variable to include
96+
the Homebrew library directory, e.g.
97+
`export DYLD_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_LIBRARY_PATH`.
8898
* Perform one of the following.
8999
* Obtain your
90100
[Anthropic API key](https://console.anthropic.com/settings/keys)
@@ -169,16 +179,6 @@ Consequently,
169179
if you want to use the capabilities of the _ai-cli_ library, configure your system
170180
to use the Homebrew commands in preference to the ones supplied with macOS.
171181

172-
## Shell startup configuration
173-
You can configure the _ai-cli_ library to be always available in your _bash_
174-
shell by adding the following lines in your `.bashrc` file
175-
(ideally near its beginning for performance reasons).
176-
Adjust the provided path match the _ai-cli_ library installation path;
177-
it is currently set for a local installation in your home directory.
178-
```bash
179-
# Initialize the ai-cli library
180-
source $HOME/share/ai-cli/ai-cli-activate-bash.sh
181-
```
182182

183183
## Reference documentation
184184
The _ai-cli_ reference documentation is provided as Unix manual

0 commit comments

Comments
 (0)