ci / test (push) Canceled after 0s
ci / cross-build (amd64, darwin) (push) Canceled after 0s
ci / cross-build (amd64, linux) (push) Canceled after 0s
ci / cross-build (amd64, windows) (push) Canceled after 0s
ci / cross-build (arm64, darwin) (push) Canceled after 0s
ci / cross-build (arm64, linux) (push) Canceled after 0s
ci / cross-build (arm64, windows) (push) Canceled after 0s
- apiclient: AuthSignIn (/signin/email-password) + AuthRefresh (/token) - login: interactive email+password prompt, --email/--password for CI, --token paste - resolveClient: auto-refresh expired session tokens using the stored refresh token - credentials store: refresh_token + auth_url
112 lines
3.1 KiB
Markdown
112 lines
3.1 KiB
Markdown
# gy — the Ghaymah CLI
|
|
|
|
The fastest way from code to a live URL. Deploy any directory with one command,
|
|
without Docker on your machine — builds run in the cloud (kaniko / buildpacks).
|
|
|
|
```bash
|
|
$ gy deploy
|
|
ghaymah · my-api
|
|
✔ uploaded source · 12.4 MB
|
|
✔ building (kaniko)
|
|
✔ live https://my-api-9f3a1c.hosted.ghaymah.systems
|
|
```
|
|
|
|
## Install
|
|
|
|
```bash
|
|
curl -fsSL https://install.ghaymah.systems | sh
|
|
# or
|
|
go install gitlab.com/ghaymah/gy/cmd/gy@latest
|
|
```
|
|
|
|
## Quickstart
|
|
|
|
```bash
|
|
gy login # email + password (or --token to paste one)
|
|
cd my-project
|
|
gy deploy # that's it
|
|
gy open # open the live URL
|
|
gy logs -f # stream logs
|
|
gy status # status card
|
|
```
|
|
|
|
## Commands
|
|
|
|
| Command | What it does |
|
|
|---------|--------------|
|
|
| `gy deploy` | pack → upload → cloud build → deploy → live URL |
|
|
| `gy logs [-f]` | stream app logs |
|
|
| `gy status` | linked app status + URL |
|
|
| `gy open` | open the app in your browser |
|
|
| `gy list` | list your apps |
|
|
| `gy login` / `logout` / `whoami` | authentication |
|
|
| `gy version` | print the version |
|
|
|
|
## How it works
|
|
|
|
`gy deploy` packs your project (respecting `.gitignore` / `.dockerignore` /
|
|
`.gyignore`), uploads it to an object store (invisible to you), and asks the
|
|
gateway to build it in an ephemeral cloud container — Dockerfile via **kaniko**,
|
|
falling back to **buildpacks**. The image is pushed to a managed registry and
|
|
deployed to a stable URL.
|
|
|
|
No Docker daemon, no local build, no registry login. The same command works
|
|
identically in GitHub Actions, GitLab CI, or any shell.
|
|
|
|
## Configuration
|
|
|
|
| Env / flag | Purpose |
|
|
|------------|---------|
|
|
| `GY_TOKEN` / `--token` | access token (or use `gy login`) |
|
|
| `GY_API_URL` / `--api-url` | gateway URL (default `https://gateway.ghaymah.systems`) |
|
|
| `GY_AUTH_URL` / `--auth-url` | auth service URL (default `https://auth.ghaymah.systems`) |
|
|
| `GY_EMAIL` / `GY_PASSWORD` | non-interactive login credentials |
|
|
| `--name` | app name (default: folder name) |
|
|
| `--port` | HTTP port (auto-detected from `Dockerfile EXPOSE` / `ghaymah.yml`) |
|
|
| `--strategy` | `auto` (default) · `dockerfile` · `buildpacks` |
|
|
| `--detach` | return after the build starts |
|
|
| `--json` | machine-readable output (CI) |
|
|
| `--plain` | disable the interactive TUI |
|
|
|
|
Login is stored at `~/.config/ghaymah/credentials.json`; the project link lives
|
|
in `.gy/link.json`.
|
|
|
|
## CI
|
|
|
|
In any CI you only need a token — no Docker:
|
|
|
|
```yaml
|
|
# GitHub Actions
|
|
- name: Deploy
|
|
uses: ghaymah/deploy-action@v1
|
|
with:
|
|
token: ${{ secrets.GY_TOKEN }}
|
|
```
|
|
|
|
Or call the CLI directly:
|
|
|
|
```bash
|
|
export GY_TOKEN=$GHAYMAH_TOKEN
|
|
gy deploy --json # prints {"status":"succeeded","app_url":"https://…"}
|
|
```
|
|
|
|
`gy` auto-detects CI (no TTY → plain output) and exits non-zero on failure, so
|
|
broken deploys fail the job.
|
|
|
|
## Building from source
|
|
|
|
```bash
|
|
go build ./cmd/gy
|
|
```
|
|
|
|
## Repo layout
|
|
|
|
```
|
|
cmd/gy entrypoint
|
|
internal/cli cobra commands + the deploy TUI
|
|
internal/apiclient gateway REST client
|
|
internal/source archive (tar.gz + ignore) and build detection
|
|
internal/gyconfig credentials + project link
|
|
internal/uit lipgloss styles
|
|
```
|