Open-source context engineering CLI

ContextAI
All Your AI Agents.

Define your project conventions once in context.config.ts. Generate AI-readable files for every tool — automatically.

CLAUDECURSORCOPILOTCODEXKIROANTIGRAVITYWINDSURFGEMINICLAUDECURSORCOPILOTCODEXKIROANTIGRAVITYWINDSURFGEMINI

How It Works

01

Run init

Interactive wizard detects your framework and creates context.config.ts with sensible defaults.

02

Describe your project

Add your stack, conventions, architecture, and rules you want every AI agent to follow.

03

Generate

Run generate once — or use watch mode to keep all output files in sync automatically.

04

Stay in sync

Validate and diff commands check that all AI context files reflect your latest config.

Quick Start

Get up and running in seconds.

Terminal
$ npm install -g contextai
context.config.ts
import { defineContext } from 'contextai';

export default defineContext({
  project: {
    name: 'my-app',
    stack: ['TypeScript', 'React', 'Node.js'],
    architecture: 'Monorepo with shared packages',
  },
  conventions: {
    code: [
      { title: 'Naming', items: ['camelCase for variables'] },
    ],
  },
  outputs: {
    'AGENTS.md': true,
    'CLAUDE.md': true,
    '.cursorrules': true,
  },
});

Output Targets

One config generates context files for every major AI coding assistant.

AGENTS.md

OpenAI Codex and generic AI agents

CLAUDE.md

Claude context file

.cursorrules

Cursor editor rules

copilot-instructions.md

GitHub Copilot instructions

llms.txt

LLM-compatible structured file

.kiro/steering/

Kiro steering files

.windsurf/rules/

Windsurf IDE (Cascade)

GEMINI.md

Gemini CLI & Antigravity (Google)

Terminal
$

CLI

Framework-agnostic, zero runtime overhead.

contextai initInteractive setup wizard
contextai generateGenerate all output files
contextai validateCheck files are fresh
contextai diffShow changes
contextai watchAuto-regenerate on changes

Open Source

Explore the repositories, contribute, and help shape the future of context engineering.