99 lines
5.8 KiB
PowerShell
99 lines
5.8 KiB
PowerShell
# =============================================================================
|
|
# set-secrets.ps1 — VizionAI Trading Secrets Manager
|
|
# =============================================================================
|
|
# Fill in every PLACEHOLDER below, then run this script ONCE.
|
|
# All values are stored as Windows User environment variables (never in git).
|
|
# Run again anytime to update a value.
|
|
#
|
|
# Usage:
|
|
# powershell -ExecutionPolicy Bypass -File set-secrets.ps1
|
|
# =============================================================================
|
|
|
|
function Set-Secret {
|
|
param([string]$Name, [string]$Value, [string]$Category)
|
|
if ($Value -match '^PLACEHOLDER') {
|
|
Write-Host "[SKIP] $Category/$Name - not set (still a placeholder)" -ForegroundColor Yellow
|
|
return
|
|
}
|
|
[Environment]::SetEnvironmentVariable($Name, $Value, "User")
|
|
$preview = if ($Value.Length -gt 6) { $Value.Substring(0,6) + "..." } else { "***" }
|
|
Write-Host "[OK] $Category/$Name = $preview" -ForegroundColor Green
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "=== VizionAI Trading Secrets ===" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# MQL5 Community (also used for AlgoForge - same credentials)
|
|
# Path: trading/community/
|
|
# -----------------------------------------------------------------------------
|
|
Set-Secret -Category "trading/community" -Name "MQL_COMMUNITY_USERNAME" -Value "PLACEHOLDER_MQL_USERNAME"
|
|
Set-Secret -Category "trading/community" -Name "MQL_COMMUNITY_PASSWORD" -Value "PLACEHOLDER_MQL_PASSWORD"
|
|
|
|
# AlgoForge = same login as MQL Community
|
|
Set-Secret -Category "trading/algoforge" -Name "ALGOFORGE_USERNAME" -Value "PLACEHOLDER_MQL_USERNAME"
|
|
Set-Secret -Category "trading/algoforge" -Name "ALGOFORGE_PASSWORD" -Value "PLACEHOLDER_MQL_PASSWORD"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Broker: defcofx — Demo Account 1
|
|
# Path: trading/broker/defcofx/demo/
|
|
# -----------------------------------------------------------------------------
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_1_LOGIN" -Value "PLACEHOLDER_ACCOUNT1_LOGIN"
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_1_PASSWORD" -Value "PLACEHOLDER_ACCOUNT1_PASSWORD"
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_1_INVESTOR_PASSWORD" -Value "PLACEHOLDER_ACCOUNT1_INVESTOR"
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_1_SERVER" -Value "PLACEHOLDER_ACCOUNT1_SERVER"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Broker: defcofx — Demo Account 2
|
|
# Path: trading/broker/defcofx/demo/
|
|
# -----------------------------------------------------------------------------
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_2_LOGIN" -Value "PLACEHOLDER_ACCOUNT2_LOGIN"
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_2_PASSWORD" -Value "PLACEHOLDER_ACCOUNT2_PASSWORD"
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_2_INVESTOR_PASSWORD" -Value "PLACEHOLDER_ACCOUNT2_INVESTOR"
|
|
Set-Secret -Category "trading/broker/defcofx/demo" -Name "DEFCOFX_DEMO_ACCOUNT_2_SERVER" -Value "PLACEHOLDER_ACCOUNT2_SERVER"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Telegram Bot Tokens
|
|
# Path: integrations/telegram/
|
|
# -----------------------------------------------------------------------------
|
|
Set-Secret -Category "integrations/telegram" -Name "VIZIONAI_TELEGRAM_AUTH_TOKEN_MAIN" -Value "PLACEHOLDER_TG_TOKEN_MAIN"
|
|
Set-Secret -Category "integrations/telegram" -Name "VIZIONAI_TELEGRAM_AUTH_TOKEN_TRADING" -Value "PLACEHOLDER_TG_TOKEN_TRADING"
|
|
Set-Secret -Category "integrations/telegram" -Name "VIZIONAI_TELEGRAM_AUTH_TOKEN_ALERTS" -Value "PLACEHOLDER_TG_TOKEN_ALERTS"
|
|
Set-Secret -Category "integrations/telegram" -Name "CLIENT_BOY_TELEGRAM_AUTH_TOKEN" -Value "PLACEHOLDER_TG_TOKEN_CLIENTBOY"
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# AI / OpenAI (already set — listed here for completeness)
|
|
# Path: integrations/openai/
|
|
# -----------------------------------------------------------------------------
|
|
$existingKey = [Environment]::GetEnvironmentVariable("AI_OPENAI_API_KEY", "User")
|
|
if ($existingKey) {
|
|
Write-Host "[OK] integrations/openai/AI_OPENAI_API_KEY = $($existingKey.Substring(0,6))... (already set)" -ForegroundColor DarkGreen
|
|
} else {
|
|
Set-Secret -Category "integrations/openai" -Name "AI_OPENAI_API_KEY" -Value "PLACEHOLDER_OPENAI_KEY"
|
|
}
|
|
|
|
# =============================================================================
|
|
Write-Host ""
|
|
Write-Host "=== Summary of all VizionAI secrets currently set ===" -ForegroundColor Cyan
|
|
$varNames = @(
|
|
"MQL_COMMUNITY_USERNAME", "MQL_COMMUNITY_PASSWORD",
|
|
"ALGOFORGE_USERNAME", "ALGOFORGE_PASSWORD",
|
|
"DEFCOFX_DEMO_ACCOUNT_1_LOGIN", "DEFCOFX_DEMO_ACCOUNT_1_PASSWORD",
|
|
"DEFCOFX_DEMO_ACCOUNT_1_INVESTOR_PASSWORD", "DEFCOFX_DEMO_ACCOUNT_1_SERVER",
|
|
"DEFCOFX_DEMO_ACCOUNT_2_LOGIN", "DEFCOFX_DEMO_ACCOUNT_2_PASSWORD",
|
|
"DEFCOFX_DEMO_ACCOUNT_2_INVESTOR_PASSWORD", "DEFCOFX_DEMO_ACCOUNT_2_SERVER",
|
|
"VIZIONAI_TELEGRAM_AUTH_TOKEN_MAIN", "VIZIONAI_TELEGRAM_AUTH_TOKEN_TRADING",
|
|
"VIZIONAI_TELEGRAM_AUTH_TOKEN_ALERTS", "CLIENT_BOY_TELEGRAM_AUTH_TOKEN",
|
|
"AI_OPENAI_API_KEY"
|
|
)
|
|
foreach ($v in $varNames) {
|
|
$val = [Environment]::GetEnvironmentVariable($v, "User")
|
|
if ($val) {
|
|
$preview = if ($val.Length -gt 6) { $val.Substring(0,6) + "..." } else { "***" }
|
|
Write-Host " [SET] $v = $preview" -ForegroundColor Green
|
|
} else {
|
|
Write-Host " [ ] $v" -ForegroundColor DarkGray
|
|
}
|
|
}
|
|
Write-Host ""
|