omnideploy-cli 0.0.0-stage → 0.1.0

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/README.md CHANGED
@@ -1,3 +1,156 @@
1
- # Temporary Holding Version
1
+ # omnideploy
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ One CLI to deploy any project — Node, Python, Java, Go, Rust, Ruby, PHP, .NET or plain HTML — to **Vercel, Netlify, GitHub Pages, Railway and Render**.
4
+
5
+ ```bash
6
+ cd my-spring-boot-app
7
+ npx omnideploy-cli deploy render
8
+ ```
9
+
10
+ omnideploy works out what your project is, writes the deployment files the platform needs (a multi-stage `Dockerfile`, `render.yaml`, `railway.json`, `netlify.toml`, `vercel.json`), shows you what it will write, and deploys.
11
+
12
+ ```
13
+ ◆ Detected Java 21 · spring-boot · server · port 8080
14
+ ◇ Deployment files to generate
15
+ │ + Dockerfile — multi-stage Java (spring-boot) image (for render)
16
+ │ + .dockerignore — keeps the Docker build context small (for render)
17
+ │ + render.yaml — Render Blueprint (docker runtime) (for render)
18
+ ◆ Pushed deployment files
19
+ ◆ Render: https://demo-api.onrender.com
20
+ ```
21
+
22
+ ## Install
23
+
24
+ ```bash
25
+ npm install -g omnideploy-cli # or use npx omnideploy-cli …
26
+ ```
27
+
28
+ Requires Node.js 20+. Railway deployments also need the [Railway CLI](https://docs.railway.com/guides/cli).
29
+
30
+ ## Quick start
31
+
32
+ ```bash
33
+ omnideploy init # detect, choose providers, generate files, write omnideploy.json
34
+ omnideploy login netlify # paste a token (or set NETLIFY_AUTH_TOKEN)
35
+ omnideploy deploy # deploy to every provider in omnideploy.json
36
+ omnideploy deploy vercel netlify # or name them
37
+ ```
38
+
39
+ ## Commands
40
+
41
+ | Command | What it does |
42
+ |---|---|
43
+ | `init` | Detects the project, offers only compatible providers, previews and writes deployment files and `omnideploy.json`. |
44
+ | `deploy [providers...]` | Checks compatibility → generates missing files → checks credentials → builds → deploys → prints URLs. Flags: `--preview`, `--no-build`, `--dir <path>`, `--dry-run`, `--yes`, `--force`. |
45
+ | `generate <providers...>` (alias `eject`) | Only writes the deployment files, for deploying some other way. |
46
+ | `login <provider>` / `logout <provider>` | Save or remove a provider token (`--token` for scripts). |
47
+ | `providers` (alias `ls`) | Login state, required CLIs, and which providers fit this project. |
48
+ | `doctor` | Checks Node, git remote, config, tokens and tools, with a fix for each problem. |
49
+ | `status <provider> [id]` | Latest (or a specific) deployment's state and URL. |
50
+
51
+ Global flags: `-C, --cwd <dir>`, `--debug`, `--no-interactive`.
52
+
53
+ ## What runs where
54
+
55
+ | | Vercel | Netlify | GitHub Pages | Railway | Render |
56
+ |---|:-:|:-:|:-:|:-:|:-:|
57
+ | Static sites (Vite, CRA, Angular, Astro, plain HTML…) | ✔ | ✔ | ✔ | ✔ (nginx image) | ✔ |
58
+ | Next.js / Nuxt / SvelteKit / Remix / Astro SSR | ✔ native | | | ✔ Docker | ✔ |
59
+ | Servers in any language | | | | ✔ Docker | ✔ native or Docker |
60
+
61
+ If you ask for something a provider can't host, omnideploy explains why and suggests one that can:
62
+
63
+ ```
64
+ ■ Vercel: only hosts static sites and nextjs, nuxt, sveltekit, remix or astro apps, not spring-boot servers
65
+ │ Try: Deploy to Railway or Render instead.
66
+ ```
67
+
68
+ ### Detected languages and frameworks
69
+
70
+ | Language | Detected from | Frameworks |
71
+ |---|---|---|
72
+ | Node.js | `package.json` | Next.js, Nuxt, SvelteKit, Remix, Astro, Gatsby, Angular, CRA, Vite, NestJS, Express, Fastify, Koa, Hono |
73
+ | Python | `requirements.txt`, `pyproject.toml`, `Pipfile`, `manage.py` | Django, FastAPI, Flask, Streamlit (pip, Poetry, uv) |
74
+ | Java | `pom.xml`, `build.gradle(.kts)` | Spring Boot, Quarkus, Micronaut (Maven, Gradle) |
75
+ | Go | `go.mod` | Gin, Echo, Fiber, chi, net/http (`cmd/*` layouts) |
76
+ | Rust | `Cargo.toml` | Axum, Actix Web, Rocket, Warp, Poem |
77
+ | Ruby | `Gemfile` | Rails, Sinatra |
78
+ | PHP | `composer.json`, `index.php` | Laravel, Symfony, plain PHP |
79
+ | .NET | `*.csproj` | ASP.NET Core |
80
+ | Static | `index.html` | — |
81
+ | Anything | `Dockerfile` | your own image |
82
+
83
+ Generated Dockerfiles are multi-stage, pin the detected runtime version, run as a non-root user and listen on `$PORT`. An existing `Dockerfile` (or any other existing file) is never overwritten unless you pass `--force`.
84
+
85
+ ## Credentials
86
+
87
+ Tokens are looked up in this order: **environment variable → saved token → prompt**. Saved tokens live in `~/.config/omnideploy/credentials.json` (mode `0600`; override the directory with `OMNIDEPLOY_CONFIG_DIR`).
88
+
89
+ | Provider | Env var | Create a token |
90
+ |---|---|---|
91
+ | Vercel | `VERCEL_TOKEN` | https://vercel.com/account/tokens |
92
+ | Netlify | `NETLIFY_AUTH_TOKEN` | https://app.netlify.com/user/applications#personal-access-tokens |
93
+ | GitHub Pages | `GITHUB_TOKEN` | https://github.com/settings/tokens (`repo` scope) |
94
+ | Railway | `RAILWAY_TOKEN` | Project → Settings → Tokens (project token) |
95
+ | Render | `RENDER_API_KEY` | https://dashboard.render.com/u/settings#api-keys |
96
+
97
+ ## omnideploy.json
98
+
99
+ Everything is optional. Values here override detection, and IDs created on the first deploy (Netlify site, Vercel project, Render service) are saved back so later deploys update the same app.
100
+
101
+ ```json
102
+ {
103
+ "$schema": "https://unpkg.com/omnideploy/schema.json",
104
+ "name": "demo-api",
105
+ "build": { "command": "npm run build", "output": "dist" },
106
+ "app": { "start": "node server.js", "port": 3000, "healthCheckPath": "/health" },
107
+ "providers": {
108
+ "vercel": { "teamId": "team_123" },
109
+ "netlify": { "siteId": "…" },
110
+ "github-pages": { "branch": "gh-pages", "cname": "www.example.com" },
111
+ "railway": { "service": "api", "environment": "production" },
112
+ "render": { "plan": "starter", "region": "frankfurt" }
113
+ }
114
+ }
115
+ ```
116
+
117
+ ## Provider notes
118
+
119
+ - **Render** builds from your git remote, so generated files have to be pushed. omnideploy offers to commit and push them, and warns about any other uncommitted changes, which won't be deployed. Private repos require connecting your Git provider in the Render dashboard.
120
+ - **GitHub Pages** publishes the build output to the `gh-pages` branch and enables Pages. For project sites served under `/<repo>/`, set your bundler's base path (for Vite, `base: '/<repo>/'`).
121
+ - **Railway** uses the official CLI (`railway up`), which uploads the project together with the generated `Dockerfile` and `railway.json`.
122
+ - **Netlify** and **Vercel** upload your local build output directly; SPA routes get a rewrite to `index.html`.
123
+
124
+ ## CI
125
+
126
+ ```yaml
127
+ - run: npx omnideploy-cli deploy netlify --yes
128
+ env:
129
+ NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
130
+ ```
131
+
132
+ `CI=true` or a non-TTY stdin turns off prompts. Without `--yes`, any step that needs confirmation fails with a clear message.
133
+
134
+ ## Development
135
+
136
+ ```bash
137
+ npm install
138
+ npm run dev -- deploy --dry-run -C ../some-project # run from source
139
+ npm run check # typecheck + architecture rules + tests
140
+ npm run smoke:docker # build & run generated Dockerfiles (needs Docker)
141
+ ```
142
+
143
+ The code follows Clean Architecture, and the dependency rule is enforced by `dependency-cruiser`:
144
+
145
+ ```
146
+ src/domain entities, ports (interfaces), compatibility policy — no I/O, no libraries
147
+ src/application use cases (detect, generate, build, deploy, …) — depend only on domain
148
+ src/infrastructure detectors, generators, providers, adapters (fs, http, git, process, config, credentials)
149
+ src/cli commander commands, clack presenters, container.ts (composition root)
150
+ ```
151
+
152
+ To add a provider, detector or file generator, implement the matching domain port (`DeploymentProvider`, `ProjectDetector`, `ArtifactGenerator`) in `src/infrastructure/…` and register it in that folder's `index.ts`. Nothing in `domain` or `application` changes.
153
+
154
+ ## License
155
+
156
+ MIT