|
1 | 1 | --- |
2 | 2 | sidebar_position: 1 |
| 3 | +slug: /intro |
3 | 4 | --- |
4 | 5 |
|
5 | | -# Tutorial Intro |
| 6 | +# Getting Started |
6 | 7 |
|
7 | | -Let's discover **Docusaurus in less than 5 minutes**. |
| 8 | +Raid is a CLI tool that lets you define your entire development environment — repositories, install steps, environment configs, and team commands — in a single YAML profile. Check it in, share it with the team, and anyone can go from a blank machine to a fully running environment with one command. |
8 | 9 |
|
9 | | -## Getting Started |
| 10 | +## Install |
10 | 11 |
|
11 | | -Get started by **creating a new site**. |
| 12 | +**Homebrew** |
| 13 | +```bash |
| 14 | +brew install 8bitalex/tap/raid |
| 15 | +``` |
12 | 16 |
|
13 | | -Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. |
| 17 | +**Script** |
| 18 | +```bash |
| 19 | +curl -fsSL https://raw.githubusercontent.com/8bitalex/raid/main/install.sh | bash |
| 20 | +``` |
14 | 21 |
|
15 | | -### What you'll need |
| 22 | +## Create a profile |
16 | 23 |
|
17 | | -- [Node.js](https://nodejs.org/en/download/) version 20.0 or above: |
18 | | - - When installing Node.js, you are recommended to check all checkboxes related to dependencies. |
| 24 | +Run the interactive wizard to create your first profile: |
19 | 25 |
|
20 | | -## Generate a new site |
| 26 | +```bash |
| 27 | +raid profile create |
| 28 | +``` |
21 | 29 |
|
22 | | -Generate a new Docusaurus site using the **classic template**. |
| 30 | +The wizard asks for a profile name and walks you through adding repositories. Each repository needs a name, a Git URL, and a local path. |
23 | 31 |
|
24 | | -The classic template will automatically be added to your project after you run the command: |
| 32 | +You can also write the profile file manually and register it: |
25 | 33 |
|
26 | 34 | ```bash |
27 | | -npm init docusaurus@latest my-website classic |
| 35 | +raid profile add ./my-profile.yaml |
28 | 36 | ``` |
29 | 37 |
|
30 | | -You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. |
| 38 | +See [Profile Configuration](./profile) for the full file format. |
| 39 | + |
| 40 | +## Install your environment |
| 41 | + |
| 42 | +Once a profile is active, clone all repositories and run their install tasks: |
31 | 43 |
|
32 | | -The command also installs all necessary dependencies you need to run Docusaurus. |
| 44 | +```bash |
| 45 | +raid install |
| 46 | +``` |
| 47 | + |
| 48 | +Raid clones all repositories concurrently, then runs profile-level install tasks followed by each repository's install tasks in profile order. |
| 49 | + |
| 50 | +To install a single repository: |
| 51 | + |
| 52 | +```bash |
| 53 | +raid install <repo-name> |
| 54 | +``` |
33 | 55 |
|
34 | | -## Start your site |
| 56 | +## Run a command |
35 | 57 |
|
36 | | -Run the development server: |
| 58 | +If your profile or any of its repositories define custom commands, they are available immediately: |
37 | 59 |
|
38 | 60 | ```bash |
39 | | -cd my-website |
40 | | -npm run start |
| 61 | +raid <command> |
41 | 62 | ``` |
42 | 63 |
|
43 | | -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. |
| 64 | +Run `raid --help` to see all available commands, including any defined in the active profile. |
44 | 65 |
|
45 | | -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/. |
| 66 | +## Next steps |
46 | 67 |
|
47 | | -Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. |
| 68 | +- [Profile Configuration](./profile) — repositories, environments, and commands |
| 69 | +- [Task Types](./tasks) — everything a task can do |
| 70 | +- [Environments](./environments) — switch between dev, staging, and production |
| 71 | +- [Command Reference](./commands) — built-in commands |
0 commit comments