Ai Claw Orchestrator: Difference between revisions

From wiki karavi
Jump to navigation Jump to search
(Created page with "# نصب Coding Agent CLIها در Windows این بخش روش نصب CLI ابزارهایی را پوشش می‌دهد که در Agentic Development Environment استفاده می‌کنیم. Agentهای مورد استفاده: - Claude Code - OpenAI Codex - Cursor Agent - Google Antigravity - OpenCode - Freebuff - Claw Orchestrator --- ## 1. Claude Code وب‌سایت رسمی: https://claude.ai/ ### روش پیشنهادی — PowerShell ```powershell ir...")
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
# نصب Coding Agent CLIها در Windows
= راه‌اندازی Agentic Development Environment در Windows با Claw Orchestrator =


این بخش روش نصب CLI ابزارهایی را پوشش می‌دهد که در Agentic Development Environment استفاده می‌کنیم.
این راهنما برای ساخت یک محیط '''Agentic Development''' روی Windows است که چند Coding Agent مختلف را توسط '''Claw Orchestrator''' مدیریت می‌کند.


Agentهای مورد استفاده:
هدف اصلی این معماری:


- Claude Code
* استفاده همزمان از چند Coding Agent
- OpenAI Codex
* مدیریت Sessionهای Agentها
- Cursor Agent
* اجرای چند Agent روی یک پروژه
- Google Antigravity
* استفاده از Agentهای مختلف به عنوان Coder و Reviewer
- OpenCode
* ایجاد Multi-Agent Council
- Freebuff
* استفاده از LLM-as-a-Judge
- Claw Orchestrator
* جداسازی تغییرات Agentها با Git Worktree
* انجام Build، Test، Lint و Security Check قبل از داوری LLM
* نگهداری Run History
* استفاده از Dashboard برای مدیریت سیستم


---
معماری کلی:


## 1. Claude Code
<pre>
Windows
├── Git
├── Node.js / npm
├── Claude Code
├── OpenAI Codex
├── Cursor Agent
├── OpenCode
├── Google Antigravity
├── Freebuff
└── Claw Orchestrator
        │
        ├── Dashboard
        ├── Persistent Sessions
        ├── Multi-Agent
        ├── Skills
        ├── Rules
        ├── Teams
        ├── Council
        ├── Run Ledger
        └── LLM-as-a-Judge
</pre>
 
__TOC__
 
----
 
= پیش‌نیازها =
 
قبل از نصب Agentها بهتر است ابزارهای زیر نصب شده باشند:
 
{| class="wikitable"
! ابزار
! کاربرد
! پیشنهاد
|-
| Windows
| سیستم‌عامل
| Windows 10/11 x64
|-
| PowerShell
| Terminal و Automation
| PowerShell 7
|-
| Git
| Version Control
| آخرین نسخه پایدار
|-
| Node.js
| JavaScript Runtime
| Node.js 22+
|-
| npm
| Package Manager
| همراه Node.js
|-
| Python
| SDKهای Python
| اختیاری
|}
 
== بررسی پیش‌نیازها ==
 
<syntaxhighlight lang="powershell">
$PSVersionTable.PSVersion
 
node --version
npm --version
git --version
</syntaxhighlight>
 
بررسی مسیر executableها:
 
<syntaxhighlight lang="powershell">
where.exe node
where.exe npm
where.exe git
</syntaxhighlight>
 
----
 
= نصب Coding Agentها =
 
== Claude Code ==


وب‌سایت رسمی:
وب‌سایت رسمی:


https://claude.ai/
[https://claude.ai/ Claude]


### روش پیشنهادی — PowerShell
=== نصب با PowerShell ===


```powershell
<syntaxhighlight lang="powershell">
irm https://claude.ai/install.ps1 | iex
irm https://claude.ai/install.ps1 | iex
```
</syntaxhighlight>


### روش دوم — CMD / curl
=== نصب با CMD / curl ===


```cmd
<syntaxhighlight lang="bat">
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
```
</syntaxhighlight>


### روش سوم — Winget
=== نصب با Winget ===


```powershell
<syntaxhighlight lang="powershell">
winget install Anthropic.ClaudeCode
winget install Anthropic.ClaudeCode
```
</syntaxhighlight>


### بررسی نصب
=== بررسی نصب ===


```powershell
<syntaxhighlight lang="powershell">
claude --version
claude --version
```
</syntaxhighlight>


### اجرا
=== اجرا ===


```powershell
<syntaxhighlight lang="powershell">
claude
claude
```
</syntaxhighlight>


### بررسی سلامت
=== بررسی سلامت ===


```powershell
<syntaxhighlight lang="powershell">
claude doctor
claude doctor
```
</syntaxhighlight>
 
=== بررسی PATH ===
 
<syntaxhighlight lang="powershell">
where.exe claude
Get-Command claude
</syntaxhighlight>
 
----
 
== OpenAI Codex ==
 
صفحه Codex:
 
[https://chatgpt.com/codex/cloud OpenAI Codex]
 
=== نصب ===
 
<syntaxhighlight lang="powershell">
npm install -g @openai/codex
</syntaxhighlight>
 
یا:
 
<syntaxhighlight lang="powershell">
npm i -g @openai/codex
</syntaxhighlight>
 
=== بررسی ===
 
<syntaxhighlight lang="powershell">
codex --version
</syntaxhighlight>
 
=== اجرا ===
 
<syntaxhighlight lang="powershell">
codex
</syntaxhighlight>
 
=== Login ===


---
<syntaxhighlight lang="powershell">
codex login
</syntaxhighlight>


## 2. Cursor Agent CLI
=== بررسی PATH ===
 
<syntaxhighlight lang="powershell">
where.exe codex
Get-Command codex
</syntaxhighlight>
 
----
 
== Cursor Agent ==


وب‌سایت رسمی:
وب‌سایت رسمی:


https://cursor.com/
[https://cursor.com/ Cursor]


### نصب در Windows
=== نصب CLI ===


```powershell
<syntaxhighlight lang="powershell">
irm 'https://cursor.com/install?win32=true' | iex
irm 'https://cursor.com/install?win32=true' | iex
```
</syntaxhighlight>


### بررسی نصب
=== بررسی ===


```powershell
<syntaxhighlight lang="powershell">
cursor-agent --version
cursor-agent --version
```
</syntaxhighlight>


Cursor Agent ممکن است با دستور کوتاه زیر نیز قابل اجرا باشد:
Cursor ممکن است command کوتاه زیر را نیز ارائه کند:


```powershell
<syntaxhighlight lang="powershell">
agent
agent
```
</syntaxhighlight>


### بررسی PATH
=== بررسی PATH ===


```powershell
<syntaxhighlight lang="powershell">
where.exe cursor-agent
where.exe cursor-agent
where.exe agent
where.exe agent
```
</syntaxhighlight>


---
----


## 3. Google Antigravity
== Google Antigravity ==


وب‌سایت رسمی:
وب‌سایت رسمی:


https://antigravity.google/
[https://antigravity.google/ Google Antigravity]


نسخه Desktop برای Windows نیز با installer مربوط به سیستم x64 قابل نصب است.
=== نصب CLI با PowerShell ===


### نصب Antigravity CLI با PowerShell
<syntaxhighlight lang="powershell">
 
```powershell
irm https://antigravity.google/cli/install.ps1 | iex
irm https://antigravity.google/cli/install.ps1 | iex
```
</syntaxhighlight>


### روش دوم با curl
=== نصب با curl ===


```cmd
<syntaxhighlight lang="bat">
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd
curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd
```
</syntaxhighlight>


### بررسی CLI
=== بررسی ===


```powershell
<syntaxhighlight lang="powershell">
agy --version
agy --version
```
</syntaxhighlight>


### اجرا
=== اجرا ===


```powershell
<syntaxhighlight lang="powershell">
agy
agy
```
</syntaxhighlight>


### بررسی PATH
=== بررسی PATH ===


```powershell
<syntaxhighlight lang="powershell">
where.exe agy
where.exe agy
```
Get-Command agy
</syntaxhighlight>


---
----


## 4. Google Antigravity SDK
== Google Antigravity SDK ==


در صورت نیاز به استفاده برنامه‌نویسی از SDK:
در صورت نیاز به SDK پایتون:


```powershell
<syntaxhighlight lang="powershell">
pip install google-antigravity
pip install google-antigravity
```
</syntaxhighlight>


بررسی:
بررسی:


```powershell
<syntaxhighlight lang="powershell">
pip show google-antigravity
pip show google-antigravity
```
</syntaxhighlight>


> برای استفاده از Claw Orchestrator معمولاً نصب CLI مهم‌تر از SDK است. SDK را فقط زمانی نصب کنید که مستقیماً در Python به آن نیاز دارید.
'''نکته:''' اگر فقط قصد استفاده از Coding Agent و Claw Orchestrator را دارید، معمولاً نیازی به نصب SDK پایتون نیست.


---
----


## 5. OpenCode
== OpenCode ==


وب‌سایت رسمی:
وب‌سایت رسمی:


https://opencode.ai/
[https://opencode.ai/ OpenCode]


ابتدا اجازه اجرای install script مربوط به package را بدهید:
=== تنظیم npm ===


```powershell
<syntaxhighlight lang="powershell">
npm config set allow-scripts=opencode-ai --location=user
npm config set allow-scripts=opencode-ai --location=user
```
</syntaxhighlight>


سپس OpenCode را نصب کنید:
=== نصب ===


```powershell
<syntaxhighlight lang="powershell">
npm install -g opencode-ai
npm install -g opencode-ai
```
</syntaxhighlight>


یا:
یا:


```powershell
<syntaxhighlight lang="powershell">
npm i -g opencode-ai
npm i -g opencode-ai
```
</syntaxhighlight>


### بررسی نصب
=== بررسی ===


```powershell
<syntaxhighlight lang="powershell">
opencode --version
opencode --version
```
</syntaxhighlight>


### اجرا
=== اجرا ===


```powershell
<syntaxhighlight lang="powershell">
opencode
opencode
```
</syntaxhighlight>


### بررسی PATH
=== بررسی PATH ===


```powershell
<syntaxhighlight lang="powershell">
where.exe opencode
where.exe opencode
```
Get-Command opencode
</syntaxhighlight>
 
----
 
== Freebuff ==
 
وب‌سایت:
 
[https://freebuff.com/ Freebuff]
 
=== ثبت‌نام ===
 
برای ثبت‌نام می‌توانید از Referral Link زیر استفاده کنید:
 
[https://freebuff.com/?ref=ref-eead1f77-4518-43aa-a4fa-51a49acab0e1 ثبت‌نام در Freebuff]
 
=== نصب CLI ===
 
<syntaxhighlight lang="powershell">
npm install -g freebuff
</syntaxhighlight>
 
=== بررسی ===
 
<syntaxhighlight lang="powershell">
freebuff --version
</syntaxhighlight>
 
=== اجرا ===
 
<syntaxhighlight lang="powershell">
freebuff
</syntaxhighlight>
 
=== بررسی PATH ===
 
<syntaxhighlight lang="powershell">
where.exe freebuff
Get-Command freebuff
</syntaxhighlight>
 
'''نکته:''' اگر Freebuff integration مستقیم نداشته باشد، می‌توان اتصال آن به Orchestrator را از طریق Custom Engine بررسی کرد.
 
----
 
= نصب Claw Orchestrator =
 
Claw Orchestrator لایه مرکزی Orchestration این معماری است.
 
== نصب ===
 
<syntaxhighlight lang="powershell">
npm install -g @enderfga/claw-orchestrator
</syntaxhighlight>
 
== بررسی نسخه ===
 
<syntaxhighlight lang="powershell">
clawo --version
</syntaxhighlight>
 
== Help ===
 
<syntaxhighlight lang="powershell">
clawo --help
</syntaxhighlight>
 
نمونه دستورات:


---
<pre>
clawo acp
clawo serve


## 6. OpenAI Codex
clawo session-start
clawo session-send
clawo session-stop
clawo session-list
clawo session-status
clawo session-grep
clawo session-compact


صفحه Codex:
clawo runs
 
clawo agents-list
clawo agents-create


https://chatgpt.com/codex/cloud
clawo skills-list
clawo skills-create


### نصب با npm
clawo rules-list
clawo rules-create


```powershell
clawo session-team-list
npm install -g @openai/codex
clawo session-team-send
```
</pre>


یا:
----


```powershell
= Engineهای Claw Orchestrator =
npm i -g @openai/codex
```


### بررسی نصب
برای مشاهده Engineهای نسخه نصب‌شده:


```powershell
<syntaxhighlight lang="powershell">
codex --version
clawo session-start --help
```
</syntaxhighlight>


### اجرا
در نسخه 5.0.0 Engineهای زیر در CLI ارائه می‌شوند:


```powershell
<pre>
claude
codex
codex
```
codex-app
gemini
agy
cursor
opencode
custom
</pre>
 
نمونه:


### Login
<syntaxhighlight lang="powershell">
clawo session-start my-agent --engine claude
</syntaxhighlight>


```powershell
----
codex login
```


### بررسی PATH
= مشکل npm Install Scripts =


```powershell
در نسخه‌های جدید npm ممکن است Install Script بعضی dependencyهای Claw Orchestrator به دلایل امنیتی Block شود.
where.exe codex
```


---
نمونه:


## 7. Freebuff
<pre>
npm warn install-scripts


وب‌سایت:
openclaw
re2
@google/genai
tree-sitter-bash
protobufjs
</pre>


https://freebuff.com/
در این شرایط ممکن است CLI کار کند ولی Server با خطایی مشابه زیر اجرا نشود:


### ثبت‌نام
<pre>
Error: Cannot find module './build/Release/re2.node'
</pre>


در صورت تمایل می‌توانید از Referral Link زیر برای ثبت‌نام استفاده کنید:
== رفع مشکل RE2 ==


https://freebuff.com/?ref=ref-eead1f77-4518-43aa-a4fa-51a49acab0e1
اجازه اجرای Scriptهای موردنیاز:


### نصب Freebuff CLI
<syntaxhighlight lang="powershell">
npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user
</syntaxhighlight>


```powershell
بررسی:
npm install -g freebuff
```


یا:
<syntaxhighlight lang="powershell">
npm config get allow-scripts
</syntaxhighlight>


```powershell
سپس:
npm i -g freebuff
```


### بررسی نصب
<syntaxhighlight lang="powershell">
cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm rebuild re2
</syntaxhighlight>


```powershell
در صورت موفقیت:
freebuff --version
```


### اجرا
<pre>
rebuilt dependencies successfully
</pre>


```powershell
سپس Server را مجدداً اجرا کنید:
freebuff
```


### بررسی PATH
<syntaxhighlight lang="powershell">
clawo serve
</syntaxhighlight>


```powershell
----
where.exe freebuff
```


---
= اجرای Standalone Server =


# 8. Claw Orchestrator
برای اجرای Claw Orchestrator:


Claw Orchestrator لایه Orchestration این محیط است.
<syntaxhighlight lang="powershell">
clawo serve
</syntaxhighlight>


بعد از نصب Coding Agentها می‌توان آن را نصب کرد.
نمونه خروجی:


### نصب
<pre>
[ultraapp] runtime mode: host
[ultraapp] router on http://127.0.0.1:19000/forge/&lt;slug&gt;/


```powershell
[embedded-server] Listening on http://127.0.0.1:18796
npm install -g @enderfga/claw-orchestrator
[embedded-server] Token file: C:\Users\USER\.openclaw\server-token
```


### بررسی نسخه
Standalone server running on http://127.0.0.1:18796


```powershell
Press Ctrl+C to stop
clawo --version
</pre>
```


### مشاهده دستورات
----


```powershell
= Dashboard =
clawo --help
```


### اجرای Standalone Server
پس از اجرای:


```powershell
<syntaxhighlight lang="powershell">
clawo serve
clawo serve
```
</syntaxhighlight>


---
Claw Orchestrator آدرس Dashboard دارای Authentication Token را در Terminal نمایش می‌دهد.


# 9. بررسی تمام CLIها بعد از نصب
ساختار URL:


پس از پایان نصب، دستورات زیر را اجرا کنید:
<pre>
http://127.0.0.1:18796/dashboard?token=YOUR_TOKEN
</pre>


```powershell
'''هشدار امنیتی:'''
node --version
 
npm --version
Token واقعی را:
git --version
 
* داخل Wiki قرار ندهید.
* داخل Git Commit نکنید.
* در Screenshot عمومی منتشر نکنید.
* برای دیگران ارسال نکنید.
 
Token در فایل محلی زیر نگهداری می‌شود:
 
<pre>
C:\Users\USERNAME\.openclaw\server-token
</pre>
 
بعد از Authentication، آدرس پایه Dashboard:
 
<pre>
http://127.0.0.1:18796/dashboard
</pre>
 
----


claude --version
= Forge Router =
cursor-agent --version
agy --version
opencode --version
codex --version
freebuff --version


clawo --version
هنگام اجرای Server ممکن است Router دیگری نیز اجرا شود:
```


اگر همه چیز درست باشد، تمام commandها باید بدون خطای `command not found` اجرا شوند.
<pre>
http://127.0.0.1:19000/forge/&lt;slug&gt;/
</pre>


---
این Router توسط بخش Forge مورد استفاده قرار می‌گیرد.


# 10. بررسی محل نصب CLIها
----


برای مشاهده مسیر executableها:
= معماری Standalone =


```powershell
<pre>
where.exe node
Claude Code ───────┐
where.exe npm
Codex ─────────────┤
where.exe git
Cursor Agent ──────┤
OpenCode ──────────┤
Antigravity ───────┤
Custom Engine ─────┤
                  ↓
          Claw Orchestrator
                  │
        ┌──────────┼──────────┐
        ↓          ↓          ↓
    Sessions    Agents    Skills
        │          │          │
        └──────────┼──────────┘
                  ↓
                Rules
                  │
                  ↓
              Dashboard
</pre>


where.exe claude
----
where.exe cursor-agent
where.exe agy
where.exe opencode
where.exe codex
where.exe freebuff


where.exe clawo
= Health Check کامل =
```


---
برای بررسی محیط، فایل زیر را ایجاد کنید:


# 11. بررسی خودکار
<pre>
AgenticDevOS-Check.ps1
</pre>


می‌توانیم تمام CLIها را با PowerShell بررسی کنیم:
و محتوای زیر را در آن قرار دهید:


```powershell
<syntaxhighlight lang="powershell">
$tools = @(
$tools = @(
     @{ Name = "Node.js";           Command = "node";        Args = "--version" },
     @{ Name = "Node.js";           Command = "node";        Args = @("--version") }
     @{ Name = "npm";               Command = "npm";          Args = "--version" },
     @{ Name = "npm";               Command = "npm";          Args = @("--version") }
     @{ Name = "Git";               Command = "git";          Args = "--version" },
     @{ Name = "Git";               Command = "git";          Args = @("--version") }


     @{ Name = "Claude Code";       Command = "claude";      Args = "--version" },
     @{ Name = "Claude Code";       Command = "claude";      Args = @("--version") }
     @{ Name = "Cursor Agent";       Command = "cursor-agent"; Args = "--version" },
     @{ Name = "Codex";             Command = "codex";       Args = @("--version") }
     @{ Name = "Antigravity";       Command = "agy";         Args = "--version" },
     @{ Name = "OpenCode";         Command = "opencode";     Args = @("--version") }
     @{ Name = "OpenCode";           Command = "opencode";     Args = "--version" },
     @{ Name = "Cursor Agent";     Command = "cursor-agent"; Args = @("--version") }
     @{ Name = "Codex";             Command = "codex";       Args = "--version" },
     @{ Name = "Antigravity";       Command = "agy";         Args = @("--version") }
     @{ Name = "Freebuff";           Command = "freebuff";    Args = "--version" },
     @{ Name = "Freebuff";         Command = "freebuff";    Args = @("--version") }


     @{ Name = "Claw Orchestrator"; Command = "clawo";        Args = "--version" }
     @{ Name = "Claw Orchestrator"; Command = "clawo";        Args = @("--version") }
)
)
$results = @()
function Write-Section {
    param([string]$Title)
    Write-Host ""
    Write-Host "============================================================" -ForegroundColor Cyan
    Write-Host " $Title" -ForegroundColor Cyan
    Write-Host "============================================================" -ForegroundColor Cyan
}
function Add-Result {
    param(
        [string]$Name,
        [string]$Status,
        [string]$Version = "",
        [string]$Path = ""
    )
    $script:results += [PSCustomObject]@{
        Name    = $Name
        Status  = $Status
        Version = $Version
        Path    = $Path
    }
}
Clear-Host


Write-Host ""
Write-Host ""
Write-Host "========================================"
Write-Host "============================================================" -ForegroundColor Cyan
Write-Host "       AGENTIC DEV OS HEALTH CHECK"
Write-Host "             AGENTIC DEV OS HEALTH CHECK" -ForegroundColor Cyan
Write-Host "========================================"
Write-Host "============================================================" -ForegroundColor Cyan
Write-Host ""
 
Write-Section "CLI TOOLS"


foreach ($tool in $tools) {
foreach ($tool in $tools) {


     $exists = Get-Command $tool.Command -ErrorAction SilentlyContinue
     $command = Get-Command $tool.Command -ErrorAction SilentlyContinue


     if ($exists) {
     if (-not $command) {


         try {
         Write-Host "[MISSING] " -ForegroundColor Red -NoNewline
        Write-Host $tool.Name


            $version = & $tool.Command $tool.Args 2>&1 |
        Add-Result -Name $tool.Name -Status "MISSING"
                Select-Object -First 1
 
        continue
    }
 
    try {
 
        $output = & $tool.Command @($tool.Args) 2>&1
 
        $version = (
            $output |
            Where-Object { $_ -ne $null } |
            Select-Object -First 1
        ).ToString().Trim()
 
        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "$($tool.Name) -> $version"
 
        Write-Host "          Path: " -ForegroundColor DarkGray -NoNewline
        Write-Host $command.Source -ForegroundColor DarkGray
 
        Add-Result `
            -Name $tool.Name `
            -Status "OK" `
            -Version $version `
            -Path $command.Source
    }
    catch {
 
        Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
        Write-Host "$($tool.Name) -> command exists but version check failed"
 
        Add-Result `
            -Name $tool.Name `
            -Status "WARNING" `
            -Path $command.Source
    }
 
    Write-Host ""
}
 
Write-Section "PATH CHECK"
 
$pathEntries = @(
    $env:Path -split ";" |
    ForEach-Object {
        $_.Trim().TrimEnd("\")
    } |
    Where-Object {
        $_
    }
)
 
$duplicatePaths = @(
    $pathEntries |
    Group-Object |
    Where-Object {
        $_.Count -gt 1
    }
)
 
if ($duplicatePaths.Count -eq 0) {
 
    Write-Host "[OK]      No duplicate PATH entries found." -ForegroundColor Green
 
}
else {
 
    Write-Host "[WARNING] Duplicate PATH entries found:" -ForegroundColor Yellow
 
    foreach ($duplicate in $duplicatePaths) {
 
        Write-Host "          [$($duplicate.Count)x] $($duplicate.Name)" `
            -ForegroundColor Yellow
    }
}
 
Write-Section "NPM CONFIGURATION"
 
try {
 
    $allowScripts = npm config get allow-scripts 2>$null
 
    Write-Host "allow-scripts:"
    Write-Host "  $allowScripts"
 
    $requiredScripts = @(
        "openclaw",
        "re2",
        "@google/genai",
        "tree-sitter-bash",
        "protobufjs"
    )
 
    $configuredScripts = @(
        $allowScripts -split "," |
        ForEach-Object {
            $_.Trim()
        }
    )
 
    foreach ($package in $requiredScripts) {
 
        if ($configuredScripts -contains $package) {


             Write-Host "[OK]      " -ForegroundColor Green -NoNewline
             Write-Host "[OK]      " -ForegroundColor Green -NoNewline
             Write-Host "$($tool.Name) -> $version"
             Write-Host "$package install scripts allowed"


         }
         }
         catch {
         else {


             Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
             Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
             Write-Host "$($tool.Name) installed but version check failed."
             Write-Host "$package is not in npm allow-scripts"
        }
    }


}
catch {
    Write-Host "[WARNING] Could not read npm configuration." `
        -ForegroundColor Yellow
}
Write-Section "CLAW ORCHESTRATOR"
$clawoCommand = Get-Command clawo -ErrorAction SilentlyContinue
if (-not $clawoCommand) {
    Write-Host "[MISSING] Claw Orchestrator is not installed." `
        -ForegroundColor Red
}
else {
    Write-Host "[OK]      Claw Orchestrator CLI found." `
        -ForegroundColor Green
    try {
        $npmRoot = (npm root -g).Trim()
        $clawoRoot = Join-Path `
            $npmRoot `
            "@enderfga\claw-orchestrator"
        Write-Host ""
        Write-Host "Package:"
        Write-Host "  $clawoRoot"
        if (Test-Path $clawoRoot) {
            Write-Host "[OK]      Claw Orchestrator package directory found." `
                -ForegroundColor Green
         }
         }
        $re2File = Join-Path `
            $clawoRoot `
            "node_modules\re2\build\Release\re2.node"
        Write-Host ""
        Write-Host "RE2 Native Module:"
        if (Test-Path $re2File) {
            Write-Host "[OK]      re2.node found." `
                -ForegroundColor Green
            Write-Host "          $re2File" `
                -ForegroundColor DarkGray
        }
        else {
            Write-Host "[ERROR]  re2.node NOT FOUND." `
                -ForegroundColor Red
            Write-Host ""
            Write-Host "Fix:"
            Write-Host 'npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user'
            Write-Host "cd `"$clawoRoot`""
            Write-Host "npm rebuild re2"
        }
    }
    catch {
        Write-Host "[WARNING] Could not inspect Claw Orchestrator package." `
            -ForegroundColor Yellow
    }
}
Write-Section "CLAW SERVER"
$serverPort = 18796
$serverRunning = $false
try {
    $connection = Get-NetTCPConnection `
        -LocalPort $serverPort `
        -State Listen `
        -ErrorAction SilentlyContinue
    if ($connection) {
        $serverRunning = $true
        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "Claw server is listening on port $serverPort"
        Write-Host ""
        Write-Host "Server:"
        Write-Host "  http://127.0.0.1:$serverPort"


     }
     }
     else {
     else {


         Write-Host "[MISSING] " -ForegroundColor Red -NoNewline
         Write-Host "[INFO]   Claw server is not currently running." `
         Write-Host $tool.Name
            -ForegroundColor Cyan
 
        Write-Host ""
        Write-Host "Start with:"
        Write-Host "  clawo serve"
    }
 
}
catch {
 
    Write-Host "[WARNING] Could not check server port." `
        -ForegroundColor Yellow
}
 
$tokenFile = Join-Path `
    $HOME `
    ".openclaw\server-token"
 
if (Test-Path $tokenFile) {
 
    Write-Host ""
    Write-Host "[OK]      Server token file exists." `
        -ForegroundColor Green
 
    Write-Host "          $tokenFile" `
         -ForegroundColor DarkGray
}
 
if ($serverRunning) {
 
    Write-Host ""
    Write-Host "Dashboard base URL:"
    Write-Host "  http://127.0.0.1:$serverPort/dashboard"
 
    Write-Host ""
    Write-Host "NOTE: Authentication token is intentionally not displayed." `
        -ForegroundColor DarkGray
}
 
Write-Section "SUMMARY"
 
$installed = @(
    $results |
    Where-Object {
        $_.Status -eq "OK"
    }
).Count
 
$warnings = @(
    $results |
    Where-Object {
        $_.Status -eq "WARNING"
    }
).Count


$missing = @(
    $results |
    Where-Object {
        $_.Status -eq "MISSING"
     }
     }
).Count
Write-Host "CLI Tools OK : $installed"
Write-Host "Warnings    : $warnings"
Write-Host "Missing      : $missing"
Write-Host "Total        : $($tools.Count)"
Write-Host ""
if (($missing -eq 0) -and ($warnings -eq 0)) {
    Write-Host "[READY] Agentic Development environment is ready." `
        -ForegroundColor Green
}
elseif ($missing -eq 0) {
    Write-Host "[READY WITH WARNINGS] All CLI tools are installed." `
        -ForegroundColor Yellow
}
else {
    Write-Host "[NOT READY] Some required tools are missing." `
        -ForegroundColor Red
}
}


Write-Host ""
Write-Host ""
Write-Host "========================================"
```


---
if ($serverRunning) {
 
    Write-Host "Claw Server : RUNNING" `
        -ForegroundColor Green
 
}
else {
 
    Write-Host "Claw Server : STOPPED" `
        -ForegroundColor Cyan
}
 
Write-Host ""
</syntaxhighlight>
 
----
 
= اجرای Health Check =
 
<syntaxhighlight lang="powershell">
.\AgenticDevOS-Check.ps1
</syntaxhighlight>
 
اگر Execution Policy مانع اجرا شد:
 
<syntaxhighlight lang="powershell">
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
</syntaxhighlight>
 
سپس:
 
<syntaxhighlight lang="powershell">
.\AgenticDevOS-Check.ps1
</syntaxhighlight>
 
----
 
= موارد بررسی‌شده توسط Health Check =
 
{| class="wikitable"
! بررسی
! توضیح
|-
| Node.js
| نسخه و PATH
|-
| npm
| نسخه و PATH
|-
| Git
| نسخه و PATH
|-
| Claude Code
| نسخه و PATH
|-
| Codex
| نسخه و PATH
|-
| OpenCode
| نسخه و PATH
|-
| Cursor Agent
| نسخه و PATH
|-
| Antigravity
| نسخه و PATH
|-
| Freebuff
| نسخه و PATH
|-
| Claw Orchestrator
| نسخه و PATH
|-
| Duplicate PATH
| پیدا کردن مسیرهای تکراری
|-
| npm allow-scripts
| بررسی مجوز Native Install Scripts
|-
| RE2
| بررسی وجود re2.node
|-
| Claw Server
| بررسی Port 18796
|-
| Server Token
| بررسی وجود Token File بدون نمایش Token
|-
| Dashboard
| نمایش URL پایه Dashboard
|}
 
----
 
= مدیریت Sessionها =
 
== مشاهده Sessionها ==
 
<syntaxhighlight lang="powershell">
clawo session-list
</syntaxhighlight>
 
== ساخت Session با Claude ==
 
<syntaxhighlight lang="powershell">
clawo session-start claude-main `
    --engine claude `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
 
== Codex ==
 
<syntaxhighlight lang="powershell">
clawo session-start codex-main `
    --engine codex `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
 
== Cursor ==
 
<syntaxhighlight lang="powershell">
clawo session-start cursor-main `
    --engine cursor `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
 
== OpenCode ==
 
<syntaxhighlight lang="powershell">
clawo session-start opencode-main `
    --engine opencode `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
 
== Antigravity ==
 
<syntaxhighlight lang="powershell">
clawo session-start agy-main `
    --engine agy `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
 
----
 
= ارسال Task =
 
مثال:
 
<syntaxhighlight lang="powershell">
clawo session-send claude-main "Analyze this repository. Do not modify files. Explain the architecture and potential problems."
</syntaxhighlight>
 
----
 
= وضعیت Session =
 
<syntaxhighlight lang="powershell">
clawo session-status claude-main
</syntaxhighlight>
 
----
 
= جستجو در History =
 
<syntaxhighlight lang="powershell">
clawo session-grep claude-main "error"
</syntaxhighlight>
 
----
 
= Compact کردن Session =
 
<syntaxhighlight lang="powershell">
clawo session-compact claude-main
</syntaxhighlight>
 
----
 
= توقف Session =
 
<syntaxhighlight lang="powershell">
clawo session-stop claude-main
</syntaxhighlight>
 
----
 
= Run Ledger =
 
<syntaxhighlight lang="powershell">
clawo runs
</syntaxhighlight>
 
Run Ledger تاریخچه اجراهای Agentها را نگهداری می‌کند.
 
----
 
= Agents =
 
<syntaxhighlight lang="powershell">
clawo agents-list
</syntaxhighlight>
 
برای ساخت Agent:
 
<syntaxhighlight lang="powershell">
clawo agents-create --help
</syntaxhighlight>
 
----
 
= Skills =
 
<syntaxhighlight lang="powershell">
clawo skills-list
</syntaxhighlight>
 
برای ساخت Skill:
 
<syntaxhighlight lang="powershell">
clawo skills-create --help
</syntaxhighlight>
 
----
 
= Rules =
 
<syntaxhighlight lang="powershell">
clawo rules-list
</syntaxhighlight>
 
برای ساخت Rule:
 
<syntaxhighlight lang="powershell">
clawo rules-create --help
</syntaxhighlight>
 
----
 
= Agent Teams =
 
مشاهده اعضای Team:
 
<syntaxhighlight lang="powershell">
clawo session-team-list SESSION_NAME
</syntaxhighlight>
 
ارسال پیام:
 
<syntaxhighlight lang="powershell">
clawo session-team-send SESSION_NAME TEAMMATE "Review this implementation."
</syntaxhighlight>
 
----
 
= Git Worktree و Isolation =
 
برای اجرای همزمان چند Agent بهتر است هر Agent در Worktree مستقل کار کند.
 
<pre>
Repository
├── main
├── worktree-claude
├── worktree-codex
├── worktree-cursor
├── worktree-antigravity
└── worktree-review
</pre>
 
Claw Orchestrator نیز Option مربوط به Worktree دارد:
 
<syntaxhighlight lang="powershell">
clawo session-start --help
</syntaxhighlight>
 
Option:
 
<pre>
-w, --worktree [name]
</pre>
 
----
 
= LLM-as-a-Judge =
 
یکی از اهداف اصلی این معماری استفاده از Agentهای مختلف برای تولید چند Solution و سپس ارزیابی آن‌ها است.
 
<pre>
                      TASK
                        │
                        ↓
                Claw Orchestrator
                        │
        ┌────────────────┼────────────────┐
        ↓                ↓                ↓
  Claude Code          Codex        Antigravity
        │                │                │
        ↓                ↓                ↓
  Solution A      Solution B      Solution C
        │                │                │
        └────────────────┼────────────────┘
                        ↓
                  Automated Checks
                        │
          ┌──────────────┼──────────────┐
          ↓              ↓              ↓
        Build          Tests          Lint
          │              │              │
          └──────────────┼──────────────┘
                        ↓
                  Security Check
                        ↓
                    Benchmark
                        ↓
                  Multi-Agent Review
                        ↓
                    LLM Judge
                        ↓
                  Score / Consensus
                        ↓
                    Best Result
</pre>
 
----
 
= ترتیب پیشنهادی ارزیابی =
 
LLM نباید تنها معیار انتخاب بهترین Implementation باشد.
 
ترتیب پیشنهادی:
 
<pre>
Candidate
  │
  ↓
Build
  │
  ↓
Unit Tests
  │
  ↓
Integration Tests
  │
  ↓
Lint
  │
  ↓
Type Check
  │
  ↓
Security Check
  │
  ↓
Benchmark
  │
  ↓
LLM Review
  │
  ↓
Final Score
</pre>
 
----
 
= نقش Agentها =
 
{| class="wikitable"
! Role
! Agent پیشنهادی
! وظیفه
|-
| Planner
| Claude / Codex
| تحلیل Task
|-
| Primary Coder
| Claude / Codex
| Implementation اصلی
|-
| Alternative Coder
| Cursor / OpenCode / Antigravity
| Implementation جایگزین
|-
| Reviewer
| Agent متفاوت از Coder
| Code Review
|-
| Security Reviewer
| Claude / Codex
| بررسی Security
|-
| Judge
| مدل متفاوت از تولیدکننده
| امتیازدهی
|}
 
بهتر است مدلی که Solution را تولید کرده است تنها Judge همان Solution نباشد.


# 12. معماری نهایی
----


```text
= Multi-Agent Council =
                    Developer
                        │
                        ↓
                Claw Orchestrator
                        │
              Planner / Router
                        │
      ┌────────────────┼────────────────┐
      │                │                │
      ↓                ↓                ↓
Claude Code          Codex        Cursor Agent
      │                │                │
      ├──────────── OpenCode ───────────┤
      │                │                │
      ├───────── Antigravity ───────────┤
      │                │                │
      └──────────── Freebuff ───────────┘
                        │
                        ↓
                Automated Tests
                        │
                        ↓
                Agent Council
                        │
                        ↓
                LLM-as-a-Judge
                        │
                        ↓
                  Best Result
```


---
<pre>
                    Problem
                      │
                      ↓
                Orchestrator
                      │
          ┌────────────┼────────────┐
          ↓            ↓            ↓
      Claude        Codex      Agent C
          │            │            │
          ↓            ↓            ↓
      Plan A        Plan B      Plan C
          │            │            │
          └────────────┼────────────┘
                      ↓
                  Cross Review
                      ↓
                    Vote
                      ↓
                  Consensus
                      ↓
                Final Decision
</pre>


# نصب سریع
کاربردها:


برای یک سیستم جدید، ترتیب کلی نصب به این صورت است:
* Architecture Design
* Code Review
* Refactoring
* Debugging
* Security Review
* Performance Optimization
* مقایسه Implementationها
* Pull Request Review
* انتخاب Framework
* انتخاب Design Pattern


## Claude Code
----


```powershell
= Troubleshooting =
 
== Command Not Found ==
 
اگر:
 
<pre>
The term 'xxxx' is not recognized
</pre>
 
بررسی کنید:
 
<syntaxhighlight lang="powershell">
Get-Command xxxx
where.exe xxxx
</syntaxhighlight>
 
----
 
== بررسی PATH ==
 
<syntaxhighlight lang="powershell">
$env:Path -split ';'
</syntaxhighlight>
 
----
 
== پیدا کردن PATHهای تکراری ==
 
<syntaxhighlight lang="powershell">
$env:Path -split ';' |
    ForEach-Object { $_.Trim().TrimEnd('\') } |
    Group-Object |
    Where-Object Count -gt 1 |
    Select-Object Count, Name
</syntaxhighlight>
 
----
 
= بروزرسانی =
 
== Codex ==
 
<syntaxhighlight lang="powershell">
npm install -g @openai/codex@latest
codex --version
</syntaxhighlight>
 
== OpenCode ==
 
<syntaxhighlight lang="powershell">
npm install -g opencode-ai@latest
opencode --version
</syntaxhighlight>
 
== Freebuff ==
 
<syntaxhighlight lang="powershell">
npm install -g freebuff@latest
freebuff --version
</syntaxhighlight>
 
== Claw Orchestrator ==
 
<syntaxhighlight lang="powershell">
npm install -g @enderfga/claw-orchestrator@latest
clawo --version
</syntaxhighlight>
 
----
 
= نصب سریع روی سیستم جدید =
 
== Claude Code ==
 
<syntaxhighlight lang="powershell">
irm https://claude.ai/install.ps1 | iex
irm https://claude.ai/install.ps1 | iex
```
</syntaxhighlight>


## Cursor Agent
== Cursor Agent ==


```powershell
<syntaxhighlight lang="powershell">
irm 'https://cursor.com/install?win32=true' | iex
irm 'https://cursor.com/install?win32=true' | iex
```
</syntaxhighlight>


## Antigravity
== Antigravity ==


```powershell
<syntaxhighlight lang="powershell">
irm https://antigravity.google/cli/install.ps1 | iex
irm https://antigravity.google/cli/install.ps1 | iex
```
</syntaxhighlight>


## OpenCode
== OpenCode ==


```powershell
<syntaxhighlight lang="powershell">
npm config set allow-scripts=opencode-ai --location=user
npm config set allow-scripts=opencode-ai --location=user
npm i -g opencode-ai
npm i -g opencode-ai
```
</syntaxhighlight>


## OpenAI Codex
== Codex ==


```powershell
<syntaxhighlight lang="powershell">
npm i -g @openai/codex
npm i -g @openai/codex
```
</syntaxhighlight>


## Freebuff
== Freebuff ==


```powershell
<syntaxhighlight lang="powershell">
npm i -g freebuff
npm i -g freebuff
```
</syntaxhighlight>


## Claw Orchestrator
== Claw Orchestrator ==


```powershell
<syntaxhighlight lang="powershell">
npm i -g @enderfga/claw-orchestrator
npm i -g @enderfga/claw-orchestrator
```
</syntaxhighlight>


## بررسی نهایی
== مجوز Install Scriptهای Claw Orchestrator ==
 
<syntaxhighlight lang="powershell">
npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user
</syntaxhighlight>
 
در صورت نیاز:
 
<syntaxhighlight lang="powershell">
cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm rebuild re2
</syntaxhighlight>
 
----
 
= بررسی نهایی =
 
<syntaxhighlight lang="powershell">
node --version
npm --version
git --version


```powershell
claude --version
claude --version
codex --version
opencode --version
cursor-agent --version
cursor-agent --version
agy --version
agy --version
opencode --version
codex --version
freebuff --version
freebuff --version
clawo --version
clawo --version
```
</syntaxhighlight>
 
سپس Health Check:
 
<syntaxhighlight lang="powershell">
.\AgenticDevOS-Check.ps1
</syntaxhighlight>
 
و در نهایت Server:
 
<syntaxhighlight lang="powershell">
clawo serve
</syntaxhighlight>
 
----
 
= معماری نهایی Agentic Development OS =
 
<pre>
┌─────────────────────────────────────────────────┐
│              Windows Development OS            │
│                                                │
│                Developer / User                │
│                        │                        │
│                        ↓                        │
│                Claw Orchestrator                │
│                        │                        │
│                Web Dashboard                  │
│                        │                        │
│                Planner / Router                │
│                        │                        │
│    ┌──────────────────┼──────────────────┐    │
│    │                  │                  │    │
│    ↓                  ↓                  ↓    │
│ Claude Code          Codex          Cursor Agent│
│    │                  │                  │    │
│    ├────────────── OpenCode ─────────────┤    │
│    │                  │                  │    │
│    ├─────────── Antigravity ─────────────┤    │
│    │                  │                  │    │
│    └──────────── Custom Engines ─────────┘    │
│                        │                        │
│                        ↓                        │
│                Git Worktree Isolation          │
│                        │                        │
│                        ↓                        │
│              Automated Validation              │
│                        │                        │
│          Build / Test / Lint / Security        │
│                        │                        │
│                        ↓                        │
│                Multi-Agent Review              │
│                        │                        │
│                        ↓                        │
│                  LLM-as-a-Judge                │
│                        │                        │
│                        ↓                        │
│                    Best Result                  │
└─────────────────────────────────────────────────┘
</pre>
 
----
 
= خلاصه دستورات مهم =
 
{| class="wikitable"
! کار
! دستور
|-
| Version
| <code>clawo --version</code>
|-
| Help
| <code>clawo --help</code>
|-
| Server
| <code>clawo serve</code>
|-
| Dashboard
| <code>http://127.0.0.1:18796/dashboard</code>
|-
| Sessions
| <code>clawo session-list</code>
|-
| ساخت Session
| <code>clawo session-start</code>
|-
| ارسال Task
| <code>clawo session-send</code>
|-
| وضعیت Session
| <code>clawo session-status</code>
|-
| توقف Session
| <code>clawo session-stop</code>
|-
| History
| <code>clawo runs</code>
|-
| Agents
| <code>clawo agents-list</code>
|-
| Skills
| <code>clawo skills-list</code>
|-
| Rules
| <code>clawo rules-list</code>
|}
 
----
 
= نتیجه‌گیری =
 
هدف این معماری ساخت یک '''Agentic Development Environment''' با کمترین تعداد لایه‌های اضافی و بیشترین استفاده از Coding Agentهای موجود است.
 
Coding Agentهای مورد استفاده:
 
* Claude Code
* OpenAI Codex
* Cursor Agent
* OpenCode
* Google Antigravity
* Freebuff / Custom Agents
 
لایه مرکزی:
 
'''Claw Orchestrator'''


---
جریان کاری نهایی:


# نکته مهم
<pre>
Task
Claw Orchestrator
Planner / Router
Multiple Coding Agents
Git Worktree Isolation
Build + Tests + Lint + Security
Multi-Agent Review
LLM-as-a-Judge
Best Result
</pre>


قبل از نصب Agentها بهتر است موارد زیر نصب و در PATH قرار گرفته باشند:
این معماری در آینده می‌تواند با موارد زیر توسعه داده شود:


```text
* MCP
PowerShell 7
* Local LLM
Git
* CI/CD
Node.js 22+
* Security Agents
npm
* Automated Code Review
```
* Pull Request Review
* Custom Agents
* Custom Skills
* Custom Rules
* Multi-Agent Council
* Benchmarking
* Automated Testing
* Model Routing
* Agent Teams
* Forge


Python فقط در صورتی ضروری است که قصد استفاده از ابزارها یا SDKهای Python مانند Google Antigravity SDK را داشته باشید.
'''نکته مهم:''' Coding Agentها و Claw Orchestrator با سرعت زیادی توسعه پیدا می‌کنند. قبل از Upgrade، خروجی <code>--help</code> نسخه نصب‌شده و مستندات رسمی پروژه بررسی شود.


با این ساختار، Claw Orchestrator به‌عنوان لایه مرکزی Orchestration استفاده می‌شود و Coding Agentهای مختلف می‌توانند به‌عنوان Worker، Reviewer یا Judge مورد استفاده قرار گیرند.
[[Category:Artificial Intelligence]]
[[Category:Development]]
[[Category:Windows]]
[[Category:Agentic AI]]

Latest revision as of 18:53, 20 August 2026

راه‌اندازی Agentic Development Environment در Windows با Claw Orchestrator

این راهنما برای ساخت یک محیط Agentic Development روی Windows است که چند Coding Agent مختلف را توسط Claw Orchestrator مدیریت می‌کند.

هدف اصلی این معماری:

  • استفاده همزمان از چند Coding Agent
  • مدیریت Sessionهای Agentها
  • اجرای چند Agent روی یک پروژه
  • استفاده از Agentهای مختلف به عنوان Coder و Reviewer
  • ایجاد Multi-Agent Council
  • استفاده از LLM-as-a-Judge
  • جداسازی تغییرات Agentها با Git Worktree
  • انجام Build، Test، Lint و Security Check قبل از داوری LLM
  • نگهداری Run History
  • استفاده از Dashboard برای مدیریت سیستم

معماری کلی:

Windows
│
├── Git
├── Node.js / npm
│
├── Claude Code
├── OpenAI Codex
├── Cursor Agent
├── OpenCode
├── Google Antigravity
├── Freebuff
│
└── Claw Orchestrator
        │
        ├── Dashboard
        ├── Persistent Sessions
        ├── Multi-Agent
        ├── Skills
        ├── Rules
        ├── Teams
        ├── Council
        ├── Run Ledger
        └── LLM-as-a-Judge

پیش‌نیازها

قبل از نصب Agentها بهتر است ابزارهای زیر نصب شده باشند:

ابزار کاربرد پیشنهاد
Windows سیستم‌عامل Windows 10/11 x64
PowerShell Terminal و Automation PowerShell 7
Git Version Control آخرین نسخه پایدار
Node.js JavaScript Runtime Node.js 22+
npm Package Manager همراه Node.js
Python SDKهای Python اختیاری

بررسی پیش‌نیازها

$PSVersionTable.PSVersion

node --version
npm --version
git --version

بررسی مسیر executableها:

where.exe node
where.exe npm
where.exe git

نصب Coding Agentها

Claude Code

وب‌سایت رسمی:

Claude

نصب با PowerShell

irm https://claude.ai/install.ps1 | iex

نصب با CMD / curl

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

نصب با Winget

winget install Anthropic.ClaudeCode

بررسی نصب

claude --version

اجرا

claude

بررسی سلامت

claude doctor

بررسی PATH

where.exe claude
Get-Command claude

OpenAI Codex

صفحه Codex:

OpenAI Codex

نصب

npm install -g @openai/codex

یا:

npm i -g @openai/codex

بررسی

codex --version

اجرا

codex

Login

codex login

بررسی PATH

where.exe codex
Get-Command codex

Cursor Agent

وب‌سایت رسمی:

Cursor

نصب CLI

irm 'https://cursor.com/install?win32=true' | iex

بررسی

cursor-agent --version

Cursor ممکن است command کوتاه زیر را نیز ارائه کند:

agent

بررسی PATH

where.exe cursor-agent
where.exe agent

Google Antigravity

وب‌سایت رسمی:

Google Antigravity

نصب CLI با PowerShell

irm https://antigravity.google/cli/install.ps1 | iex

نصب با curl

curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd

بررسی

agy --version

اجرا

agy

بررسی PATH

where.exe agy
Get-Command agy

Google Antigravity SDK

در صورت نیاز به SDK پایتون:

pip install google-antigravity

بررسی:

pip show google-antigravity

نکته: اگر فقط قصد استفاده از Coding Agent و Claw Orchestrator را دارید، معمولاً نیازی به نصب SDK پایتون نیست.


OpenCode

وب‌سایت رسمی:

OpenCode

تنظیم npm

npm config set allow-scripts=opencode-ai --location=user

نصب

npm install -g opencode-ai

یا:

npm i -g opencode-ai

بررسی

opencode --version

اجرا

opencode

بررسی PATH

where.exe opencode
Get-Command opencode

Freebuff

وب‌سایت:

Freebuff

ثبت‌نام

برای ثبت‌نام می‌توانید از Referral Link زیر استفاده کنید:

ثبت‌نام در Freebuff

نصب CLI

npm install -g freebuff

بررسی

freebuff --version

اجرا

freebuff

بررسی PATH

where.exe freebuff
Get-Command freebuff

نکته: اگر Freebuff integration مستقیم نداشته باشد، می‌توان اتصال آن به Orchestrator را از طریق Custom Engine بررسی کرد.


نصب Claw Orchestrator

Claw Orchestrator لایه مرکزی Orchestration این معماری است.

نصب =

npm install -g @enderfga/claw-orchestrator

بررسی نسخه =

clawo --version

Help =

clawo --help

نمونه دستورات:

clawo acp
clawo serve

clawo session-start
clawo session-send
clawo session-stop
clawo session-list
clawo session-status
clawo session-grep
clawo session-compact

clawo runs

clawo agents-list
clawo agents-create

clawo skills-list
clawo skills-create

clawo rules-list
clawo rules-create

clawo session-team-list
clawo session-team-send

Engineهای Claw Orchestrator

برای مشاهده Engineهای نسخه نصب‌شده:

clawo session-start --help

در نسخه 5.0.0 Engineهای زیر در CLI ارائه می‌شوند:

claude
codex
codex-app
gemini
agy
cursor
opencode
custom

نمونه:

clawo session-start my-agent --engine claude

مشکل npm Install Scripts

در نسخه‌های جدید npm ممکن است Install Script بعضی dependencyهای Claw Orchestrator به دلایل امنیتی Block شود.

نمونه:

npm warn install-scripts

openclaw
re2
@google/genai
tree-sitter-bash
protobufjs

در این شرایط ممکن است CLI کار کند ولی Server با خطایی مشابه زیر اجرا نشود:

Error: Cannot find module './build/Release/re2.node'

رفع مشکل RE2

اجازه اجرای Scriptهای موردنیاز:

npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user

بررسی:

npm config get allow-scripts

سپس:

cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm rebuild re2

در صورت موفقیت:

rebuilt dependencies successfully

سپس Server را مجدداً اجرا کنید:

clawo serve

اجرای Standalone Server

برای اجرای Claw Orchestrator:

clawo serve

نمونه خروجی:

[ultraapp] runtime mode: host
[ultraapp] router on http://127.0.0.1:19000/forge/<slug>/

[embedded-server] Listening on http://127.0.0.1:18796
[embedded-server] Token file: C:\Users\USER\.openclaw\server-token

Standalone server running on http://127.0.0.1:18796

Press Ctrl+C to stop

Dashboard

پس از اجرای:

clawo serve

Claw Orchestrator آدرس Dashboard دارای Authentication Token را در Terminal نمایش می‌دهد.

ساختار URL:

http://127.0.0.1:18796/dashboard?token=YOUR_TOKEN

هشدار امنیتی:

Token واقعی را:

  • داخل Wiki قرار ندهید.
  • داخل Git Commit نکنید.
  • در Screenshot عمومی منتشر نکنید.
  • برای دیگران ارسال نکنید.

Token در فایل محلی زیر نگهداری می‌شود:

C:\Users\USERNAME\.openclaw\server-token

بعد از Authentication، آدرس پایه Dashboard:

http://127.0.0.1:18796/dashboard

Forge Router

هنگام اجرای Server ممکن است Router دیگری نیز اجرا شود:

http://127.0.0.1:19000/forge/<slug>/

این Router توسط بخش Forge مورد استفاده قرار می‌گیرد.


معماری Standalone

Claude Code ───────┐
Codex ─────────────┤
Cursor Agent ──────┤
OpenCode ──────────┤
Antigravity ───────┤
Custom Engine ─────┤
                   ↓
           Claw Orchestrator
                   │
        ┌──────────┼──────────┐
        ↓          ↓          ↓
     Sessions    Agents     Skills
        │          │          │
        └──────────┼──────────┘
                   ↓
                 Rules
                   │
                   ↓
              Dashboard

Health Check کامل

برای بررسی محیط، فایل زیر را ایجاد کنید:

AgenticDevOS-Check.ps1

و محتوای زیر را در آن قرار دهید:

$tools = @(
    @{ Name = "Node.js";           Command = "node";         Args = @("--version") }
    @{ Name = "npm";               Command = "npm";          Args = @("--version") }
    @{ Name = "Git";               Command = "git";          Args = @("--version") }

    @{ Name = "Claude Code";       Command = "claude";       Args = @("--version") }
    @{ Name = "Codex";             Command = "codex";        Args = @("--version") }
    @{ Name = "OpenCode";          Command = "opencode";     Args = @("--version") }
    @{ Name = "Cursor Agent";      Command = "cursor-agent"; Args = @("--version") }
    @{ Name = "Antigravity";       Command = "agy";          Args = @("--version") }
    @{ Name = "Freebuff";          Command = "freebuff";     Args = @("--version") }

    @{ Name = "Claw Orchestrator"; Command = "clawo";        Args = @("--version") }
)

$results = @()

function Write-Section {
    param([string]$Title)

    Write-Host ""
    Write-Host "============================================================" -ForegroundColor Cyan
    Write-Host " $Title" -ForegroundColor Cyan
    Write-Host "============================================================" -ForegroundColor Cyan
}

function Add-Result {
    param(
        [string]$Name,
        [string]$Status,
        [string]$Version = "",
        [string]$Path = ""
    )

    $script:results += [PSCustomObject]@{
        Name    = $Name
        Status  = $Status
        Version = $Version
        Path    = $Path
    }
}

Clear-Host

Write-Host ""
Write-Host "============================================================" -ForegroundColor Cyan
Write-Host "             AGENTIC DEV OS HEALTH CHECK" -ForegroundColor Cyan
Write-Host "============================================================" -ForegroundColor Cyan

Write-Section "CLI TOOLS"

foreach ($tool in $tools) {

    $command = Get-Command $tool.Command -ErrorAction SilentlyContinue

    if (-not $command) {

        Write-Host "[MISSING] " -ForegroundColor Red -NoNewline
        Write-Host $tool.Name

        Add-Result -Name $tool.Name -Status "MISSING"

        continue
    }

    try {

        $output = & $tool.Command @($tool.Args) 2>&1

        $version = (
            $output |
            Where-Object { $_ -ne $null } |
            Select-Object -First 1
        ).ToString().Trim()

        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "$($tool.Name) -> $version"

        Write-Host "          Path: " -ForegroundColor DarkGray -NoNewline
        Write-Host $command.Source -ForegroundColor DarkGray

        Add-Result `
            -Name $tool.Name `
            -Status "OK" `
            -Version $version `
            -Path $command.Source
    }
    catch {

        Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
        Write-Host "$($tool.Name) -> command exists but version check failed"

        Add-Result `
            -Name $tool.Name `
            -Status "WARNING" `
            -Path $command.Source
    }

    Write-Host ""
}

Write-Section "PATH CHECK"

$pathEntries = @(
    $env:Path -split ";" |
    ForEach-Object {
        $_.Trim().TrimEnd("\")
    } |
    Where-Object {
        $_
    }
)

$duplicatePaths = @(
    $pathEntries |
    Group-Object |
    Where-Object {
        $_.Count -gt 1
    }
)

if ($duplicatePaths.Count -eq 0) {

    Write-Host "[OK]      No duplicate PATH entries found." -ForegroundColor Green

}
else {

    Write-Host "[WARNING] Duplicate PATH entries found:" -ForegroundColor Yellow

    foreach ($duplicate in $duplicatePaths) {

        Write-Host "          [$($duplicate.Count)x] $($duplicate.Name)" `
            -ForegroundColor Yellow
    }
}

Write-Section "NPM CONFIGURATION"

try {

    $allowScripts = npm config get allow-scripts 2>$null

    Write-Host "allow-scripts:"
    Write-Host "  $allowScripts"

    $requiredScripts = @(
        "openclaw",
        "re2",
        "@google/genai",
        "tree-sitter-bash",
        "protobufjs"
    )

    $configuredScripts = @(
        $allowScripts -split "," |
        ForEach-Object {
            $_.Trim()
        }
    )

    foreach ($package in $requiredScripts) {

        if ($configuredScripts -contains $package) {

            Write-Host "[OK]      " -ForegroundColor Green -NoNewline
            Write-Host "$package install scripts allowed"

        }
        else {

            Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
            Write-Host "$package is not in npm allow-scripts"
        }
    }

}
catch {

    Write-Host "[WARNING] Could not read npm configuration." `
        -ForegroundColor Yellow
}

Write-Section "CLAW ORCHESTRATOR"

$clawoCommand = Get-Command clawo -ErrorAction SilentlyContinue

if (-not $clawoCommand) {

    Write-Host "[MISSING] Claw Orchestrator is not installed." `
        -ForegroundColor Red

}
else {

    Write-Host "[OK]      Claw Orchestrator CLI found." `
        -ForegroundColor Green

    try {

        $npmRoot = (npm root -g).Trim()

        $clawoRoot = Join-Path `
            $npmRoot `
            "@enderfga\claw-orchestrator"

        Write-Host ""
        Write-Host "Package:"
        Write-Host "  $clawoRoot"

        if (Test-Path $clawoRoot) {

            Write-Host "[OK]      Claw Orchestrator package directory found." `
                -ForegroundColor Green
        }

        $re2File = Join-Path `
            $clawoRoot `
            "node_modules\re2\build\Release\re2.node"

        Write-Host ""
        Write-Host "RE2 Native Module:"

        if (Test-Path $re2File) {

            Write-Host "[OK]      re2.node found." `
                -ForegroundColor Green

            Write-Host "          $re2File" `
                -ForegroundColor DarkGray

        }
        else {

            Write-Host "[ERROR]   re2.node NOT FOUND." `
                -ForegroundColor Red

            Write-Host ""
            Write-Host "Fix:"
            Write-Host 'npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user'
            Write-Host "cd `"$clawoRoot`""
            Write-Host "npm rebuild re2"
        }

    }
    catch {

        Write-Host "[WARNING] Could not inspect Claw Orchestrator package." `
            -ForegroundColor Yellow
    }
}

Write-Section "CLAW SERVER"

$serverPort = 18796
$serverRunning = $false

try {

    $connection = Get-NetTCPConnection `
        -LocalPort $serverPort `
        -State Listen `
        -ErrorAction SilentlyContinue

    if ($connection) {

        $serverRunning = $true

        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "Claw server is listening on port $serverPort"

        Write-Host ""
        Write-Host "Server:"
        Write-Host "  http://127.0.0.1:$serverPort"

    }
    else {

        Write-Host "[INFO]    Claw server is not currently running." `
            -ForegroundColor Cyan

        Write-Host ""
        Write-Host "Start with:"
        Write-Host "  clawo serve"
    }

}
catch {

    Write-Host "[WARNING] Could not check server port." `
        -ForegroundColor Yellow
}

$tokenFile = Join-Path `
    $HOME `
    ".openclaw\server-token"

if (Test-Path $tokenFile) {

    Write-Host ""
    Write-Host "[OK]      Server token file exists." `
        -ForegroundColor Green

    Write-Host "          $tokenFile" `
        -ForegroundColor DarkGray
}

if ($serverRunning) {

    Write-Host ""
    Write-Host "Dashboard base URL:"
    Write-Host "  http://127.0.0.1:$serverPort/dashboard"

    Write-Host ""
    Write-Host "NOTE: Authentication token is intentionally not displayed." `
        -ForegroundColor DarkGray
}

Write-Section "SUMMARY"

$installed = @(
    $results |
    Where-Object {
        $_.Status -eq "OK"
    }
).Count

$warnings = @(
    $results |
    Where-Object {
        $_.Status -eq "WARNING"
    }
).Count

$missing = @(
    $results |
    Where-Object {
        $_.Status -eq "MISSING"
    }
).Count

Write-Host "CLI Tools OK : $installed"
Write-Host "Warnings     : $warnings"
Write-Host "Missing      : $missing"
Write-Host "Total        : $($tools.Count)"

Write-Host ""

if (($missing -eq 0) -and ($warnings -eq 0)) {

    Write-Host "[READY] Agentic Development environment is ready." `
        -ForegroundColor Green

}
elseif ($missing -eq 0) {

    Write-Host "[READY WITH WARNINGS] All CLI tools are installed." `
        -ForegroundColor Yellow

}
else {

    Write-Host "[NOT READY] Some required tools are missing." `
        -ForegroundColor Red
}

Write-Host ""

if ($serverRunning) {

    Write-Host "Claw Server : RUNNING" `
        -ForegroundColor Green

}
else {

    Write-Host "Claw Server : STOPPED" `
        -ForegroundColor Cyan
}

Write-Host ""

اجرای Health Check

.\AgenticDevOS-Check.ps1

اگر Execution Policy مانع اجرا شد:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

سپس:

.\AgenticDevOS-Check.ps1

موارد بررسی‌شده توسط Health Check

بررسی توضیح
Node.js نسخه و PATH
npm نسخه و PATH
Git نسخه و PATH
Claude Code نسخه و PATH
Codex نسخه و PATH
OpenCode نسخه و PATH
Cursor Agent نسخه و PATH
Antigravity نسخه و PATH
Freebuff نسخه و PATH
Claw Orchestrator نسخه و PATH
Duplicate PATH پیدا کردن مسیرهای تکراری
npm allow-scripts بررسی مجوز Native Install Scripts
RE2 بررسی وجود re2.node
Claw Server بررسی Port 18796
Server Token بررسی وجود Token File بدون نمایش Token
Dashboard نمایش URL پایه Dashboard

مدیریت Sessionها

مشاهده Sessionها

clawo session-list

ساخت Session با Claude

clawo session-start claude-main `
    --engine claude `
    --cwd "D:\Source\MyProject"

Codex

clawo session-start codex-main `
    --engine codex `
    --cwd "D:\Source\MyProject"

Cursor

clawo session-start cursor-main `
    --engine cursor `
    --cwd "D:\Source\MyProject"

OpenCode

clawo session-start opencode-main `
    --engine opencode `
    --cwd "D:\Source\MyProject"

Antigravity

clawo session-start agy-main `
    --engine agy `
    --cwd "D:\Source\MyProject"

ارسال Task

مثال:

clawo session-send claude-main "Analyze this repository. Do not modify files. Explain the architecture and potential problems."

وضعیت Session

clawo session-status claude-main

جستجو در History

clawo session-grep claude-main "error"

Compact کردن Session

clawo session-compact claude-main

توقف Session

clawo session-stop claude-main

Run Ledger

clawo runs

Run Ledger تاریخچه اجراهای Agentها را نگهداری می‌کند.


Agents

clawo agents-list

برای ساخت Agent:

clawo agents-create --help

Skills

clawo skills-list

برای ساخت Skill:

clawo skills-create --help

Rules

clawo rules-list

برای ساخت Rule:

clawo rules-create --help

Agent Teams

مشاهده اعضای Team:

clawo session-team-list SESSION_NAME

ارسال پیام:

clawo session-team-send SESSION_NAME TEAMMATE "Review this implementation."

Git Worktree و Isolation

برای اجرای همزمان چند Agent بهتر است هر Agent در Worktree مستقل کار کند.

Repository
│
├── main
│
├── worktree-claude
│
├── worktree-codex
│
├── worktree-cursor
│
├── worktree-antigravity
│
└── worktree-review

Claw Orchestrator نیز Option مربوط به Worktree دارد:

clawo session-start --help

Option:

-w, --worktree [name]

LLM-as-a-Judge

یکی از اهداف اصلی این معماری استفاده از Agentهای مختلف برای تولید چند Solution و سپس ارزیابی آن‌ها است.

                       TASK
                         │
                         ↓
                 Claw Orchestrator
                         │
        ┌────────────────┼────────────────┐
        ↓                ↓                ↓
  Claude Code          Codex         Antigravity
        │                │                │
        ↓                ↓                ↓
   Solution A       Solution B       Solution C
        │                │                │
        └────────────────┼────────────────┘
                         ↓
                  Automated Checks
                         │
          ┌──────────────┼──────────────┐
          ↓              ↓              ↓
        Build           Tests          Lint
          │              │              │
          └──────────────┼──────────────┘
                         ↓
                  Security Check
                         ↓
                     Benchmark
                         ↓
                  Multi-Agent Review
                         ↓
                    LLM Judge
                         ↓
                  Score / Consensus
                         ↓
                    Best Result

ترتیب پیشنهادی ارزیابی

LLM نباید تنها معیار انتخاب بهترین Implementation باشد.

ترتیب پیشنهادی:

Candidate
   │
   ↓
Build
   │
   ↓
Unit Tests
   │
   ↓
Integration Tests
   │
   ↓
Lint
   │
   ↓
Type Check
   │
   ↓
Security Check
   │
   ↓
Benchmark
   │
   ↓
LLM Review
   │
   ↓
Final Score

نقش Agentها

Role Agent پیشنهادی وظیفه
Planner Claude / Codex تحلیل Task
Primary Coder Claude / Codex Implementation اصلی
Alternative Coder Cursor / OpenCode / Antigravity Implementation جایگزین
Reviewer Agent متفاوت از Coder Code Review
Security Reviewer Claude / Codex بررسی Security
Judge مدل متفاوت از تولیدکننده امتیازدهی

بهتر است مدلی که Solution را تولید کرده است تنها Judge همان Solution نباشد.


Multi-Agent Council

                    Problem
                       │
                       ↓
                Orchestrator
                       │
          ┌────────────┼────────────┐
          ↓            ↓            ↓
       Claude        Codex       Agent C
          │            │            │
          ↓            ↓            ↓
       Plan A         Plan B       Plan C
          │            │            │
          └────────────┼────────────┘
                       ↓
                  Cross Review
                       ↓
                     Vote
                       ↓
                  Consensus
                       ↓
                 Final Decision

کاربردها:

  • Architecture Design
  • Code Review
  • Refactoring
  • Debugging
  • Security Review
  • Performance Optimization
  • مقایسه Implementationها
  • Pull Request Review
  • انتخاب Framework
  • انتخاب Design Pattern

Troubleshooting

Command Not Found

اگر:

The term 'xxxx' is not recognized

بررسی کنید:

Get-Command xxxx
where.exe xxxx

بررسی PATH

$env:Path -split ';'

پیدا کردن PATHهای تکراری

$env:Path -split ';' |
    ForEach-Object { $_.Trim().TrimEnd('\') } |
    Group-Object |
    Where-Object Count -gt 1 |
    Select-Object Count, Name

بروزرسانی

Codex

npm install -g @openai/codex@latest
codex --version

OpenCode

npm install -g opencode-ai@latest
opencode --version

Freebuff

npm install -g freebuff@latest
freebuff --version

Claw Orchestrator

npm install -g @enderfga/claw-orchestrator@latest
clawo --version

نصب سریع روی سیستم جدید

Claude Code

irm https://claude.ai/install.ps1 | iex

Cursor Agent

irm 'https://cursor.com/install?win32=true' | iex

Antigravity

irm https://antigravity.google/cli/install.ps1 | iex

OpenCode

npm config set allow-scripts=opencode-ai --location=user
npm i -g opencode-ai

Codex

npm i -g @openai/codex

Freebuff

npm i -g freebuff

Claw Orchestrator

npm i -g @enderfga/claw-orchestrator

مجوز Install Scriptهای Claw Orchestrator

npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user

در صورت نیاز:

cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm rebuild re2

بررسی نهایی

node --version
npm --version
git --version

claude --version
codex --version
opencode --version
cursor-agent --version
agy --version
freebuff --version

clawo --version

سپس Health Check:

.\AgenticDevOS-Check.ps1

و در نهایت Server:

clawo serve

معماری نهایی Agentic Development OS

┌─────────────────────────────────────────────────┐
│              Windows Development OS             │
│                                                 │
│                 Developer / User                │
│                        │                        │
│                        ↓                        │
│                Claw Orchestrator                │
│                        │                        │
│                 Web Dashboard                   │
│                        │                        │
│                Planner / Router                 │
│                        │                        │
│     ┌──────────────────┼──────────────────┐     │
│     │                  │                  │     │
│     ↓                  ↓                  ↓     │
│ Claude Code          Codex          Cursor Agent│
│     │                  │                  │     │
│     ├────────────── OpenCode ─────────────┤     │
│     │                  │                  │     │
│     ├─────────── Antigravity ─────────────┤     │
│     │                  │                  │     │
│     └──────────── Custom Engines ─────────┘     │
│                        │                        │
│                        ↓                        │
│                Git Worktree Isolation           │
│                        │                        │
│                        ↓                        │
│               Automated Validation              │
│                        │                        │
│          Build / Test / Lint / Security         │
│                        │                        │
│                        ↓                        │
│                Multi-Agent Review               │
│                        │                        │
│                        ↓                        │
│                  LLM-as-a-Judge                 │
│                        │                        │
│                        ↓                        │
│                    Best Result                  │
└─────────────────────────────────────────────────┘

خلاصه دستورات مهم

کار دستور
Version clawo --version
Help clawo --help
Server clawo serve
Dashboard http://127.0.0.1:18796/dashboard
Sessions clawo session-list
ساخت Session clawo session-start
ارسال Task clawo session-send
وضعیت Session clawo session-status
توقف Session clawo session-stop
History clawo runs
Agents clawo agents-list
Skills clawo skills-list
Rules clawo rules-list

نتیجه‌گیری

هدف این معماری ساخت یک Agentic Development Environment با کمترین تعداد لایه‌های اضافی و بیشترین استفاده از Coding Agentهای موجود است.

Coding Agentهای مورد استفاده:

  • Claude Code
  • OpenAI Codex
  • Cursor Agent
  • OpenCode
  • Google Antigravity
  • Freebuff / Custom Agents

لایه مرکزی:

Claw Orchestrator

جریان کاری نهایی:

Task
 ↓
Claw Orchestrator
 ↓
Planner / Router
 ↓
Multiple Coding Agents
 ↓
Git Worktree Isolation
 ↓
Build + Tests + Lint + Security
 ↓
Multi-Agent Review
 ↓
LLM-as-a-Judge
 ↓
Best Result

این معماری در آینده می‌تواند با موارد زیر توسعه داده شود:

  • MCP
  • Local LLM
  • CI/CD
  • Security Agents
  • Automated Code Review
  • Pull Request Review
  • Custom Agents
  • Custom Skills
  • Custom Rules
  • Multi-Agent Council
  • Benchmarking
  • Automated Testing
  • Model Routing
  • Agent Teams
  • Forge

نکته مهم: Coding Agentها و Claw Orchestrator با سرعت زیادی توسعه پیدا می‌کنند. قبل از Upgrade، خروجی --help نسخه نصب‌شده و مستندات رسمی پروژه بررسی شود.