vps-studio 0.0.2-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +32 -0
- package/cli.js +96 -0
- package/package.json +109 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Andrey Razuvaev andrey.razuvaev@internet.ru (https://github.com/nulnow)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# VPS Studio
|
|
2
|
+
|
|
3
|
+
## Website
|
|
4
|
+
|
|
5
|
+
**[https://vps-studio.com](https://vps-studio.com)**
|
|
6
|
+
|
|
7
|
+
Manage dev containers and environments in a couple of clicks. Run development apps locally or on a remote server—with minimal manual console work. A Docker Desktop alternative for development with fast project bootstrapping (in the spirit of dev.new).
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Local & Remote Backends**: Connect to localhost or remote servers via URL
|
|
12
|
+
- **SSH Automation**: Automate server setup via SSH (Ubuntu 24.04)
|
|
13
|
+
- **Container Management**: Install databases, deploy applications and images from marketplace
|
|
14
|
+
- **Serverless Functions**: Deploy serverless functions (coming soon)
|
|
15
|
+
- **Observable UI**: Real-time status, logs, and progress tracking
|
|
16
|
+
- **Community Edition**: Free forever, no paywalls
|
|
17
|
+
|
|
18
|
+
## Screenshots
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
MIT
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
Да, вайбкод. И что? Плохая? А кто хороший
|
package/cli.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { execSync, spawn } from 'node:child_process'
|
|
4
|
+
import { existsSync, mkdirSync } from 'node:fs'
|
|
5
|
+
import { join } from 'node:path'
|
|
6
|
+
import { cwd } from 'node:process'
|
|
7
|
+
|
|
8
|
+
const REPO_URL = 'https://github.com/nulnow/vps-studio.git'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Clones VPS Studio repository, installs dependencies, and optionally starts dev server.
|
|
12
|
+
*
|
|
13
|
+
* @param {Object} options - Installation options
|
|
14
|
+
* @param {string} [options.dir='vps-studio'] - Directory name to clone into (default: 'vps-studio')
|
|
15
|
+
* @param {boolean} [options.skipInstall=false] - Skip npm install step
|
|
16
|
+
* @param {boolean} [options.skipDev=false] - Skip starting dev server (only clone and install)
|
|
17
|
+
* @returns {Promise<void>} Resolves when installation is complete
|
|
18
|
+
* @throws {Error} Exits process with code 1 if directory exists or installation fails
|
|
19
|
+
*/
|
|
20
|
+
async function installInCurrentDirectory(options) {
|
|
21
|
+
const currentDir = cwd()
|
|
22
|
+
const projectDir = options.dir || 'vps-studio'
|
|
23
|
+
const projectPath = join(currentDir, projectDir)
|
|
24
|
+
|
|
25
|
+
console.log('📦 Installing VPS Studio...')
|
|
26
|
+
console.log(`📍 Target: ${projectPath}`)
|
|
27
|
+
|
|
28
|
+
if (existsSync(projectPath)) {
|
|
29
|
+
console.log(`⚠️ Directory ${projectDir} already exists!`)
|
|
30
|
+
process.exit(1)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
// 1. Клонируем
|
|
35
|
+
console.log('📥 Cloning repository...')
|
|
36
|
+
execSync(`git clone ${REPO_URL} ${projectDir}`, {
|
|
37
|
+
stdio: 'inherit',
|
|
38
|
+
cwd: currentDir
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
// 2. Устанавливаем зависимости (если не пропущено)
|
|
42
|
+
if (!options.skipInstall) {
|
|
43
|
+
console.log('📦 Installing dependencies...')
|
|
44
|
+
execSync('npm install', {
|
|
45
|
+
stdio: 'inherit',
|
|
46
|
+
cwd: projectPath
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 3. Запускаем dev (если не пропущено)
|
|
51
|
+
if (!options.skipDev) {
|
|
52
|
+
console.log('🚀 Starting development server...')
|
|
53
|
+
console.log(`💡 Project ready at: ${projectPath}\n`)
|
|
54
|
+
|
|
55
|
+
const devProcess = spawn('npm', ['run', 'dev'], {
|
|
56
|
+
stdio: 'inherit',
|
|
57
|
+
cwd: projectPath,
|
|
58
|
+
shell: true
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
process.on('SIGINT', () => {
|
|
62
|
+
console.log('\n🛑 Stopping...')
|
|
63
|
+
devProcess.kill('SIGINT')
|
|
64
|
+
process.exit(0)
|
|
65
|
+
})
|
|
66
|
+
|
|
67
|
+
devProcess.on('exit', (code) => {
|
|
68
|
+
process.exit(code ?? 0)
|
|
69
|
+
})
|
|
70
|
+
} else {
|
|
71
|
+
console.log(`✅ Project installed at: ${projectPath}`)
|
|
72
|
+
console.log(` Run: cd ${projectDir} && npm run dev`)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error('❌ Error:', error instanceof Error ? error.message : String(error))
|
|
77
|
+
process.exit(1)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async function main() {
|
|
82
|
+
const args = process.argv.slice(2)
|
|
83
|
+
const command = args[0]
|
|
84
|
+
|
|
85
|
+
if (command === '--install-HERE-and-run-dev') {
|
|
86
|
+
const dir = args.find(arg => arg.startsWith('--dir='))?.split('=')[1]
|
|
87
|
+
const skipInstall = false // args.includes('--skip-install')
|
|
88
|
+
const skipDev = false // args.includes('--skip-dev')
|
|
89
|
+
|
|
90
|
+
await installInCurrentDirectory({ dir, skipInstall, skipDev })
|
|
91
|
+
} else {
|
|
92
|
+
console.log('Not working 😭. Visit https://vps-studio.com for more information.')
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
main().catch(console.error)
|
package/package.json
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vps-studio",
|
|
3
|
+
"version": "0.0.2-alpha",
|
|
4
|
+
"description": "VPS Studio CLI - Install and setup VPS Studio development environment",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "cli.js",
|
|
8
|
+
"bin": {
|
|
9
|
+
"vps-studio": "./cli.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"cli.js",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "https://github.com/nulnow/vps-studio.git"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://vps-studio.com",
|
|
21
|
+
"bugs": {
|
|
22
|
+
"url": "https://github.com/nulnow/vps-studio/issues"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"vps",
|
|
26
|
+
"docker",
|
|
27
|
+
"dev-containers",
|
|
28
|
+
"development",
|
|
29
|
+
"cli",
|
|
30
|
+
"server-management",
|
|
31
|
+
"ssh",
|
|
32
|
+
"deployment"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"dev": "concurrently -k \"npm:dev:renderer\" \"npm:dev:electron\"",
|
|
36
|
+
"dev:renderer": "vite --port 5173",
|
|
37
|
+
"dev:electron": "wait-on tcp:5173 && nodemon -q --watch src/main --watch src/preload --watch backend --watch interface --ext ts --exec \"npm run build:electron && cross-env VITE_DEV_SERVER_URL=http://localhost:5173 electron dist-electron/main.cjs\"",
|
|
38
|
+
"build": "npm run build:renderer && npm run build:electron",
|
|
39
|
+
"build:renderer": "vite build",
|
|
40
|
+
"build:electron": "node scripts/build-electron.mjs",
|
|
41
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
42
|
+
"package": "npm run build && electron-builder",
|
|
43
|
+
"dist": "npm run build && electron-builder --publish never",
|
|
44
|
+
"prepublishOnly": "node -e \"const fs = require('fs'); ['cli.js', 'README.md', 'LICENSE'].forEach(f => { try { fs.accessSync(f); } catch(e) { console.error('Missing required file:', f); process.exit(1); } }); console.log('✅ All required files present')\""
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@hono/node-server": "^1.12.2",
|
|
48
|
+
"@legendapp/state": "^2.1.15",
|
|
49
|
+
"hono": "^4.6.12",
|
|
50
|
+
"lucide-react": "^0.536.0",
|
|
51
|
+
"react": "^18.3.1",
|
|
52
|
+
"react-dom": "^18.3.1",
|
|
53
|
+
"ssh2": "^1.16.0",
|
|
54
|
+
"zod": "^3.24.1"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@types/node": "^22.10.7",
|
|
58
|
+
"@types/react": "^18.3.18",
|
|
59
|
+
"@types/react-dom": "^18.3.5",
|
|
60
|
+
"@types/ssh2": "^1.15.4",
|
|
61
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
62
|
+
"autoprefixer": "^10.4.20",
|
|
63
|
+
"concurrently": "^9.1.2",
|
|
64
|
+
"cross-env": "^7.0.3",
|
|
65
|
+
"electron": "^31.6.0",
|
|
66
|
+
"electron-builder": "^24.13.3",
|
|
67
|
+
"esbuild": "^0.25.0",
|
|
68
|
+
"nodemon": "^3.1.9",
|
|
69
|
+
"postcss": "^8.5.1",
|
|
70
|
+
"sharp": "^0.34.5",
|
|
71
|
+
"tailwindcss": "^3.4.17",
|
|
72
|
+
"typescript": "^5.7.3",
|
|
73
|
+
"vite": "^6.0.7",
|
|
74
|
+
"wait-on": "^8.0.2"
|
|
75
|
+
},
|
|
76
|
+
"build": {
|
|
77
|
+
"appId": "com.vpsstudio.app",
|
|
78
|
+
"productName": "VPS Studio",
|
|
79
|
+
"icon": "build/icon.png",
|
|
80
|
+
"extraMetadata": {
|
|
81
|
+
"main": "dist-electron/main.cjs"
|
|
82
|
+
},
|
|
83
|
+
"files": [
|
|
84
|
+
"dist/**",
|
|
85
|
+
"dist-electron/**",
|
|
86
|
+
"node_modules/**",
|
|
87
|
+
"package.json"
|
|
88
|
+
],
|
|
89
|
+
"mac": {
|
|
90
|
+
"target": [
|
|
91
|
+
"dmg"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"win": {
|
|
95
|
+
"target": [
|
|
96
|
+
"nsis",
|
|
97
|
+
{
|
|
98
|
+
"target": "portable",
|
|
99
|
+
"arch": ["x64"]
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"linux": {
|
|
104
|
+
"target": [
|
|
105
|
+
"AppImage"
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|