Lesson 2: Setting Up Your Workspace
Prerequisites
Section titled “Prerequisites”Before you begin, make sure you have:
- Node.js 22+ or Bun 1.0+ installed
- Git configured with your GitHub credentials
- A terminal you are comfortable with
Installation
Section titled “Installation”Using Bun (Recommended)
Section titled “Using Bun (Recommended)”bun add -g rearchUsing npm
Section titled “Using npm”npm install -g rearchVerify the installation:
rearch --version# rearch v1.2.0Initialising a Project
Section titled “Initialising a Project”Navigate to your project directory and run:
rearch initThis creates a .rearch/ directory in your project root with the following structure:
.rearch/├── config.yaml # Project configuration├── prompts/│ └── default.md # Default agent system prompt├── pipelines/│ └── feature.yaml # Default feature pipeline└── context/ └── .gitkeep # Additional context filesConfiguration
Section titled “Configuration”Open .rearch/config.yaml to review the defaults:
project: name: my-project language: typescript framework: auto-detect
agent: model: default temperature: 0.2 max_tokens: 4096
pipeline: default: feature test_command: "npm test" lint_command: "npm run lint"Key Settings
Section titled “Key Settings”| Setting | Description | Default |
|---|---|---|
project.language | Primary language of the codebase | Auto-detected |
project.framework | Framework in use (React, Next.js, etc.) | Auto-detected |
agent.temperature | Creativity level (0 = deterministic, 1 = creative) | 0.2 |
agent.max_tokens | Maximum output length per agent turn | 4096 |
pipeline.test_command | Command to run tests | npm test |
pipeline.lint_command | Command to run linting | npm run lint |
Editor Integration
Section titled “Editor Integration”ReArch works from the command line, but you can improve the experience with editor extensions:
VS Code
Section titled “VS Code”Install the ReArch extension from the marketplace. It adds:
- A sidebar panel showing active tasks and agent status
- Inline annotations when the agent modifies files
- One-click task creation from selected code
JetBrains IDEs
Section titled “JetBrains IDEs”A plugin is available through the JetBrains Marketplace. Search for “ReArch” in your IDE’s plugin settings.
Verify Your Setup
Section titled “Verify Your Setup”Run the built-in health check:
rearch doctorExpected output:
✓ Configuration valid✓ Git repository detected✓ API connection established✓ Model access confirmed✓ Test command works: npm test✓ Lint command works: npm run lint
All checks passed. You are ready to go.If any checks fail, consult the Installation guide for troubleshooting steps.
What’s Next
Section titled “What’s Next”Your workspace is ready. In the next lesson, you will create and run your first AI-powered coding task.