autostackrc
CLI Zero-config · No API key

Your stack, taught to your AI.

autostackrc detects your tech stack and generates tailored rules & slash-commands for Claude Code, Cursor, GitHub Copilot, and opencode — enriched by your own coder CLI. No API key.

npx autostackrc
Node ≥ 22.6 Zero runtime deps 4 assistants Idempotent MIT

What it does

autostackrc generates guidance specific to your project and writes it in each assistant's native format — so every AI tool in your repo follows the same rules.

How it works

DETECT

Scan the project

Reads package.json, config files, and file extensions to identify 44 technologies.

ASSEMBLE

Build a baseline

Static, auditable rule & command templates (from templates/) — works fully offline.

ENRICH

Delegate to your coder

Hands the baseline to your installed coder CLI, using its login session. No API key.

WRITE

Project into every tool

One agent-agnostic result, written to each selected assistant's files.

No API key. autostackrc never calls an API directly. It detects an installed coder CLI — claude, opencode, or cursor-agent — runs it headless, and parses the JSON it returns. Whatever session that CLI is logged into does the work. No CLI found (or --no-llm)? It emits the static templates as-is — never hard-fails.

Output per assistant

Shared files are edited inside an <!-- autostackrc:start/end --> block, so re-runs update only that block and leave your own content untouched.

AssistantRulesCommands
Claude Code CLAUDE.md (managed block) .claude/commands/*.md
Cursor .cursor/rules/*.mdc (per tech, globs/alwaysApply) .cursor/commands/*.md
GitHub Copilot .github/copilot-instructions.md + .github/instructions/*.md .github/prompts/*.prompt.md
opencode AGENTS.md (managed block) .opencode/command/*.md

Usage

Run it in your project root. Interactive by default; scriptable with flags.

# detect, generate, write (interactive)
npx autostackrc

# accept defaults, no prompts
npx autostackrc -y

# preview without writing
npx autostackrc --dry-run

# only some assistants
npx autostackrc -a claude-code cursor

# offline: static templates only
npx autostackrc --no-llm

# force a specific coder CLI
npx autostackrc --coder opencode
FlagEffect
-y, --yesSkip confirmation prompts
--dry-runShow the plan, write nothing
-a, --agentTarget subset: claude-code cursor copilot opencode
--no-llmSkip enrichment, emit static templates only
--coder <id>Force coder CLI: claude, opencode, cursor-agent
--model <id>Model hint passed to the coder CLI (if supported)
-v, --verboseShow traces and error detail

Supported stack

Frontend, backend, mobile, data, tooling, and infra — extend the catalog to add more.

    Extending

    The architecture is one intermediate representation projected by per-assistant writers.

    # add a technology
    → create templates/rules/<id>.md + a seed in TECH_SEEDS (catalog.ts)
    
    # add a command
    → create templates/commands/<id>.md (generic: true, or wire into a tech)
    
    # add an assistant
    → add a writer in writers/, register in writer.ts + agents.ts