Metadata-Version: 2.4
Name: vpsdotorg
Version: 0.1.0
Summary: Deploy apps to VPS.org servers — no Docker required
Author-email: "VPS.org" <hello@vps.org>
License: MIT
Project-URL: Homepage, https://vps.org
Project-URL: Documentation, https://vps.org/docs/
Project-URL: Repository, https://github.com/vpsdotorg/vps-cli
Project-URL: Issues, https://github.com/vpsdotorg/vps-cli/issues
Keywords: vps,deploy,deployment,cli,hosting
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Requires-Dist: requests>=2.28
Requires-Dist: pyyaml>=6.0
Dynamic: license-file

# VPS CLI

Deploy apps to your [VPS.org](https://vps.org) server with a single command. No Docker required.

## Install

```bash
pip install vps-cli
```

## Quick Start

```bash
# 1. Login with your API token
vps login

# 2. In your project directory, link to a server
cd my-project/
vps link

# 3. Edit vps.yaml with your app config

# 4. Deploy
vps deploy
```

## Configuration (vps.yaml)

Create a `vps.yaml` in your project root:

**Python app:**
```yaml
name: my-app
type: python
version: "3.12"
build:
  - pip install -r requirements.txt
start: gunicorn app.wsgi:application --workers 3 --bind 127.0.0.1:8000
port: 8000
domain: myapp.example.com
git_repo: https://github.com/user/repo.git
git_branch: main
```

**Node.js app:**
```yaml
name: my-api
type: node
version: "20"
build:
  - npm install
start: node server.js
port: 3000
domain: api.example.com
git_repo: https://github.com/user/repo.git
git_branch: main
```

**Static site:**
```yaml
name: my-site
type: static
build:
  - npm run build
domain: example.com
git_repo: https://github.com/user/repo.git
git_branch: main
```

## Commands

| Command | Description |
|---------|-------------|
| `vps login` | Authenticate with your API token |
| `vps link` | Link project to a VPS server |
| `vps deploy` | Deploy the current project |
| `vps deployments` | List deployment history |
| `vps logs [UUID]` | Show deployment logs |
| `vps env list` | List environment variables |
| `vps env set KEY=VALUE` | Set environment variables |
| `vps env rm KEY` | Remove an environment variable |
| `vps ssh` | SSH into the linked server |

## Environment Variables

```bash
# Set variables
vps env set DATABASE_URL=postgres://... SECRET_KEY=abc123

# List variables
vps env list

# Remove a variable
vps env rm SECRET_KEY
```

## How It Works

1. You run `vps deploy` from your project directory
2. The CLI reads `vps.yaml` and sends the config to the VPS.org API
3. The platform SSHes into your VPS and:
   - Sets up the runtime (Python via pyenv, Node via nvm)
   - Clones/pulls your code from git
   - Runs build commands
   - Configures Supervisor (process manager)
   - Configures Nginx (reverse proxy + SSL)
   - Runs a health check

## Requirements

- Python >= 3.9
- A VPS.org server with SSH access
- An API token from [admin.vps.org](https://admin.vps.org)

## License

MIT
