-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new features and update installation instructions
Improve the installation instructions for Rusty Buddy by making the script installation method more customizable and user-friendly. The new script includes options for specifying installation directories and includes a Zsh plugin installation enhancement that wasn't addressed in the previous implementation.
- Loading branch information
Christian Stolz
committed
Oct 13, 2024
1 parent
ffb4dda
commit c3bd44c
Showing
3 changed files
with
51 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,87 @@ | ||
# Installation | ||
|
||
Rusty Buddy provides two main methods for installation: using a convenient script for quick installation and manually cloning and building the project from the source. Follow the method that suits your environment. | ||
Rusty Buddy provides two main methods for installation: using a convenient script for a quick setup and manually cloning and building the project from the source. This section focuses on the one-step installation process using the provided script, which includes new options for customization. | ||
|
||
## Method 1: Install Using Script | ||
## Method 1: Install Using the Installation Script | ||
|
||
For a quick and easy installation, you can use the provided script to download and install Rusty Buddy: | ||
For a quick and easy installation, use the Rusty Buddy installation script. This script now includes additional features that allow for more customized installations: | ||
|
||
```bash | ||
curl -sSL https://get.rusty-buddy.org | bash | ||
``` | ||
:::bash | ||
curl -sSL https://get.rusty-buddy.org | bash -s -- [OPTIONS] | ||
|
||
**Note:** | ||
- Ensure that you have the necessary permissions to run installation scripts on your system. | ||
- This method will download the Rusty Buddy binaries to your machine. | ||
### New Features in the Installation Script | ||
|
||
## Method 2: Clone and Build | ||
|
||
If you prefer to have more control over the installation or need to modify the source, you can clone the repository and build the project yourself. Here are the steps: | ||
|
||
1. **Clone the Repository:** | ||
|
||
Begin by cloning the Rusty Buddy GitHub repository to your local environment: | ||
|
||
```bash | ||
git clone https://github.com/hg8496/rusty-buddy.git | ||
``` | ||
|
||
2. **Navigate to the Project Directory:** | ||
|
||
Change your current directory to the project root: | ||
**Options:** | ||
|
||
```bash | ||
cd rusty-buddy | ||
``` | ||
|
||
3. **Build the Project:** | ||
- **`-p`:** | ||
This option installs a Zsh plugin for Rusty Buddy, enhancing the Zsh shell experience with additional command-line integrations tailored for Rusty Buddy. | ||
|
||
Use Cargo, Rust's package manager, to build Rusty Buddy. Ensure you are building in release mode for optimal performance: | ||
**How to Use:** | ||
|
||
```bash | ||
cargo build --release | ||
``` | ||
:::bash | ||
curl -sSL https://get.rusty-buddy.org | bash -s -- -p | ||
|
||
4. **Set Up the Environment:** | ||
After installation, add `rusty-buddy` to your plugins list in the `~/.zshrc` file to activate it: | ||
|
||
For an easy setup follow the information in the [getting started guide](getting_started.md) | ||
:::bash | ||
plugins=(... rusty-buddy) | ||
|
||
**Prerequisites:** | ||
- Ensure that Rust and Cargo are installed on your system. You can install them via [rustup](https://rustup.rs/). | ||
- Network access may be required for both installation methods, particularly for downloading dependencies or connecting with the AI backends. | ||
- **`-d <directory>`:** | ||
Use this option to specify an installation directory for the Rusty Buddy binary, with the default being `$HOME/.local/bin`. Modify this to install Rusty Buddy in a different directory of your choice. | ||
|
||
## Additional Requirements for Ollama | ||
**How to Use:** | ||
|
||
To use the Ollama backend with Rusty Buddy, you need to install and configure the Ollama service. The following steps will guide you through the process. | ||
:::bash | ||
curl -sSL https://get.rusty-buddy.org | bash -s -- -d /your/custom/path | ||
|
||
### Step 1: Install Ollama | ||
Ensure the specified directory is included in your system's `PATH` environment variable to access Rusty Buddy from any terminal. | ||
|
||
Ollama needs to be installed separately from Rusty Buddy. Follow these steps: | ||
**Script Details:** | ||
|
||
- **For macOS:** | ||
- The script automatically determines your operating system and architecture to download the appropriate Rusty Buddy binary. | ||
- If the specified installation directory (`-d <directory>`) is not in your `PATH`, the script provides a guide on adding it to your shell configuration. | ||
- With the `-p` option, the Zsh plugin is installed into the `~/.oh-my-zsh/custom/plugins/rusty-buddy` directory. | ||
|
||
Install Ollama using Homebrew: | ||
These enhancements make installing Rusty Buddy more customizable and compatible with different development environments. | ||
|
||
```bash | ||
brew install ollama | ||
``` | ||
|
||
- **For other platforms:** | ||
|
||
Visit the [Official Ollama Installation Guide](https://ollama.ai/download) for instructions tailored to your operating system. | ||
|
||
### Step 2: Load an Ollama Model | ||
|
||
After installing Ollama, you need to download and load the desired AI model. | ||
|
||
For example, to download the `llama2` model, run: | ||
|
||
```bash | ||
ollama pull llama2 | ||
``` | ||
## Method 2: Clone and Build | ||
|
||
You can view available models on the [Ollama Models Page](https://ollama.ai/library). | ||
If you prefer to have more control over the installation or need to modify the source, you can clone the repository and build the project yourself. Here are the steps: | ||
|
||
### Step 3: Verify Ollama Installation | ||
1. **Clone the Repository:** | ||
|
||
Ensure that the Ollama service is running and accessible. By default, Ollama runs on `http://localhost:11434`. | ||
Clone the Rusty Buddy GitHub repository to your local environment: | ||
|
||
You can test it by running: | ||
:::bash | ||
git clone https://github.com/hg8496/rusty-buddy.git | ||
|
||
```bash | ||
ollama serve | ||
``` | ||
2. **Navigate to the Project Directory:** | ||
|
||
### Step 4: Configure Rusty Buddy for Ollama | ||
Change your current directory to the project root: | ||
|
||
When you run the `rusty-buddy init` command, select Ollama as your AI backend. Follow the prompts to enter the Ollama API URL and model name. | ||
:::bash | ||
cd rusty-buddy | ||
|
||
Your `config.toml` should be configured to use Ollama: | ||
3. **Build the Project:** | ||
|
||
```toml | ||
default_persona = "[Recommended Persona]" | ||
Use Cargo, Rust's package manager, to build Rusty Buddy. Ensure you are building in release mode for optimal performance: | ||
|
||
[ai] | ||
chat_model = "ollama_complex" | ||
commit_model = "ollama_complex" | ||
wish_model = "ollama_complex" | ||
:::bash | ||
cargo build --release | ||
|
||
[[models]] | ||
name = "ollama_complex" | ||
api_name = "llama2" | ||
backend = "Ollama" | ||
url = "http://localhost:11434" | ||
``` | ||
4. **Set Up the Environment:** | ||
|
||
**Note:** | ||
- Replace `llama2` with the name of the model you have downloaded. | ||
- Ensure that the `url` matches the address where Ollama is running. | ||
Follow the information in the [Getting Started Guide](getting_started.md) for easy setup. | ||
|
||
## Final Steps | ||
**Prerequisites:** | ||
|
||
With Rusty Buddy installed and configured, you're ready to start using it. Refer to the [Getting Started](getting_started.md) guide to initialize the application and begin integrating Rusty Buddy into your development workflow. | ||
- Ensure that Rust and Cargo are installed on your system. You can install them via [rustup](https://rustup.rs/). | ||
- Network access may be required for both installation methods, particularly for downloading dependencies or connecting with the AI backends. | ||
|
||
--- | ||
|
||
By following these instructions, you will set up Rusty Buddy and harness its capabilities for your development workflows. Choose the installation method that aligns with your needs and system configuration. | ||
|
||
--- | ||
|
||
**Happy Coding with Rusty Buddy!** | ||
**Happy Coding with Rusty Buddy!** |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters