Skip to content

Commit

Permalink
Updated documentation to reflect latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Stolz committed Oct 7, 2024
1 parent 2eab0ae commit 60cb5d3
Show file tree
Hide file tree
Showing 8 changed files with 1,008 additions and 302 deletions.
494 changes: 403 additions & 91 deletions docs/docs/commands.md

Large diffs are not rendered by default.

129 changes: 101 additions & 28 deletions docs/docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,128 @@ Welcome to Rusty Buddy! This guide will help you quickly set up and start using

After installing Rusty Buddy, the first step is to configure it using the `init` command. This command streamlines the setup process, ensuring all necessary configurations and credentials are in place.

### Prerequisites

Before using Rusty Buddy, make sure you have:

- **OpenAI API Key (if using OpenAI):** Have your OpenAI API key ready for initial setup.

- **Ollama Installed (if using Ollama):** Ensure Ollama is installed and running if you choose to use it as your backend. For more information, visit [Ollama's official website](https://ollama.ai).

- **Network Access:** Required to communicate with your chosen AI backend during persona recommendation and normal usage.

### Running the Init Command

To start the configuration process, open your terminal, and navigate to the directory where you've installed Rusty Buddy. Run the following command:
To start the configuration process, open your terminal and navigate to the directory where you've installed Rusty Buddy. Run the following command:

```bash
rusty-buddy init
```

### Execution Flow and Features

1. **OpenAI API Key Prompt:**
- If the OpenAI API key is not found in your environment, Rusty Buddy will prompt you to enter it.
- The key is stored securely in a `.env` file in the current directory for future use.
Upon running the `init` command, you will be guided through the following steps:

1. **Choose Your AI Backend**

Rusty Buddy supports multiple AI backends. You will be prompted to select your preferred backend:

```plaintext
Choose backend to use (1 for OpenAI, 2 for Ollama): [User enters 1 or 2]
```

- **Option 1: OpenAI**

```text
OpenAI key not found in the environment.
If you choose OpenAI, you will be prompted to enter your OpenAI API key.

```plaintext
You chose OpenAI.
Please enter your OpenAI API key: [User enters key]
```

2. **Persona Recommendation:**
- Rusty Buddy performs a scan of your project directory, analyzing the files and structure.
- It uses this information to recommend a suitable persona by communicating with the OpenAI API.

```text
The key is stored securely in a `.env` file in the current directory for future use.

- **Option 2: Ollama**

If you choose Ollama, you will be prompted to enter the Ollama API URL and model name.

```plaintext
You chose Ollama.
Please enter the Ollama API URL (default: http://localhost:11434): [User enters URL or presses Enter for default]
Please enter the Ollama model (default: llama3.2): [User enters model name or presses Enter for default]
```

2. **Project Analysis and Persona Recommendation**

Rusty Buddy will analyze your project directory to recommend the most suitable persona by scanning your files and structure.

```plaintext
Analyzing project directory...
Recommended persona: [Recommended Persona]
```

3. **Creating Configuration Files:**
- A default `config.toml` file is generated in the `.rusty` directory.
- This file includes the recommended persona and sets default models for chat and commit message generation.
3. **Creating Configuration Files**

The `init` command will generate the necessary configuration files:

- A `.env` file for storing your API keys securely.
- A `config.toml` file for your settings, including the recommended persona and model configurations.

These files are created in the `.rusty` directory within your project.

## Choosing Your AI Provider
### Choosing Your AI Backend

After configuring your environment, you can select between different AI backends, including OpenAI and Ollama, depending on your needs or preferences.
Depending on your selection during the `init` process, your `config.toml` will be configured for either OpenAI or Ollama.

### Using the Ollama Backend
#### Using the OpenAI Backend

If you selected the OpenAI backend, ensure that your `.env` file contains your OpenAI API key:

```plaintext
OPENAI_KEY=your_openai_api_key
```

Your `config.toml` will include configurations similar to:

```toml
default_persona = "[Recommended Persona]"

[ai]
chat_model = "openai_complex"
commit_model = "openai_fast"
wish_model = "openai_complex"

[[models]]
name = "openai_fast"
api_name = "gpt-4o-mini"
backend = "OpenAI"

[[models]]
name = "openai_complex"
api_name = "gpt-4o"
backend = "OpenAI"
```

#### Using the Ollama Backend

If you selected the Ollama backend, your `config.toml` will include the Ollama configuration:

To utilize Ollama, ensure your configuration in the `config.toml` specifies Ollama in the desired models:
```toml
default_persona = "[Recommended Persona]"

[ai]
chat_model = "ollama_32"
commit_model = "ollama_32"
wish_model = "ollama_32"
chat_model = "ollama_complex"
commit_model = "ollama_complex"
wish_model = "ollama_complex"

[[models]]
name = "ollama_32"
name = "ollama_complex"
api_name = "llama3.2"
backend = "Ollama"
url = "http://localhost:11434"

```

## Example Usage
### Example Usage

Once your setup is complete, you can start using Rusty Buddy right away. Here are a few common scenarios:

Expand All @@ -80,11 +148,16 @@ git add .
rusty-buddy commit-message
```

### Prerequisites
## Additional Resources

Before using Rusty Buddy, make sure you have:
- **Installation Guide:** Refer to the [Installation](installation.md) section for detailed instructions on installing Rusty Buddy and any additional steps required for Ollama.

- **Commands Overview:** Explore the various [CLI Commands](commands.md) available in Rusty Buddy to maximize your productivity.

- **Working with Personas:** Learn how to customize and use different personas in the [Personas](personas.md) section.

- **Use Cases:** Check out practical examples and use cases in the [Use Cases](usecases/case_study_rust.md) section to see Rusty Buddy in action.

- **OpenAI API Key:** Have your OpenAI API key ready for initial setup.
- **Network Access:** Required to communicate with OpenAI servers during persona recommendation and normal usage.
---

By following these simple steps, you can leverage the full functionality of Rusty Buddy and integrate it seamlessly into your software development process. Whether you're starting new chat sessions, managing commits, or generating icons, Rusty Buddy is equipped to assist you.
85 changes: 68 additions & 17 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,78 @@
# Rusty Buddy Documentation

Welcome to the official documentation for Rusty Buddy, a command-line tool designed to boost your development workflow with AI-powered features.
Welcome to the official documentation for **Rusty Buddy**, an AI-powered command-line tool designed to **supercharge your development workflow**.

## Features Overview
## Elevate Your Development Experience

- Ollama support 🆕
- Context-Aware Interaction
- Chat Interface
- Slash Command Auto-Completion
- Commit Message Generator
- Icon and Background Image Generation
- Tool Integration
- Shell Completion Support
Rusty Buddy integrates state-of-the-art AI capabilities directly into your command line, transforming the way you code, document, and manage projects. Say goodbye to repetitive tasks and **hello to increased productivity and creativity**.

## Security
### Why Choose Rusty Buddy?

For Rusty Buddy, your security and privacy are our top priorities:
- **Streamline Workflows:** Automate mundane tasks and focus on what truly matters—building amazing software.
- **AI-Powered Assistance:** Leverage advanced AI models to assist with code generation, debugging, documentation, and more.
- **Context-Aware Interaction:** Rusty Buddy adapts to your project's context, providing relevant suggestions and insights.
- **Customizable Personas:** Tailor AI interactions to your specific needs with a variety of personas specialized in different domains.

- **Built on Rust**: Rusty Buddy is developed using Rust, known for its focus on memory safety and concurrent development practices. This reduces the risk of vulnerabilities, ensuring a robust and secure toolset.
## Key Features

- **Privacy First**: We do not collect any of your usage data. Rusty Buddy operates entirely within your local environment[^1], giving you full control and peace of mind regarding your privacy.
- **Ollama Support 🆕**

## Example usage
Experience seamless integration with the Ollama AI backend, providing enhanced performance and privacy.

![CLI](quickstart.gif)
[^1]: If you are using a local Ollama installation for AI workloads.
- **Intuitive Chat Interface**

Engage in natural language conversations with the AI assistant to brainstorm ideas, solve problems, or get code assistance.

- **Slash Command Auto-Completion**

Boost your efficiency with intelligent command suggestions and auto-completion within the chat interface.

- **Commit Message Generator**

Generate clear and consistent commit messages automatically from your git diffs, following best practices.

- **Icon and Background Image Generation**

Create stunning icons and backgrounds effortlessly with AI-generated graphics based on your descriptions.

- **Tool Integration**

Automate repetitive tasks by allowing the AI to interact with your files and directories, enhancing your development process.

- **Shell Completion Support**

Improve your command-line experience with shell completion scripts for Bash, Zsh, Fish, and more.

## Built with Security and Privacy in Mind

- **Developed in Rust**

Benefit from Rust's memory safety guarantees, ensuring a secure and reliable toolset.

- **Privacy First**

Rusty Buddy operates entirely within your local environment[^1], with no data collection, giving you complete control and peace of mind.

## Get Started Today

Unleash the power of AI in your development workflow. [Install Rusty Buddy](installation.md) and start transforming the way you code.

- **[Installation Guide](installation.md)**
- **[Getting Started](getting_started.md)**
- **[Explore Commands](commands.md)**

## Join Our Community

Stay updated with the latest features and connect with other Rusty Buddy users:

- **[GitHub Repository](https://github.com/hg8496/rusty-buddy)**
- **[Documentation](https://docs.rusty-buddy.org)**
- **[Contact Support](mailto:[email protected])**

---

![Quickstart with Rusty Buddy](quickstart.gif)

---

[^1]: If you are using a local Ollama installation for AI workloads.
Loading

0 comments on commit 60cb5d3

Please sign in to comment.