mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-31 06:03:29 +08:00
* Add Turkish (tr) docs and update README Add a full set of Turkish documentation under docs/tr (agents, changelog, CLAUDE guide, contributing, code of conduct, and many agents/commands/skills/rules files). Update README to include a link to the Turkish docs and increment the supported language count from 5 to 6. This commit adds localized guidance and references to help Turkish-speaking contributors and users. * Update docs/tr/TROUBLESHOOTING.md Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Update docs/tr/README.md Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * docs(tr): fix license link and update readmes Update Turkish docs: change license badge link to point to repository root (../../LICENSE), increment displayed language count from 5 to 6, and remove two outdated related links from docs/tr/examples/README.md to keep references accurate. * Update docs/tr/commands/instinct-import.md Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> * Update docs/tr/commands/checkpoint.md Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com> --------- Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
6.9 KiB
6.9 KiB
PM2 Init
Projeyi otomatik analiz et ve PM2 servis komutları oluştur.
Komut: $ARGUMENTS
İş Akışı
- PM2'yi kontrol et (yoksa
npm install -g pm2ile yükle) - Servisleri (frontend/backend/database) tanımlamak için projeyi tara
- Config dosyaları ve bireysel komut dosyaları oluştur
Servis Tespiti
| Tip | Tespit | Varsayılan Port |
|---|---|---|
| Vite | vite.config.* | 5173 |
| Next.js | next.config.* | 3000 |
| Nuxt | nuxt.config.* | 3000 |
| CRA | package.json'da react-scripts | 3000 |
| Express/Node | server/backend/api dizini + package.json | 3000 |
| FastAPI/Flask | requirements.txt / pyproject.toml | 8000 |
| Go | go.mod / main.go | 8080 |
Port Tespit Önceliği: Kullanıcı belirtimi > .env > config dosyası > script argümanları > varsayılan port
Oluşturulan Dosyalar
project/
├── ecosystem.config.cjs # PM2 config
├── {backend}/start.cjs # Python wrapper (geçerliyse)
└── .claude/
├── commands/
│ ├── pm2-all.md # Hepsini başlat + monit
│ ├── pm2-all-stop.md # Hepsini durdur
│ ├── pm2-all-restart.md # Hepsini yeniden başlat
│ ├── pm2-{port}.md # Tekli başlat + logs
│ ├── pm2-{port}-stop.md # Tekli durdur
│ ├── pm2-{port}-restart.md # Tekli yeniden başlat
│ ├── pm2-logs.md # Tüm logları göster
│ └── pm2-status.md # Durumu göster
└── scripts/
├── pm2-logs-{port}.ps1 # Tekli servis logları
└── pm2-monit.ps1 # PM2 monitor
Windows Konfigürasyonu (ÖNEMLİ)
ecosystem.config.cjs
.cjs uzantısı kullanmalı
module.exports = {
apps: [
// Node.js (Vite/Next/Nuxt)
{
name: 'project-3000',
cwd: './packages/web',
script: 'node_modules/vite/bin/vite.js',
args: '--port 3000',
interpreter: 'C:/Program Files/nodejs/node.exe',
env: { NODE_ENV: 'development' }
},
// Python
{
name: 'project-8000',
cwd: './backend',
script: 'start.cjs',
interpreter: 'C:/Program Files/nodejs/node.exe',
env: { PYTHONUNBUFFERED: '1' }
}
]
}
Framework script yolları:
| Framework | script | args |
|---|---|---|
| Vite | node_modules/vite/bin/vite.js |
--port {port} |
| Next.js | node_modules/next/dist/bin/next |
dev -p {port} |
| Nuxt | node_modules/nuxt/bin/nuxt.mjs |
dev --port {port} |
| Express | src/index.js veya server.js |
- |
Python Wrapper Script (start.cjs)
const { spawn } = require('child_process');
const proc = spawn('python', ['-m', 'uvicorn', 'app.main:app', '--host', '0.0.0.0', '--port', '8000', '--reload'], {
cwd: __dirname, stdio: 'inherit', windowsHide: true
});
proc.on('close', (code) => process.exit(code));
Komut Dosyası Şablonları (Minimal İçerik)
pm2-all.md (Hepsini başlat + monit)
Tüm servisleri başlat ve PM2 monitör aç.
```bash
cd "{PROJECT_ROOT}" && pm2 start ecosystem.config.cjs && start wt.exe -d "{PROJECT_ROOT}" pwsh -NoExit -c "pm2 monit"
```
pm2-all-stop.md
Tüm servisleri durdur.
```bash
cd "{PROJECT_ROOT}" && pm2 stop all
```
pm2-all-restart.md
Tüm servisleri yeniden başlat.
```bash
cd "{PROJECT_ROOT}" && pm2 restart all
```
pm2-{port}.md (Tekli başlat + logs)
{name} ({port}) başlat ve logları aç.
```bash
cd "{PROJECT_ROOT}" && pm2 start ecosystem.config.cjs --only {name} && start wt.exe -d "{PROJECT_ROOT}" pwsh -NoExit -c "pm2 logs {name}"
```
pm2-{port}-stop.md
{name} ({port}) durdur.
```bash
cd "{PROJECT_ROOT}" && pm2 stop {name}
```
pm2-{port}-restart.md
{name} ({port}) yeniden başlat.
```bash
cd "{PROJECT_ROOT}" && pm2 restart {name}
```
pm2-logs.md
Tüm PM2 loglarını göster.
```bash
cd "{PROJECT_ROOT}" && pm2 logs
```
pm2-status.md
PM2 durumunu göster.
```bash
cd "{PROJECT_ROOT}" && pm2 status
```
PowerShell Scripts (pm2-logs-{port}.ps1)
Set-Location "{PROJECT_ROOT}"
pm2 logs {name}
PowerShell Scripts (pm2-monit.ps1)
Set-Location "{PROJECT_ROOT}"
pm2 monit
Ana Kurallar
- Config dosyası:
ecosystem.config.cjs(.js değil) - Node.js: Bin yolunu doğrudan belirt + interpreter
- Python: Node.js wrapper script +
windowsHide: true - Yeni pencere aç:
start wt.exe -d "{path}" pwsh -NoExit -c "command" - Minimal içerik: Her komut dosyası sadece 1-2 satır açıklama + bash bloğu
- Doğrudan çalıştırma: AI ayrıştırması gerekmez, sadece bash komutunu çalıştır
Çalıştır
$ARGUMENTS'a göre init'i çalıştır:
- Servisleri taramak için projeyi tara
ecosystem.config.cjsoluştur- Python servisleri için
{backend}/start.cjsoluştur (geçerliyse) .claude/commands/dizininde komut dosyaları oluştur.claude/scripts/dizininde script dosyaları oluştur- Proje CLAUDE.md'yi PM2 bilgisiyle güncelle (aşağıya bakın)
- Terminal komutlarıyla tamamlama özetini göster
Post-Init: CLAUDE.md'yi Güncelle
Dosyalar oluşturulduktan sonra, projenin CLAUDE.md dosyasına PM2 bölümünü ekle (yoksa oluştur):
## PM2 Services
| Port | Name | Type |
|------|------|------|
| {port} | {name} | {type} |
**Terminal Commands:**
```bash
pm2 start ecosystem.config.cjs # İlk seferinde
pm2 start all # İlk seferinden sonra
pm2 stop all / pm2 restart all
pm2 start {name} / pm2 stop {name}
pm2 logs / pm2 status / pm2 monit
pm2 save # Process listesini kaydet
pm2 resurrect # Kaydedilen listeyi geri yükle
```
CLAUDE.md güncelleme kuralları:
- PM2 bölümü varsa, değiştir
- Yoksa, sona ekle
- İçeriği minimal ve temel tut
Post-Init: Özet Göster
Tüm dosyalar oluşturulduktan sonra, çıktı:
## PM2 Init Complete
**Services:**
| Port | Name | Type |
|------|------|------|
| {port} | {name} | {type} |
**Claude Commands:** /pm2-all, /pm2-all-stop, /pm2-{port}, /pm2-{port}-stop, /pm2-logs, /pm2-status
**Terminal Commands:**
## İlk seferinde (config dosyasıyla)
pm2 start ecosystem.config.cjs && pm2 save
## İlk seferinden sonra (basitleştirilmiş)
pm2 start all # Hepsini başlat
pm2 stop all # Hepsini durdur
pm2 restart all # Hepsini yeniden başlat
pm2 start {name} # Tekli başlat
pm2 stop {name} # Tekli durdur
pm2 logs # Logları göster
pm2 monit # Monitor paneli
pm2 resurrect # Kaydedilen process'leri geri yükle
**İpucu:** Basitleştirilmiş komutları etkinleştirmek için ilk başlatmadan sonra `pm2 save` çalıştırın.