How To: Set Coding Preferences with Rules
# How To: Set Coding Preferences with Rules import VideoEmbed from '@components/VideoEmbed.astro'; import { Steps } from '@astrojs/starlight/components'; Learn how to use Warp’s Rules feature to define your personal environment and tool preferences for every coding session. <VideoEmbed url="https://youtu.be/zWvRB2zWr-4?si=tv-TIhsqEtLG9iDs" /> This tutorial teaches you how to customize your development setup using **Warp’s Rules** — ensuring the AI agent always works in your preferred environment. Instead of constantly reminding it which package manager or environment to use, you can **store those preferences as persistent Rules** that apply automatically across projects. <Steps> 1. #### The Problem When using AI tools to write or modify code, they often default to outdated or undesired tools.\ For example, many agents still use **npm** instead of **pnpm** — or **pip** instead of **miniconda**. Warp fixes this by letting you define your preferences once, and then applying them automatically whenever your agent runs commands. 2. #### The Rule Setup You can set Rules for how you want the AI to handle environments, dependencies, and commands. **Example Rule** ``` Rule: Environment Preferences - Always use pnpm for Node.js projects unless the project already uses npm. - Default to miniconda for Python environments. - Use the Tauri CLI when building desktop apps. ``` This ensures the agent automatically chooses the right package manager or environment — no extra prompts required. 3. #### Supported Use Cases You can apply Rules to: * Package managers (e.g., npm → pnpm) * Environment tools (e.g., virtualenv → miniconda) * Framework defaults (e.g., Next.js over React) * CLI utilities or custom build tools </Steps>Store your package manager, environment tool, and CLI preferences as Warp Rules so agents automatically use pnpm, miniconda, or your preferred tools.
Learn how to use Warp’s Rules feature to define your personal environment and tool preferences for every coding session.
This tutorial teaches you how to customize your development setup using Warp’s Rules — ensuring the AI agent always works in your preferred environment. Instead of constantly reminding it which package manager or environment to use, you can store those preferences as persistent Rules that apply automatically across projects.
-
The Problem
Section titled “The Problem”When using AI tools to write or modify code, they often default to outdated or undesired tools.
For example, many agents still use npm instead of pnpm — or pip instead of miniconda.Warp fixes this by letting you define your preferences once, and then applying them automatically whenever your agent runs commands.
-
The Rule Setup
Section titled “The Rule Setup”You can set Rules for how you want the AI to handle environments, dependencies, and commands.
Example Rule
Rule: Environment Preferences- Always use pnpm for Node.js projects unless the project already uses npm.- Default to miniconda for Python environments.- Use the Tauri CLI when building desktop apps.This ensures the agent automatically chooses the right package manager or environment — no extra prompts required.
-
Supported Use Cases
Section titled “Supported Use Cases”You can apply Rules to:
- Package managers (e.g., npm → pnpm)
- Environment tools (e.g., virtualenv → miniconda)
- Framework defaults (e.g., Next.js over React)
- CLI utilities or custom build tools