Remote OpenClaw

Remote OpenClaw Blog

How to Set Up OpenClaw for a New Project in 5 Minutes

5 min read ·

Getting started with OpenClaw should not take an afternoon. If you have a new project — or an existing one you want to enhance with an AI agent — you can go from zero to a fully configured OpenClaw setup in under five minutes. This guide walks through every step: initialization, skill selection, configuration, and your first run.

Prerequisites

Before you start, make sure you have:

  • Node.js 18+ installed (check with node --version)
  • A package manager: npm, yarn, pnpm, or bun
  • An OpenClaw account: Sign up free at openclaw.dev if you have not already
  • An API key: Generate one from your OpenClaw dashboard under Settings > API Keys

That is it. No Docker containers, no complex infrastructure, no cloud services to provision.

Step 1: Install the OpenClaw CLI

Install the CLI globally so you can use it across all your projects:

npm install -g @openclaw/cli

Or if you prefer bun:

bun install -g @openclaw/cli

Verify the installation:

openclaw --version
# openclaw v2.4.1

Step 2: Initialize OpenClaw in Your Project

Navigate to your project root and run the init command:

cd your-project
openclaw init

The init command does three things:

  1. Creates an .openclaw/ directory in your project root
  2. Generates a default openclaw.config.toml configuration file
  3. Adds .openclaw/cache/ to your .gitignore (keeping installed skills tracked in version control)

Your project structure now looks like this:

your-project/
├── .openclaw/
│   ├── skills/          # Installed skills live here
│   └── cache/           # Temporary agent cache (gitignored)
├── openclaw.config.toml # Project configuration
├── package.json
└── ...your other files

Step 3: Authenticate

Link your CLI to your OpenClaw account:

openclaw auth login

This opens a browser window for authentication. Once you confirm, the CLI stores your token locally. You only need to do this once per machine.

Alternatively, set the API key directly for CI environments:

export OPENCLAW_API_KEY=your-api-key-here

Step 4: Pick Skills From the Bazaar

This is where the setup gets interesting. Browse the OpenClaw Bazaar skills directory to find skills that match your project's stack. You can also search from the CLI:

openclaw skill search "next.js app router"

The search returns a ranked list of matching skills with install counts, ratings, and compatibility info:

RESULTS (12 skills found)
─────────────────────────────────────────────
1. next-app-router-expert     ★ 4.9  ↓ 84,200
   Next.js App Router patterns, server components, and best practices

2. next-testing-patterns       ★ 4.8  ↓ 41,300
   Testing strategies for Next.js applications with Vitest and Playwright

3. next-security-hardening     ★ 4.7  ↓ 29,100
   Security best practices for Next.js: CSP, headers, auth patterns

Install the skills you want:

openclaw skill install next-app-router-expert
openclaw skill install next-testing-patterns
openclaw skill install typescript-strict-mode

Each install takes about two seconds. The skill files land in .openclaw/skills/, and your openclaw.config.toml updates automatically.

Choosing the Right Skills

Start with two to four skills. More than that and you risk instruction conflicts or bloated context windows. A good starting combination for most projects:

  • One framework skill that matches your primary stack (Next.js, Django, Rails, etc.)
  • One code quality skill like typescript-strict-mode or python-type-hints
  • One testing skill that aligns with your test runner
  • One team convention skill if your organization has one published

Marketplace

Free skills and AI personas for OpenClaw — browse the marketplace.

Browse the Marketplace →

You can always add more later as your needs evolve.

Step 5: Configure Your Setup

Open openclaw.config.toml to review and customize:

[project]
name = "your-project"
description = "Brief description of your project"

[agent]
model = "default"
max_context_tokens = 100000
temperature = 0.3

[skills]
active = [
  "next-app-router-expert",
  "next-testing-patterns",
  "typescript-strict-mode",
]

[skills.priority]
# Higher number = higher priority when skills conflict
next-app-router-expert = 10
typescript-strict-mode = 8
next-testing-patterns = 5

The key settings to review:

  • description: Give your project a clear description. The agent uses this to understand context.
  • active: Confirms which skills are loaded. Disable one temporarily by removing it from this array.
  • priority: Controls which skill wins when two skills give conflicting instructions. Higher number takes precedence.

Step 6: Run Your First Session

Start the agent:

openclaw run

You should see the agent boot with your skills loaded:

OpenClaw Agent v2.4.1
─────────────────────
Project: your-project
Skills loaded: 3
  ✓ next-app-router-expert (v1.8.2)
  ✓ next-testing-patterns (v2.1.0)
  ✓ typescript-strict-mode (v1.3.4)

Ready. Type your request or press Ctrl+C to exit.

Try a first request to confirm everything works:

> Create a new API route at /api/users that returns a list of users with proper TypeScript types

The agent will generate code that follows Next.js App Router conventions (from the framework skill), uses strict TypeScript types (from the code quality skill), and includes test suggestions (from the testing skill). All three skills working together, shaping the agent's output to match your project's standards.

Troubleshooting Common Setup Issues

"openclaw: command not found" — The global install did not add the binary to your PATH. Try npx @openclaw/cli init instead, or add the global bin directory to your shell profile.

"Skill not found: skill-name" — Check the exact slug on the Bazaar directory. Skill names are case-sensitive and use hyphens, not underscores.

"Authentication failed" — Run openclaw auth logout and then openclaw auth login again. If using an API key, verify it has not expired in your dashboard.

"Context window exceeded" — You have too many skills loaded or your project description is too long. Reduce active skills or increase max_context_tokens.

What Comes Next

Once your setup is running, you can:

  • Add more skills as you discover new needs: openclaw skill install <name>
  • Create team-wide configurations by committing .openclaw/ to your repository
  • Build custom skills specific to your codebase conventions
  • Chain skills together for complex, multi-step workflows

The initial five-minute setup gives you a solid foundation. Everything else builds on top of it incrementally — no need to plan your entire skill stack upfront.


Browse the Skills Directory

Find the right skill for your workflow. The OpenClaw Bazaar skills directory has over 2,300 community-rated skills — searchable, sortable, and free to install.

Browse Skills →

Built a Skill? List It on the Bazaar

If you have built a skill that others would find useful, publish it on the Bazaar. Reach thousands of developers and get feedback from the community.

Learn how to publish →