Files
reverse-proxy/scripts/workspace-bootstrap/README.md
T
Andrey Lutsenko 834595df6b feat: workspace-bootstrap — init SSH/git/Cursor для Mac и Windows
Единый workspace.local.env для адресов и паролей, init-machine,
Set-GitRemotes, push-safe и check-no-secrets для политики kalinamall/github.
2026-06-14 19:34:52 +10:00

2.2 KiB
Raw Blame History

Workspace bootstrap

Единая настройка Mac / Windows для Git (SSH), Cursor и политики push.

Целевое место в Gitea: репозиторий Answer.and.other.shit (можно скопировать эту папку в scripts/workspace-bootstrap/).

Быстрый старт (новая машина)

# 1. Клонировать bootstrap (или весь Answer.and.other.shit)
cd scripts/workspace-bootstrap

# 2. Секреты и адреса — один файл (не в git!)
cp config/workspace.local.env.example config/workspace.local.env
# отредактировать workspace.local.env

# 3. Машина: SSH, git, клоны, remotes
./init-machine.sh

# 4. Cursor: правила в проекты
./init-cursor.sh

# 5. Добавить ~/.ssh/id_ed25519_kalinamall.pub в Gitea (kalinamall + home) и GitHub
./init-machine.sh --verify

Windows (PowerShell):

cd scripts\workspace-bootstrap
copy config\workspace.local.env.example config\workspace.local.env
# отредактировать
.\init-machine.ps1
.\init-cursor.sh   # через Git Bash, или: bash init-cursor.sh
.\init-machine.ps1 -Verify

Файлы

Файл В git Назначение
config/workspace.local.env.example да шаблон
config/workspace.local.env нет логины, IP, пароли, пути
config/repos.yaml да список репозиториев
config/ssh-config.template да ~/.ssh/config
config/hosts.template да строки для /etc/hosts или C:\Windows\System32\drivers\etc\hosts

Push

cd ~/Documents/Cursor/Projects/reverse-proxy
../../reverse-proxy/scripts/workspace-bootstrap/push-safe.sh
# или из bootstrap: ./push-safe.sh /path/to/repo
  • kalinamall — всегда (с секретами)
  • home — если PUSH_HOME=yes в env
  • github — только после check-no-secrets.sh

Переменная окружения

export WORKSPACE_ENV=/path/to/workspace.local.env
./init-machine.sh

По умолчанию: config/workspace.local.env рядом со скриптами.