Skip to content

Lesson 2: Setting Up Your Workspace

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
Terminal window
bun add -g rearch
Terminal window
npm install -g rearch

Verify the installation:

Terminal window
rearch --version
# rearch v1.2.0

Navigate to your project directory and run:

Terminal window
rearch init

This 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 files

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"
SettingDescriptionDefault
project.languagePrimary language of the codebaseAuto-detected
project.frameworkFramework in use (React, Next.js, etc.)Auto-detected
agent.temperatureCreativity level (0 = deterministic, 1 = creative)0.2
agent.max_tokensMaximum output length per agent turn4096
pipeline.test_commandCommand to run testsnpm test
pipeline.lint_commandCommand to run lintingnpm run lint

ReArch works from the command line, but you can improve the experience with editor extensions:

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

A plugin is available through the JetBrains Marketplace. Search for “ReArch” in your IDE’s plugin settings.

Run the built-in health check:

Terminal window
rearch doctor

Expected 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.

Your workspace is ready. In the next lesson, you will create and run your first AI-powered coding task.