From 15680ddf5c2915fee8c95a24c83819dfaea57c1a Mon Sep 17 00:00:00 2001 From: fukunee Date: Tue, 12 May 2026 16:05:50 +0800 Subject: [PATCH] Add initial Claw cloud host manager implementation --- .gitignore | 10 ++ claw.bat | 2 + claw.ps1 | 203 ++++++++++++++++++++++++++++++++++++++ hosts/example-server | 33 +++++++ hosts/tx-ubuntu | 34 +++++++ payloads/.gitkeep | 0 scripts/hello.sh | 13 +++ scripts/install-docker.sh | 27 +++++ 8 files changed, 322 insertions(+) create mode 100644 .gitignore create mode 100644 claw.bat create mode 100644 claw.ps1 create mode 100644 hosts/example-server create mode 100644 hosts/tx-ubuntu create mode 100644 payloads/.gitkeep create mode 100644 scripts/hello.sh create mode 100644 scripts/install-docker.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..26d7437 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# 密钥文件 - 绝对不能提交 +keys/*.pem +keys/*.key +keys/*.ppk + +# 临时文件 +*.swp +*.swo +*~ +.DS_Store diff --git a/claw.bat b/claw.bat new file mode 100644 index 0000000..87f6e5d --- /dev/null +++ b/claw.bat @@ -0,0 +1,2 @@ +@echo off +powershell -ExecutionPolicy Bypass -File "%~dp0claw.ps1" %* diff --git a/claw.ps1 b/claw.ps1 new file mode 100644 index 0000000..596d469 --- /dev/null +++ b/claw.ps1 @@ -0,0 +1,203 @@ +# Claw - Cloud Host Manager (PowerShell) +param($Command, $Arg1, $Arg2, $Arg3) + +$ErrorActionPreference = "Stop" +$ClawRoot = $PSScriptRoot + +function Usage { + @" +Claw - Cloud Host Manager + +Usage: .\claw.ps1 [args...] + claw [args...] + +Commands: + list List all hosts + ssh SSH into a host + run