Rewrite the CLI in Go #10

Merged
uwayss merged 6 commits from refactor/rewrite-cli into main 2026-08-28 10:36:21 +00:00
Owner

Replaces the TypeScript CLI with a Go one at cmd/push.

There is no Node left in the repository. A fresh clone builds both binaries with go build and no npm step.

What changed

  • cmd/push — the CLI, ported file for file from packages/cli/src. Prompts use charmbracelet/huh, the only new direct dependency.
  • Tests. The TypeScript CLI had none. This one covers the zip, the config file, the API client, the 401 retry, and the export check.
  • packages/cli — the TypeScript source, tsconfig.json, package.json, the pnpm lock file and the prettier and oxlint configs are gone. README.md and LICENSE stay for the npm package.
  • checks-cli.yml — gone. checks-go.yml already covers cmd/**.

New behaviour

  • The CLI offers to install the dependencies when node_modules/expo is missing, instead of letting expo export fail with a bundler error. It reads the lock file to pick between pnpm, yarn, bun and npm.
  • The application that matches the slug in the Expo config comes first in the list. When nothing matches, the CLI offers to create it with the name and slug from that config.
  • checkExport reads the export with internal/expo.ReadMetadata, the same parser the server uses, and names any bundle that metadata.json promises but did not write.
  • readAppConfig runs npx --no-install. Without it, a project with no node_modules waits a minute for a download before falling back to app.json.

Not in this PR

The npm release. npx @uwayss/bareed still installs the old TypeScript version until the seven prebuilt-binary packages are published.

Checks

gofmt, go vet and go test all pass. The upload was tested against a running server, which accepted the archive and served a valid manifest from it.

Replaces the TypeScript CLI with a Go one at `cmd/push`. There is no Node left in the repository. A fresh clone builds both binaries with `go build` and no npm step. ## What changed - `cmd/push` — the CLI, ported file for file from `packages/cli/src`. Prompts use `charmbracelet/huh`, the only new direct dependency. - Tests. The TypeScript CLI had none. This one covers the zip, the config file, the API client, the 401 retry, and the export check. - `packages/cli` — the TypeScript source, `tsconfig.json`, `package.json`, the pnpm lock file and the prettier and oxlint configs are gone. `README.md` and `LICENSE` stay for the npm package. - `checks-cli.yml` — gone. `checks-go.yml` already covers `cmd/**`. ## New behaviour - The CLI offers to install the dependencies when `node_modules/expo` is missing, instead of letting `expo export` fail with a bundler error. It reads the lock file to pick between pnpm, yarn, bun and npm. - The application that matches the slug in the Expo config comes first in the list. When nothing matches, the CLI offers to create it with the name and slug from that config. - `checkExport` reads the export with `internal/expo.ReadMetadata`, the same parser the server uses, and names any bundle that `metadata.json` promises but did not write. - `readAppConfig` runs `npx --no-install`. Without it, a project with no `node_modules` waits a minute for a download before falling back to `app.json`. ## Not in this PR The npm release. `npx @uwayss/bareed` still installs the old TypeScript version until the seven prebuilt-binary packages are published. ## Checks `gofmt`, `go vet` and `go test` all pass. The upload was tested against a running server, which accepted the archive and served a valid manifest from it.
uwayss merged commit a602740e3a into main 2026-08-28 10:36:21 +00:00
uwayss deleted branch refactor/rewrite-cli 2026-08-28 10:36:22 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
uwayss/bareed!10
No description provided.