Complete guide to installing, configuring, and using Mayor West Mode
- Quick Start
- Installation Methods
- CLI Commands
- Setup Wizard
- Configuration Options
- Post-Setup Steps
- Troubleshooting
- Advanced Usage
One command to get started (requires Node.js 18+):
npx github:shyamsridhar123/MayorWest setupFollow the interactive prompts, then verify:
npx github:shyamsridhar123/MayorWest verifyRun directly without installing—always gets the latest version:
npx github:shyamsridhar123/MayorWest setupInstall once, use everywhere:
npm install -g mayor-west-mode
mayor-west-mode setupVersion-lock for team consistency:
npm install mayor-west-mode --save-dev
npx github:shyamsridhar123/MayorWest setupFor CI/CD or environments without Node.js:
docker run -v $(pwd):/app -w /app node:18 npx github:shyamsridhar123/MayorWest setupnpx github:shyamsridhar123/MayorWest setupWalks you through:
- Git repository verification
- Setup mode selection (Full/Minimal/Custom)
- Auto-merge preferences
- Iteration limit configuration
- File creation
npx mayor-west-mode planBreak down a complex goal into multiple GitHub issues:
- Enter your high-level goal
- Break it into specific tasks
- Add context and acceptance criteria (optional)
- Preview and confirm
- Issues are created with
mayor-tasklabel
Copilot is assigned automatically by the orchestrator workflow.
npx github:shyamsridhar123/MayorWest verifyChecks for:
- ✓ Git repository
- ✓ VS Code YOLO settings
- ✓ Agent instructions
- ✓ Auto-merge workflow
- ✓ Orchestrator workflow
- ✓ Task template
- ✓ GitHub remote
npx mayor-west-mode uninstallCompletely removes all Mayor West files:
- Lists all existing Mayor West files
- Asks for confirmation (type "uninstall")
- Removes all files and empty directories
- Offers to commit and push the removal
Also reminds you to clean up:
GH_AW_AGENT_TOKENsecret- PAT token on GitHub
- Auto-merge settings
npx github:shyamsridhar123/MayorWest statusShows:
- Repository information
- Which files exist
- What's missing
npx github:shyamsridhar123/MayorWest examplesDisplays:
- Sample task definitions
- Complexity guidelines
- Best practices
npx github:shyamsridhar123/MayorWest helpThe CLI verifies you're in a git repository with a GitHub remote.
If this fails:
git init
git remote add origin git@github.com:user/repo.git? Which setup mode would you like?
❯ Full Setup (all files + configuration)
Minimal Setup (core files only)
Custom Setup (choose files individually)
| Mode | Files Created | Best For |
|---|---|---|
| Full | All 5 files | Most users |
| Minimal | 4 core files | Custom templates |
| Custom | Your choice | Incremental adoption |
? Enable auto-merge on PRs? (Y/n)
? How should PRs be merged? (Squash/Merge/Rebase)
? Max iterations before stopping: (15)
The CLI creates:
.vscode/settings.json.github/agents/mayor-west-mode.md.github/workflows/mayor-west-auto-merge.yml.github/workflows/mayor-west-orchestrator.yml.github/ISSUE_TEMPLATE/mayor-task.md
Located in .vscode/settings.json:
{
"chat.tools.autoApprove": true,
"chat.tools.terminal.autoApprove": {
"/^git\\s+(commit|push)\\b/": true,
"/^(npm|pnpm|yarn)\\s+(test|lint|build)\\b/": true,
"rm": false,
"kill": false
},
"chat.agent.iterationLimit": 15
}Customizing approved commands:
{
"chat.tools.terminal.autoApprove": {
"/^pytest\\b/": true, // Add pytest
"/^cargo\\s+(test|build)\\b/": true, // Add cargo
"/^docker\\s+push/": false // Block docker push
}
}Modify .github/agents/mayor-west-mode.md to add project-specific rules:
## Project-Specific Rules
- Use TypeScript strict mode
- Follow BEM naming for CSS
- Write JSDoc for public APIsEnable auto-merge:
GitHub.com → Repository → Settings → Pull Requests → ✅ Allow auto-merge
Add branch protection:
GitHub.com → Settings → Branches → Add Rule
├─ Branch: main
├─ ✅ Require status checks
└─ ✅ Require pull request reviews (1)
git add .vscode .github
git commit -m "[MAYOR] Add autonomous workflow configuration"
git push origin main- Create a simple test issue using the Mayor Task template
- Go to Actions → Mayor West Orchestrator → Run workflow
- Watch Copilot implement the task
git init
git remote add origin git@github.com:user/repo.git
npx github:shyamsridhar123/MayorWest setupgit remote add origin git@github.com:user/repo.git
npx github:shyamsridhar123/MayorWest setupVerify your remote points to GitHub:
git remote -v
# Should show: origin git@github.com:user/repo.gitnode --version # Need 18+
nvm install 18 && nvm use 18The CLI will ask if you want to overwrite. Choose "Yes" to update with latest templates.
Run setup in Custom mode and select only the missing files:
npx github:shyamsridhar123/MayorWest setup
# Choose: Custom Setup
# Select: [missing files only]Setup multiple repositories at once:
#!/bin/bash
for repo in repo-a repo-b repo-c; do
cd ~/projects/$repo
npx github:shyamsridhar123/MayorWest setup
git add .vscode .github
git commit -m "[MAYOR] Add autonomous workflow configuration"
git push origin main
doneAdd to your CI pipeline:
- name: Verify Mayor West Setup
run: npx github:shyamsridhar123/MayorWest verifySimple projects:
# During setup, choose: 10 iterationsComplex projects:
# During setup, choose: 25 iterations| Requirement | Version |
|---|---|
| Node.js | 18.0.0+ |
| Git | Any recent |
| GitHub | Repository access |
| Copilot | Pro or Business license |
npx github:shyamsridhar123/MayorWest help # CLI help
npx github:shyamsridhar123/MayorWest examples # Usage examples
npx github:shyamsridhar123/MayorWest status # Current stateDocumentation:
- CLI-README.md — Main README
- mayor_west_mode_trd.md — Technical details
- mayor_west_quick_ref.md — Quick reference
Mayor West Mode v1.0.0