feat(dependabot): add dependabot configuration for daily updates of Python packages
docs(README.md): enhance documentation with installation, configuration, and usage guides docs(contributing.md): create a contributing guide to encourage community involvement docs(getting-help.md): add a section for reporting issues and community support docs(quickstart): reorganize and enhance quickstart documentation for better clarity style(docusaurus.config.ts): update footer copyright and GitHub link for accuracy fix(models_params.py): add default base latency parameter for model configurations feat(usage): add usage examples for creating games and modern web apps with RA.Aid chore(remove): delete outdated quickstart and tutorial files to streamline documentation
This commit is contained in:
commit
becf8a1fd6
|
|
@ -0,0 +1,6 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "pip"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
33
README.md
33
README.md
|
|
@ -16,6 +16,20 @@ Here's a demo of RA.Aid adding a feature to itself:
|
|||
|
||||
<img src="assets/demo-ra-aid-task-1.gif" alt="RA.Aid Demo" autoplay loop style="width: 100%; max-width: 800px;">
|
||||
|
||||
## Documentation
|
||||
|
||||
Complete documentation is available at https://docs.ra-aid.ai
|
||||
|
||||
Key sections:
|
||||
- [Installation Guide](https://docs.ra-aid.ai/quickstart/installation)
|
||||
- [Recommended Configuration](https://docs.ra-aid.ai/quickstart/recommended)
|
||||
- [Open Models Setup](https://docs.ra-aid.ai/quickstart/open-models)
|
||||
- [Usage Examples](https://docs.ra-aid.ai/category/usage)
|
||||
- [Contributing Guide](https://docs.ra-aid.ai/contributing)
|
||||
- [Getting Help](https://docs.ra-aid.ai/getting-help)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Features](#features)
|
||||
- [Installation](#installation)
|
||||
- [Usage](#usage)
|
||||
|
|
@ -91,14 +105,7 @@ pip install ra-aid
|
|||
|
||||
### Prerequisites
|
||||
|
||||
Before using RA.Aid, you'll need:
|
||||
|
||||
1. Python package `aider` installed and available in your PATH:
|
||||
```bash
|
||||
pip install aider-chat
|
||||
```
|
||||
|
||||
2. API keys for the required AI services:
|
||||
Before using RA.Aid, you'll need API keys for the required AI services:
|
||||
|
||||
```bash
|
||||
# Set up API keys based on your preferred provider:
|
||||
|
|
@ -106,7 +113,7 @@ pip install aider-chat
|
|||
# For Anthropic Claude models (recommended)
|
||||
export ANTHROPIC_API_KEY=your_api_key_here
|
||||
|
||||
# For OpenAI models
|
||||
# For OpenAI models (optional)
|
||||
export OPENAI_API_KEY=your_api_key_here
|
||||
|
||||
# For OpenRouter provider (optional)
|
||||
|
|
@ -133,6 +140,8 @@ You can get your API keys from:
|
|||
- OpenRouter API key: https://openrouter.ai/keys
|
||||
- Gemini API key: https://aistudio.google.com/app/apikey
|
||||
|
||||
Complete installation documentation is available in our [Installation Guide](https://docs.ra-aid.ai/quickstart/installation).
|
||||
|
||||
## Usage
|
||||
|
||||
RA.Aid is designed to be simple yet powerful. Here's how to use it:
|
||||
|
|
@ -148,6 +157,8 @@ ra-aid -m "Explain the authentication flow" --research-only
|
|||
ra-aid -m "Add new feature" --verbose
|
||||
```
|
||||
|
||||
More information is available in our [Usage Examples](https://docs.ra-aid.ai/category/usage).
|
||||
|
||||
### Command Line Options
|
||||
|
||||
- `-m, --message`: The task or query to be executed (required except in chat mode)
|
||||
|
|
@ -428,6 +439,8 @@ Note: For `AIDER_FLAGS`, you can specify flags with or without the leading `--`.
|
|||
- Model configuration is done via command line arguments: `--provider` and `--model`
|
||||
- The `--model` argument is required for all providers except Anthropic (which defaults to `claude-3-5-sonnet-20241022`)
|
||||
|
||||
More information is available in our [Open Models Setup](https://docs.ra-aid.ai/quickstart/open-models) guide.
|
||||
|
||||
## Architecture
|
||||
|
||||
RA.Aid implements a three-stage architecture for handling development and research tasks:
|
||||
|
|
@ -524,6 +537,8 @@ git push origin feature/your-feature-name
|
|||
- Keep commits focused and message clear
|
||||
- Ensure all tests pass before submitting PR
|
||||
|
||||
More information is available in our [Contributing Guide](https://docs.ra-aid.ai/contributing).
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
|
|
@ -0,0 +1,79 @@
|
|||
# Contributing to RA.Aid
|
||||
|
||||
Welcome to the RA.Aid community! We're thrilled you're interested in contributing. This project thrives thanks to contributors like you, and we're excited to have you join us on this journey.
|
||||
|
||||
## Ways to Contribute
|
||||
|
||||
There are many valuable ways to contribute to RA.Aid:
|
||||
|
||||
### 1. Join Our Community
|
||||
- Join our Discord community to connect with other users and contributors
|
||||
- Help answer questions from other users
|
||||
- Share your experiences and use cases
|
||||
- Provide feedback and suggestions
|
||||
|
||||
### 2. Report Issues
|
||||
- Found a bug? Open an issue on our [GitHub repository](https://github.com/ai-christianson/RA.Aid/issues)
|
||||
- Before creating a new issue, please check if it already exists
|
||||
- Include as much detail as possible:
|
||||
- Steps to reproduce
|
||||
- Expected vs actual behavior
|
||||
- Your environment (OS, Python version, etc.)
|
||||
- Any relevant error messages
|
||||
|
||||
### 3. Contribute to Documentation
|
||||
- Our documentation lives in the `docs/` folder
|
||||
- Found a typo? Have an idea for better explanations? Open a PR!
|
||||
- You can use RA.Aid itself to help draft documentation changes
|
||||
- Even small improvements are welcome
|
||||
|
||||
### 4. Code Contributions
|
||||
- Look for issues labeled "help wanted" or "good first issue" on our GitHub
|
||||
- Feel free to pick up any open issue - don't be shy!
|
||||
- **You can even use RA.Aid to help understand the codebase and make changes**
|
||||
- Before starting work on larger changes, please open an issue to discuss
|
||||
|
||||
## Making Your First Contribution
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a branch for your changes
|
||||
3. Make your changes
|
||||
4. Write/update tests if needed
|
||||
5. Submit a Pull Request
|
||||
6. Wait for review and address any feedback
|
||||
|
||||
Don't hesitate to ask questions if you're unsure about anything. Remember: every expert was once a beginner!
|
||||
|
||||
## Development Setup
|
||||
|
||||
1. Clone the repository:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/ai-christianson/RA.Aid.git
|
||||
cd RA.Aid
|
||||
```
|
||||
|
||||
2. Create and activate a virtual environment:
|
||||
|
||||
```bash
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
```
|
||||
|
||||
3. Install in dev mode:
|
||||
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
4. Run RA.Aid:
|
||||
|
||||
```bash
|
||||
ra-aid -m "Your task or query here"
|
||||
```
|
||||
|
||||
## This is Your Project Too
|
||||
|
||||
RA.Aid is a community project that grows stronger with each contribution. Whether it's fixing a typo in documentation, reporting a bug, or adding a new feature - every contribution matters and is valued.
|
||||
|
||||
Don't feel like you need to make massive changes to contribute. Small, focused contributions are often the best way to start. Use what you know, and learn as you go!
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# Getting Help
|
||||
|
||||
## Bug Reports and Feature Requests
|
||||
|
||||
If you encounter any issues or have ideas for improvements, please file them on our [GitHub Issues page](https://github.com/ai-christianson/RA.Aid/issues).
|
||||
|
||||
## Community Support
|
||||
|
||||
Join our Discord community to chat with other users and get help:
|
||||
|
||||
- [Join the Discord Server](https://discord.gg/f6wYbzHYxV)
|
||||
|
|
@ -1 +0,0 @@
|
|||
---\nsidebar_position: 1\n---\n\n# Getting Started\n\nWelcome to the documentation. This page will help you get started.
|
||||
|
|
@ -3,46 +3,54 @@ sidebar_position: 1
|
|||
slug: /
|
||||
---
|
||||
|
||||
# Intro
|
||||
# Welcome to RA.Aid
|
||||
|
||||
Let's discover **Docusaurus in less than 5 minutes**.
|
||||
RA.Aid (pronounced "raid") is your AI-powered development companion that helps you build software autonomously. Whether you're working on new features, refactoring code, or researching solutions, RA.Aid makes development faster and more efficient.
|
||||
|
||||
## Getting Started
|
||||
## Why RA.Aid?
|
||||
|
||||
Get started by **creating a new site**.
|
||||
- 🤖 **Autonomous Development**: Let RA.Aid handle complex programming tasks while you focus on the big picture
|
||||
- 🔍 **Smart Research**: Automatically researches solutions and best practices
|
||||
- 📋 **Intelligent Planning**: Breaks down complex tasks into manageable steps
|
||||
- 💬 **Interactive Mode**: Get help when you need it through natural conversation
|
||||
|
||||
Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
|
||||
## Quick Start
|
||||
|
||||
### What you'll need
|
||||
Ready to get started? Jump right to:
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
- [Installation Guide](/quickstart/installation)
|
||||
- [Basic Usage Examples](/usage/modern-web-app)
|
||||
|
||||
## Generate a new site
|
||||
### Basic Example
|
||||
|
||||
Generate a new Docusaurus site using the **classic template**.
|
||||
|
||||
The classic template will automatically be added to your project after you run the command:
|
||||
Here's how simple it is to use RA.Aid:
|
||||
|
||||
```bash
|
||||
npm init docusaurus@latest my-website classic
|
||||
# Install RA.Aid
|
||||
pip install ra-aid
|
||||
|
||||
# Set up API keys
|
||||
export ANTHROPIC_API_KEY=your_key_here
|
||||
export OPENAI_API_KEY=your_key_here
|
||||
export TAVILY_API_KEY=your_key_here
|
||||
|
||||
# Start using it
|
||||
ra-aid -m "Add input validation to the login form"
|
||||
```
|
||||
|
||||
You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
|
||||
## Key Features
|
||||
|
||||
The command also installs all necessary dependencies you need to run Docusaurus.
|
||||
- **Three-Stage Workflow**: Research → Planning → Implementation
|
||||
- **Web Research**: Automatically searches for best practices and solutions
|
||||
- **Interactive Mode**: Get help when you need it through natural conversation
|
||||
- **Multiple AI Providers**: Support for various AI models to suit your needs
|
||||
- **Git Integration**: Works seamlessly with your version control
|
||||
|
||||
## Start your site
|
||||
## Next Steps
|
||||
|
||||
Run the development server:
|
||||
- Check out the [Installation Guide](/quickstart/installation) to set up RA.Aid
|
||||
- See [Usage Examples](/usage/modern-web-app) to get started quickly
|
||||
- Read our [Contributing Guide](/contributing) to get involved
|
||||
- Join our [Discord Community](https://discord.gg/f6wYbzHYxV) for help and discussions
|
||||
|
||||
```bash
|
||||
cd my-website
|
||||
npm run start
|
||||
```
|
||||
|
||||
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
|
||||
|
||||
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
|
||||
|
||||
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
|
||||
Ready to revolutionize your development workflow? Let's get started! 🚀
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"label": "Quick Starts",
|
||||
"label": "Quick Start",
|
||||
"position": 2,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Installation
|
||||
|
||||
Getting started is easy! You can install RA.Aid using any of these three methods - pick the one that works best for you:
|
||||
|
||||
<Tabs groupId="install-method">
|
||||
<TabItem value="uv" label="UV" default>
|
||||
|
||||
Create a new Python 3.12 virtual environment and install RA.Aid:
|
||||
|
||||
First install [uv](https://docs.astral.sh/uv/getting-started/installation/), then:
|
||||
|
||||
```bash
|
||||
uv venv -p 3.12
|
||||
```
|
||||
|
||||
<Tabs groupId="operating-system">
|
||||
<TabItem value="unix" label="Unix/macOS">
|
||||
|
||||
```bash
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="windows" label="Windows">
|
||||
|
||||
```bash
|
||||
.venv\Scripts\activate
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
```bash
|
||||
uv pip install ra-aid
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="pip" label="pip">
|
||||
|
||||
Install RA.Aid using pip:
|
||||
|
||||
```bash
|
||||
pip install ra-aid
|
||||
```
|
||||
|
||||
:::note
|
||||
If you're using Python 3.13 or newer, we recommend using the UV installation method instead due to compatibility issues with newer Python versions.
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="macos" label="macOS">
|
||||
|
||||
Install RA.Aid using Homebrew:
|
||||
|
||||
```bash
|
||||
brew tap ai-christianson/homebrew-ra-aid
|
||||
brew install ra-aid
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
Once installed, see the [Recommended Configuration](recommended) to set up RA.Aid with the recommended settings.
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
# Open Models Configuration
|
||||
|
||||
RA.Aid supports a variety of open source and compatible model providers. This guide covers configuration options and best practices for using different models with RA.Aid.
|
||||
|
||||
## Overview
|
||||
|
||||
<Tabs groupId="provider-overview">
|
||||
<TabItem value="providers" label="Supported Providers" default>
|
||||
|
||||
RA.Aid supports these model providers:
|
||||
|
||||
| Provider | Description | Key Features |
|
||||
|----------|-------------|--------------|
|
||||
| DeepSeek | Chinese hedge fund who creates sophisticated LLMs | Strong, open models like R1 |
|
||||
| OpenRouter | Multi-model gateway service | Access to 100+ models, unified API interface, pay-per-token |
|
||||
| OpenAI-compatible | Self-hosted model endpoints | Compatible with Llama, Mistral and other open models |
|
||||
| Anthropic | Claude model series | 200k token context, strong tool use, JSON/XML parsing |
|
||||
| Gemini | Google's multimodal models | Code generation in 20+ languages, parallel request support |
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="setup" label="Quick Setup">
|
||||
|
||||
### Basic Configuration
|
||||
|
||||
1. Set your provider's API key:
|
||||
```bash
|
||||
# Choose the appropriate provider
|
||||
export DEEPSEEK_API_KEY=your_key
|
||||
export OPENROUTER_API_KEY=your_key
|
||||
export OPENAI_API_KEY=your_key
|
||||
export ANTHROPIC_API_KEY=your_key
|
||||
export GEMINI_API_KEY=your_key
|
||||
```
|
||||
|
||||
2. Run RA.Aid with your chosen provider:
|
||||
```bash
|
||||
ra-aid -m "Your task" --provider <provider> --model <model>
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Provider Configuration
|
||||
|
||||
<Tabs groupId="model-provider">
|
||||
<TabItem value="deepseek" label="DeepSeek" default>
|
||||
|
||||
### DeepSeek Models
|
||||
|
||||
DeepSeek offers powerful reasoning models optimized for complex tasks.
|
||||
|
||||
```bash
|
||||
# Environment setup
|
||||
export DEEPSEEK_API_KEY=your_api_key_here
|
||||
|
||||
# Basic usage
|
||||
ra-aid -m "Your task" --provider deepseek --model deepseek-reasoner
|
||||
|
||||
# With temperature control
|
||||
ra-aid -m "Your task" --provider deepseek --model deepseek-reasoner --temperature 0.7
|
||||
```
|
||||
|
||||
**Available Models:**
|
||||
- `deepseek-reasoner`: Optimized for reasoning tasks
|
||||
- Access via OpenRouter: `deepseek/deepseek-r1`
|
||||
</TabItem>
|
||||
<TabItem value="openrouter" label="OpenRouter">
|
||||
|
||||
### OpenRouter Integration
|
||||
|
||||
OpenRouter provides access to multiple open source models through a single API.
|
||||
|
||||
```bash
|
||||
# Environment setup
|
||||
export OPENROUTER_API_KEY=your_api_key_here
|
||||
|
||||
# Example commands
|
||||
ra-aid -m "Your task" --provider openrouter --model mistralai/mistral-large-2411
|
||||
ra-aid -m "Your task" --provider openrouter --model deepseek/deepseek-r1
|
||||
```
|
||||
|
||||
**Popular Models:**
|
||||
- `mistralai/mistral-large-2411`
|
||||
- `anthropic/claude-3`
|
||||
- `deepseek/deepseek-r1`
|
||||
</TabItem>
|
||||
<TabItem value="openai-compatible" label="OpenAI-compatible">
|
||||
|
||||
### OpenAI-compatible Endpoints
|
||||
|
||||
Use OpenAI-compatible API endpoints with custom hosting solutions.
|
||||
|
||||
```bash
|
||||
# Environment setup
|
||||
export OPENAI_API_KEY=your_api_key_here
|
||||
export OPENAI_API_BASE=https://your-api-endpoint
|
||||
|
||||
# Usage
|
||||
ra-aid -m "Your task" --provider openai-compatible --model your-model-name
|
||||
```
|
||||
|
||||
**Configuration Options:**
|
||||
- Set custom base URL with `OPENAI_API_BASE`
|
||||
- Supports temperature control
|
||||
- Compatible with most OpenAI-style APIs
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Advanced Configuration
|
||||
|
||||
<Tabs groupId="advanced-config">
|
||||
<TabItem value="expert" label="Expert Model">
|
||||
|
||||
### Expert Tool Configuration
|
||||
|
||||
Configure the expert model for specialized tasks; this usually benefits from a more powerful, slower, reasoning model:
|
||||
|
||||
```bash
|
||||
# DeepSeek expert
|
||||
export EXPERT_DEEPSEEK_API_KEY=your_key
|
||||
ra-aid -m "Your task" --expert-provider deepseek --expert-model deepseek-reasoner
|
||||
|
||||
# OpenRouter expert
|
||||
export EXPERT_OPENROUTER_API_KEY=your_key
|
||||
ra-aid -m "Your task" --expert-provider openrouter --expert-model mistralai/mistral-large-2411
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="temperature" label="Temperature Control">
|
||||
|
||||
### Temperature Settings
|
||||
|
||||
Control model creativity vs determinism:
|
||||
|
||||
```bash
|
||||
# More deterministic (good for coding)
|
||||
ra-aid -m "Your task" --temperature 0.2
|
||||
|
||||
# More creative (good for brainstorming)
|
||||
ra-aid -m "Your task" --temperature 0.8
|
||||
```
|
||||
|
||||
**Note:** Not all models support temperature control. Check provider documentation.
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Set environment variables in your shell configuration file
|
||||
- Use lower temperatures (0.1-0.3) for coding tasks
|
||||
- Test different models to find the best fit for your use case
|
||||
- Consider using expert mode for complex programming tasks
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Complete list of supported environment variables:
|
||||
|
||||
| Variable | Provider | Purpose |
|
||||
|----------|----------|----------|
|
||||
| `OPENROUTER_API_KEY` | OpenRouter | Main API access |
|
||||
| `DEEPSEEK_API_KEY` | DeepSeek | Main API access |
|
||||
| `OPENAI_API_KEY` | OpenAI-compatible | API access |
|
||||
| `OPENAI_API_BASE` | OpenAI-compatible | Custom endpoint |
|
||||
| `ANTHROPIC_API_KEY` | Anthropic | API access |
|
||||
| `GEMINI_API_KEY` | Gemini | API access |
|
||||
| `EXPERT_OPENROUTER_API_KEY` | OpenRouter | Expert tool |
|
||||
| `EXPERT_DEEPSEEK_API_KEY` | DeepSeek | Expert tool |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- Verify API keys are set correctly
|
||||
- Check endpoint URLs for OpenAI-compatible setups
|
||||
- Monitor API rate limits and quotas
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Recommended Config
|
||||
|
||||
This configuration combines the strengths of multiple AI models to provide the best experience:
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Congratulations!
|
||||
|
||||
You have just learned the **basics of Docusaurus** and made some changes to the **initial template**.
|
||||
|
||||
Docusaurus has **much more to offer**!
|
||||
|
||||
Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
|
||||
|
||||
Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)
|
||||
|
||||
## What's next?
|
||||
|
||||
- Read the [official documentation](https://docusaurus.io/)
|
||||
- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
|
||||
- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
|
||||
- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
|
||||
- Add a [search bar](https://docusaurus.io/docs/search)
|
||||
- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
|
||||
- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Create a Blog Post
|
||||
|
||||
Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed...
|
||||
|
||||
## Create your first Post
|
||||
|
||||
Create a file at `blog/2021-02-28-greetings.md`:
|
||||
|
||||
```md title="blog/2021-02-28-greetings.md"
|
||||
---
|
||||
slug: greetings
|
||||
title: Greetings!
|
||||
authors:
|
||||
- name: Joel Marcey
|
||||
title: Co-creator of Docusaurus 1
|
||||
url: https://github.com/JoelMarcey
|
||||
image_url: https://github.com/JoelMarcey.png
|
||||
- name: Sébastien Lorber
|
||||
title: Docusaurus maintainer
|
||||
url: https://sebastienlorber.com
|
||||
image_url: https://github.com/slorber.png
|
||||
tags: [greetings]
|
||||
---
|
||||
|
||||
Congratulations, you have made your first post!
|
||||
|
||||
Feel free to play around and edit this post as much as you like.
|
||||
```
|
||||
|
||||
A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Create a Document
|
||||
|
||||
Documents are **groups of pages** connected through:
|
||||
|
||||
- a **sidebar**
|
||||
- **previous/next navigation**
|
||||
- **versioning**
|
||||
|
||||
## Create your first Doc
|
||||
|
||||
Create a Markdown file at `docs/hello.md`:
|
||||
|
||||
```md title="docs/hello.md"
|
||||
# Hello
|
||||
|
||||
This is my **first Docusaurus document**!
|
||||
```
|
||||
|
||||
A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello).
|
||||
|
||||
## Configure the Sidebar
|
||||
|
||||
Docusaurus automatically **creates a sidebar** from the `docs` folder.
|
||||
|
||||
Add metadata to customize the sidebar label and position:
|
||||
|
||||
```md title="docs/hello.md" {1-4}
|
||||
---
|
||||
sidebar_label: 'Hi!'
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Hello
|
||||
|
||||
This is my **first Docusaurus document**!
|
||||
```
|
||||
|
||||
It is also possible to create your sidebar explicitly in `sidebars.js`:
|
||||
|
||||
```js title="sidebars.js"
|
||||
export default {
|
||||
tutorialSidebar: [
|
||||
'intro',
|
||||
// highlight-next-line
|
||||
'hello',
|
||||
{
|
||||
type: 'category',
|
||||
label: 'Tutorial',
|
||||
items: ['quickstarts/create-a-document'],
|
||||
},
|
||||
],
|
||||
};
|
||||
```
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# Deploy your site
|
||||
|
||||
Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**).
|
||||
|
||||
It builds your site as simple **static HTML, JavaScript and CSS files**.
|
||||
|
||||
## Build your site
|
||||
|
||||
Build your site **for production**:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
||||
The static files are generated in the `build` folder.
|
||||
|
||||
## Deploy your site
|
||||
|
||||
Test your production build locally:
|
||||
|
||||
```bash
|
||||
npm run serve
|
||||
```
|
||||
|
||||
The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/).
|
||||
|
||||
You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**).
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
# Installation
|
||||
|
||||
Create a new Python 3.12 virtual environment and install RA.Aid:
|
||||
|
||||
```bash
|
||||
uv venv -p 3.12
|
||||
source .venv/bin/activate # On Unix/macOS
|
||||
# or
|
||||
.venv\Scripts\activate # On Windows
|
||||
|
||||
uv pip install ra-aid
|
||||
```
|
||||
|
||||
Once installed, see the [Recommended Configuration](recommended) to set up RA.Aid with the recommended settings.
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Markdown Features
|
||||
|
||||
Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**.
|
||||
|
||||
## Front Matter
|
||||
|
||||
Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/):
|
||||
|
||||
```text title="my-doc.md"
|
||||
// highlight-start
|
||||
---
|
||||
id: my-doc-id
|
||||
title: My document title
|
||||
description: My document description
|
||||
slug: /my-custom-url
|
||||
---
|
||||
// highlight-end
|
||||
|
||||
## Markdown heading
|
||||
|
||||
Markdown text with [links](./hello.md)
|
||||
```
|
||||
|
||||
## Links
|
||||
|
||||
Regular Markdown links are supported, using url paths or relative file paths.
|
||||
|
||||
```md
|
||||
Let's see how to [Create a page](/recommended).
|
||||
```
|
||||
|
||||
```md
|
||||
Let's see how to [Create a page](./recommended.md).
|
||||
```
|
||||
|
||||
**Result:** Let's see how to [Create a page](./recommended.md).
|
||||
|
||||
## Images
|
||||
|
||||
Regular Markdown images are supported.
|
||||
|
||||
You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`):
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
|
||||

|
||||
|
||||
You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
|
||||
|
||||
```md
|
||||

|
||||
```
|
||||
|
||||
## Code Blocks
|
||||
|
||||
Markdown code blocks are supported with Syntax highlighting.
|
||||
|
||||
````md
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return <h1>Hello, Docusaurus!</h1>;
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
```jsx title="src/components/HelloDocusaurus.js"
|
||||
function HelloDocusaurus() {
|
||||
return <h1>Hello, Docusaurus!</h1>;
|
||||
}
|
||||
```
|
||||
|
||||
## Admonitions
|
||||
|
||||
Docusaurus has a special syntax to create admonitions and callouts:
|
||||
|
||||
```md
|
||||
:::tip My tip
|
||||
|
||||
Use this awesome feature option
|
||||
|
||||
:::
|
||||
|
||||
:::danger Take care
|
||||
|
||||
This action is dangerous
|
||||
|
||||
:::
|
||||
```
|
||||
|
||||
:::tip My tip
|
||||
|
||||
Use this awesome feature option
|
||||
|
||||
:::
|
||||
|
||||
:::danger Take care
|
||||
|
||||
This action is dangerous
|
||||
|
||||
:::
|
||||
|
||||
## MDX and React Components
|
||||
|
||||
[MDX](https://mdxjs.com/) can make your documentation more **interactive** and allows using any **React components inside Markdown**:
|
||||
|
||||
```jsx
|
||||
export const Highlight = ({children, color}) => (
|
||||
<span
|
||||
style={{
|
||||
backgroundColor: color,
|
||||
borderRadius: '20px',
|
||||
color: '#fff',
|
||||
padding: '10px',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
onClick={() => {
|
||||
alert(`You clicked the color ${color} with label ${children}`)
|
||||
}}>
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
|
||||
This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
|
||||
|
||||
This is <Highlight color="#1877F2">Facebook blue</Highlight> !
|
||||
```
|
||||
|
||||
export const Highlight = ({children, color}) => (
|
||||
<span
|
||||
style={{
|
||||
backgroundColor: color,
|
||||
borderRadius: '20px',
|
||||
color: '#fff',
|
||||
padding: '10px',
|
||||
cursor: 'pointer',
|
||||
}}
|
||||
onClick={() => {
|
||||
alert(`You clicked the color ${color} with label ${children}`);
|
||||
}}>
|
||||
{children}
|
||||
</span>
|
||||
);
|
||||
|
||||
This is <Highlight color="#25c2a0">Docusaurus green</Highlight> !
|
||||
|
||||
This is <Highlight color="#1877F2">Facebook blue</Highlight> !
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"label": "Tutorial - Extras",
|
||||
"position": 3,
|
||||
"link": {
|
||||
"type": "generated-index"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB |
|
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Manage Docs Versions
|
||||
|
||||
Docusaurus can manage multiple versions of your docs.
|
||||
|
||||
## Create a docs version
|
||||
|
||||
Release a version 1.0 of your project:
|
||||
|
||||
```bash
|
||||
npm run docusaurus docs:version 1.0
|
||||
```
|
||||
|
||||
The `docs` folder is copied into `versioned_docs/version-1.0` and `versions.json` is created.
|
||||
|
||||
Your docs now have 2 versions:
|
||||
|
||||
- `1.0` at `http://localhost:3000/docs/` for the version 1.0 docs
|
||||
- `current` at `http://localhost:3000/docs/next/` for the **upcoming, unreleased docs**
|
||||
|
||||
## Add a Version Dropdown
|
||||
|
||||
To navigate seamlessly across versions, add a version dropdown.
|
||||
|
||||
Modify the `docusaurus.config.js` file:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
items: [
|
||||
// highlight-start
|
||||
{
|
||||
type: 'docsVersionDropdown',
|
||||
},
|
||||
// highlight-end
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
The docs version dropdown appears in your navbar:
|
||||
|
||||

|
||||
|
||||
## Update an existing version
|
||||
|
||||
It is possible to edit versioned docs in their respective folder:
|
||||
|
||||
- `versioned_docs/version-1.0/hello.md` updates `http://localhost:3000/docs/hello`
|
||||
- `docs/hello.md` updates `http://localhost:3000/docs/next/hello`
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Translate your site
|
||||
|
||||
Let's translate `docs/intro.md` to French.
|
||||
|
||||
## Configure i18n
|
||||
|
||||
Modify `docusaurus.config.js` to add support for the `fr` locale:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en', 'fr'],
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Translate a doc
|
||||
|
||||
Copy the `docs/intro.md` file to the `i18n/fr` folder:
|
||||
|
||||
```bash
|
||||
mkdir -p i18n/fr/docusaurus-plugin-content-docs/current/
|
||||
|
||||
cp docs/intro.md i18n/fr/docusaurus-plugin-content-docs/current/intro.md
|
||||
```
|
||||
|
||||
Translate `i18n/fr/docusaurus-plugin-content-docs/current/intro.md` in French.
|
||||
|
||||
## Start your localized site
|
||||
|
||||
Start your site on the French locale:
|
||||
|
||||
```bash
|
||||
npm run start -- --locale fr
|
||||
```
|
||||
|
||||
Your localized site is accessible at [http://localhost:3000/fr/](http://localhost:3000/fr/) and the `Getting Started` page is translated.
|
||||
|
||||
:::caution
|
||||
|
||||
In development, you can only use one locale at a time.
|
||||
|
||||
:::
|
||||
|
||||
## Add a Locale Dropdown
|
||||
|
||||
To navigate seamlessly across languages, add a locale dropdown.
|
||||
|
||||
Modify the `docusaurus.config.js` file:
|
||||
|
||||
```js title="docusaurus.config.js"
|
||||
export default {
|
||||
themeConfig: {
|
||||
navbar: {
|
||||
items: [
|
||||
// highlight-start
|
||||
{
|
||||
type: 'localeDropdown',
|
||||
},
|
||||
// highlight-end
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
The locale dropdown now appears in your navbar:
|
||||
|
||||

|
||||
|
||||
## Build your localized site
|
||||
|
||||
Build your site for a specific locale:
|
||||
|
||||
```bash
|
||||
npm run build -- --locale fr
|
||||
```
|
||||
|
||||
Or build your site to include all the locales at once:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"label": "Usage",
|
||||
"position": 3,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Learn how to use RA.Aid effectively in different scenarios."
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
# Create a Game using RA.Aid
|
||||
|
||||
RA.Aid can work on almost any kind of software, including writing games in languages like C++.
|
||||
|
||||
## Creating the Initial Game
|
||||
|
||||
To get started with creating a game, you can use RA.Aid with a simple command like:
|
||||
|
||||
```
|
||||
ra-aid -m "Create a basic breakout clone in C++ using opengl."
|
||||
```
|
||||
|
||||
## Adding Features
|
||||
|
||||
Once your base game is working, you can add features like this:
|
||||
|
||||
```
|
||||
ra-aid -m "Add score tracking/display to the main screen."
|
||||
```
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# Create a Modern Web App
|
||||
|
||||
When using AI tools like RA.Aid to create a modern web application, it's most effective to break down the work from a high level into discrete tasks. This guide will walk you through a practical example of building a Next.js application with common modern features.
|
||||
|
||||
## Setting Up a Fresh Next.js Application
|
||||
|
||||
To get started with a new Next.js project, you can use RA.Aid with a simple command like:
|
||||
|
||||
```
|
||||
ra-aid -m "Initialize a new nextjs app."
|
||||
```
|
||||
|
||||
RA.Aid will execute the necessary commands and set up a clean Next.js project for you with the latest best practices. It'll even search the web to read documentation about the latest version of Next.
|
||||
|
||||
## Adding shadcn/ui Components
|
||||
|
||||
Once your base Next.js application is ready, you can add the shadcn/ui component library. Tell RA.Aid:
|
||||
|
||||
```
|
||||
ra-aid -m "Install shadcn into this project and put a few examples of shadcn components on the main page."
|
||||
```
|
||||
|
||||
This will configure your project with shadcn/ui's CLI, set up the necessary styling, and add your first components.
|
||||
|
||||
## Integrating Prisma with SQLite
|
||||
|
||||
For database integration, you can add Prisma ORM with SQLite. Simply instruct RA.Aid:
|
||||
|
||||
```
|
||||
ra-aid -m "Integrate prisma/sqlite into this project."
|
||||
```
|
||||
|
||||
RA.Aid will handle the Prisma setup, create your database schema, and set up your first model.
|
||||
|
||||
## Adding Features Incrementally
|
||||
|
||||
With the foundation in place, you can start adding features one by one. Here's an example:
|
||||
|
||||
```
|
||||
ra-aid -m "Add a simple user registration form. Include fields for email and password."
|
||||
```
|
||||
|
||||
Keep your feature requests focused and specific. This allows RA.Aid to implement them effectively while maintaining code quality.
|
||||
|
||||
Remember to build your application incrementally, testing each feature as it's added. This approach helps manage complexity and ensures a stable development process.
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# Work with an Existing Mono Repo using RA.Aid
|
||||
|
||||
RA.Aid is good at handling complex monorepo projects. For example, if you you have an app set up like this:
|
||||
|
||||
```
|
||||
app/
|
||||
web/
|
||||
backend/
|
||||
```
|
||||
|
||||
You can run RA.Aid at the top level and give it commands like this:
|
||||
|
||||
```
|
||||
ra-aid -m "Update the user form to support birthdates. Be sure to also update the DB model and migration scripts."
|
||||
```
|
||||
|
||||
RA.Aid will proceed to work on multiple high-level components of your application.
|
||||
|
|
@ -17,6 +17,10 @@ const config: Config = {
|
|||
locales: ['en'],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
'@docusaurus/plugin-vercel-analytics'
|
||||
],
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
|
|
@ -48,7 +52,7 @@ const config: Config = {
|
|||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/smallcloudai/refact-aide',
|
||||
href: 'https://github.com/ai-christianson/RA.Aid',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
|
|
@ -56,7 +60,7 @@ const config: Config = {
|
|||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
|
||||
copyright: `Copyright © ${new Date().getFullYear()} AI Christianson. Built with RA.Aid and Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.7.0",
|
||||
"@docusaurus/plugin-vercel-analytics": "^3.7.0",
|
||||
"@docusaurus/preset-classic": "3.7.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
|
|
@ -3529,6 +3530,66 @@
|
|||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/plugin-vercel-analytics": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/plugin-vercel-analytics/-/plugin-vercel-analytics-3.7.0.tgz",
|
||||
"integrity": "sha512-zEOsqNI3oj4WRO9Dbzsar9fctwAl60PZJqhu14X5W3z5zT/E1TFKrHW/oJHU/a1r5o9K2cFsSNdDn2tyuaFJoQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.7.0",
|
||||
"@docusaurus/logger": "3.7.0",
|
||||
"@docusaurus/types": "3.7.0",
|
||||
"@docusaurus/utils": "3.7.0",
|
||||
"@docusaurus/utils-validation": "3.7.0",
|
||||
"@vercel/analytics": "^1.1.1",
|
||||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/plugin-vercel-analytics/node_modules/@vercel/analytics": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.5.0.tgz",
|
||||
"integrity": "sha512-MYsBzfPki4gthY5HnYN7jgInhAZ7Ac1cYDoRWFomwGHWEX7odTEzbtg9kf/QSo7XEsEAqlQugA6gJ2WS2DEa3g==",
|
||||
"license": "MPL-2.0",
|
||||
"peerDependencies": {
|
||||
"@remix-run/react": "^2",
|
||||
"@sveltejs/kit": "^1 || ^2",
|
||||
"next": ">= 13",
|
||||
"react": "^18 || ^19 || ^19.0.0-rc",
|
||||
"svelte": ">= 4",
|
||||
"vue": "^3",
|
||||
"vue-router": "^4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@remix-run/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@sveltejs/kit": {
|
||||
"optional": true
|
||||
},
|
||||
"next": {
|
||||
"optional": true
|
||||
},
|
||||
"react": {
|
||||
"optional": true
|
||||
},
|
||||
"svelte": {
|
||||
"optional": true
|
||||
},
|
||||
"vue": {
|
||||
"optional": true
|
||||
},
|
||||
"vue-router": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@docusaurus/preset-classic": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@docusaurus/preset-classic/-/preset-classic-3.7.0.tgz",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@docusaurus/core": "3.7.0",
|
||||
"@docusaurus/plugin-vercel-analytics": "^3.7.0",
|
||||
"@docusaurus/preset-classic": "3.7.0",
|
||||
"@mdx-js/react": "^3.0.0",
|
||||
"clsx": "^2.0.0",
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 4.2 KiB |
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue