flight-dispatcher
v1.1.0
Published
Zero-install CLI that auto-generates .github/copilot-instructions.md for any project
Downloads
17
Maintainers
Readme
flight-dispatcher ✈
Zero-install CLI that auto-generates .github/copilot-instructions.md for any project.
npx flight-dispatcherGitHub Copilot has no memory between sessions. flight-dispatcher solves this by generating a persistent context file that VS Code automatically injects into every Copilot Chat session — your stack, conventions, architecture rules, and todos, always there.
How It Works
Three layers, one command:
- Global Profile — Set once, reused across every project. Your code style, language preference, commit conventions, and custom rules.
- Auto-Detection — Scans your project silently. Reads
package.json,tsconfig.json,prisma/schema.prisma,docker-compose.yml,.env.example, git history, and more. - Interactive Questions — Only asks what it can't detect. Project description, deployment target, architecture rules, pending todos.
Result: a structured .github/copilot-instructions.md that makes Copilot immediately useful without repeating yourself.
Usage
npx flight-dispatcher # Standard run
npx flight-dispatcher --update # Re-detect + merge, preserve manual edits
npx flight-dispatcher --reset-profile # Redo your global developer profile
npx flight-dispatcher --dry-run # Preview output without writing
npx flight-dispatcher --silent # No questions, auto-detect only
npx flight-dispatcher --help # Show helpWhat Gets Generated
The output file includes these sections:
| Section | Source | |---------|--------| | About This Project | Your 1–2 sentence description | | Developer Preferences | Global profile (language, style, commit format) | | Tech Stack | Auto-detected from deps, configs, and files | | Project Structure | Auto-detected directories | | Architecture Rules | Your project-specific rules | | Copilot Behavior | Standing orders — things you always tell Copilot, defined once | | Deployment | Your target + detected CI/CD | | Git Hooks | Summary of configured git automations | | Pending TODOs | Your checklist | | Known Conventions | Auto-detected conventions (Prettier config, commit style, etc.) |
Standing Orders — Say It Once, Active Forever
Stop repeating yourself in every prompt. Define standing orders once and Copilot follows them automatically in this project:
## Copilot Behavior
- When I say "remember this", update .github/copilot-instructions.md with the new information
- When I mention a TODO or say "add to todo list", append it to ## Pending TODOs in this file
- When we discuss an architectural decision, add it to ## Architecture Rules in this file
- Always suggest running the build command before git push
- When introducing new features, remind me to update the README
- Never suggest installing a new dependency without checking if a similar library is already in useGit Hook Automations
Select from preset automations or add your own. Writes real executable scripts to .git/hooks/ — pushes and commits are blocked if the automation fails:
❯ ◉ Build before push (pre-push: npm run build)
◯ Lint before commit (pre-commit: npm run lint)
◯ Tests before push (pre-push: npm run test)
◯ Type-check before commit (pre-commit: npx tsc --noEmit)
◯ Format files before commit (pre-commit: npm run format)
◯ Security audit before push (pre-push: npm audit --audit-level=high)
◯ + Add custom hook...Custom hooks ask: when (pre-commit, pre-push, post-merge...), description, and command to run. Anything executable works.
| Source | What it detects |
|--------|----------------|
| package.json | Next.js, React, Vue, Svelte, Express, Fastify, NestJS, Prisma, Drizzle, tRPC, Zod, TailwindCSS, auth providers, test runners, build tools... |
| tsconfig.json | TypeScript strictness, path aliases |
| prisma/schema.prisma | DB provider, model names |
| .eslintrc* / prettier.config.* | Code style rules |
| tailwind.config.* | CSS approach |
| docker-compose.yml | Services (Redis, PostgreSQL, etc.) |
| .env.example | Available environment variables |
| requirements.txt / pyproject.toml | Python stack (Django, FastAPI, Flask...) |
| composer.json | PHP stack (Laravel, Symfony...) |
| go.mod | Go modules |
| Cargo.toml | Rust crates |
| Gemfile | Ruby/Rails |
| pom.xml / build.gradle | Java/Kotlin (Spring...) |
| .github/workflows/ | CI/CD platforms |
| messages/*.json | i18n locales |
| Git history | Commit style (conventional or freeform) |
| Directory structure | App Router vs Pages Router, API structure, etc. |
Output Example
# Copilot Instructions — my-project
> Auto-generated by flight-dispatcher on 2026-02-20. Re-run `npx flight-dispatcher` to update.
## About This Project
A SaaS platform for managing team workflows with real-time collaboration.
## Developer Preferences
- **Language:** TypeScript (strict mode)
- **Formatting:** single quotes, no semicolons, 2-space indent
- **Commits:** Conventional commits (feat:, fix:, chore:...)
- Never use `any` in TypeScript
## Tech Stack
- **Language:** TypeScript (strict mode), Node >=18
- **Frontend:** Next.js 15 (App Router), React 19
- **Styling:** TailwindCSS, Radix UI
- **Database:** PostgreSQL via Prisma ORM
- Models: `User`, `Team`, `Project`, `Task`, `Comment`
- **Auth:** NextAuth.js
- **Tests:** Vitest
## Project Structure
- `src/app/` — Next.js App Router pages and layouts
- `src/components/` — Shared React components
- `src/lib/` — Utility functions and helpers
- `prisma/` — Prisma schema and migrations
## Architecture Rules
- DB schema changes: `npx prisma db push --accept-data-loss`
- Client components require `'use client'` directive
- i18n: add translation keys to ALL 4 locale files when introducing new UI text
## Deployment
- **Target:** Vercel
- **CI/CD:** GitHub Actions, Vercel
## Pending TODOs
- [ ] Implement email notifications
- [ ] Add export to CSV feature
## Known Conventions
- **Git commits:** Conventional format (`feat:`, `fix:`, `chore:`, `docs:`, etc.)
- **Code quality:** ESLint + PrettierGlobal Profile
Your developer preferences are stored at ~/.flight-dispatcher/profile.json and automatically applied to every project:
- Preferred language (TypeScript, Python, Go, etc.)
- Code style (indentation, quotes, semicolons)
- Commit convention (conventional commits vs freeform)
- Test framework preference
- Copilot verbosity (concise vs detailed)
- Custom global rules (e.g. "Never use
any") - Comment style preference
Set once, never re-enter per project.
Merge Behavior
When you re-run npx flight-dispatcher or use --update:
| Section | Behavior | |---------|----------| | Auto-detected sections (Tech Stack, Project Structure, etc.) | Refreshed automatically | | About This Project | Preserved — you wrote it | | Architecture Rules | Preserved — you defined them | | Pending TODOs | Preserved — you manage them manually | | Developer Preferences | Re-loaded from global profile |
Requirements
- Node.js ≥ 18
- Works on macOS, Linux, and Windows
Installation (optional)
For frequent use, you can install globally:
npm install -g flight-dispatcher
flight-dispatcherLinks
- npm: https://www.npmjs.com/package/flight-dispatcher
- GitHub: https://github.com/caglarorhan/flight-dispatcher
License
MIT
