Tools & Resources

Upload Your WebGL Game With the TGN CLI

Nesto your best freind

July 13, 2026

0 likes5 min read

You can upload your WebGL game to The Gaming Nest straight from the terminal with the TGN CLI, without clicking through an upload screen for every build. This guide shows you how to install the CLI, deploy a Unity or Godot build in one command, and manage versions so that updating a live game takes seconds instead of a re-export.

Browser upload vs the command line

Every game on The Gaming Nest can be published from the browser: drag your build folder onto the publish page and you're live. That's the fastest path for a first upload. The CLI exists for everything after that — bigger builds, repeat deploys, and automation.

Reach for tgn when you:

  • Re-deploy often (playtesting, a game jam, weekly patches).
  • Ship large Unity builds where a progress-bar upload beats babysitting a browser tab.
  • Want the deploy step inside a script or a CI pipeline.
  • Simply prefer keyboard-driven work over a web form.

If you haven't exported a build yet, start with exporting a Unity WebGL build — the CLI uploads whatever folder contains index.html at its root, so you need that output first.

Install in one command

The CLI ships as a .NET global tool. You need the .NET 8 SDK installed, then run:

```bash dotnet tool install --global TGN.CLI ```

That's it — tgn is now on your PATH in any terminal. Confirm it:

```bash tgn --help ```

You'll see the command groups: auth, projects, deploy, builds, status, plus a few helpers. To update the tool later:

```bash dotnet tool update --global TGN.CLI ```

Unity, Godot, and Three.js builds are all supported — anything that produces a static WebGL bundle.

Deploy your first build

Two things authenticate you: a CLI key and a project ID. Both come from the Manage WebGL tab on your game's page.

1. Grab your CLI key. On your game page, open the Manage WebGL tab and create a key. It looks like tgn_k1_xxxxx and is shown only once — copy it now and treat it like a password. 2. Log in. The CLI validates the key against the server immediately, so a wrong or revoked key fails here instead of mid-upload: ```bash tgn auth login tgn_k1_xxxxx ``` 3. Deploy the build folder. Point tgn deploy at the folder that holds index.html: ```bash tgn deploy ./Builds/WebGL --project <PROJECT_ID> ``` The Manage WebGL tab hands you the exact command with your project ID already filled in, so you can copy-paste it.

Under the hood the CLI does five things: zips your folder, initializes hosting on the first deploy, requests a one-shot signed upload URL, uploads directly to storage with a progress bar, then extracts and activates the version server-side. When it finishes you get a live link:

``` https://thegamingnest.com/projects/<your-slug>/play ```

Open it — your game is playable in the browser, with no download for your players.

Ship smaller with --precompress

If you exported with Brotli or Gzip compression in your engine, or you want the CLI to compress eligible files (.wasm, .data, .js) before uploading, add --precompress:

```bash tgn deploy ./Builds/WebGL --project <PROJECT_ID> --precompress ```

Typical Unity builds shrink by 3–5×, which means a faster upload for you and a faster load for players. Don't double up: if Unity already emits .br files, skip the flag.

Skip the flags with a config file

Run tgn init --project <PROJECT_ID> once inside your build folder to write a .tgnconfig.json. After that, a plain tgn deploy ./Builds/WebGL picks up the project ID automatically. Commit the file so teammates deploy the same way. Add a .tgnignore (gitignore syntax) to keep source art and .psd files out of the upload.

Versioning and safe updates

Every deploy is a new version, and old ones stay reachable — that's what makes updates safe. List them:

```bash tgn builds list --project <PROJECT_ID> ```

You get a table with a status per version (Ready, Superseded, Failed) and an arrow on the active one. Switching the live version is instant and never re-uploads:

```bash tgn builds activate 3 --project <PROJECT_ID> # jump to any version tgn builds rollback --project <PROJECT_ID> # back one step after a bad patch ```

So a broken update is a ten-second fix, not an emergency re-export. The free tier keeps 10 versions per project and allows up to 300 MB per build. tgn status prints the active version, size, and play URL at a glance, while tgn doctor diagnoses any "it won't deploy" moment before you file a bug.

Hot-reload during a game jam

Jam time is tight, so the CLI has a watch mode. It does an initial deploy, then re-deploys automatically (debounced) every time you save a new build:

```bash tgn deploy ./Builds/WebGL --watch ```

Export from Unity or Godot and your public play link updates on its own while judges and playtesters keep the tab open. Press Ctrl+C to stop.

Ship it

The CLI turns publishing into muscle memory: build, tgn deploy, share the link. If you're still setting up the export, read how to publish a WebGL game on The Gaming Nest for the full picture, then come back and wire up the terminal. Get your CLI key from the Manage WebGL tab, run your first tgn deploy, and put a playable-in-browser game in front of the Arab gaming community today — then jump into the next game jam and let --watch do the uploading for you.

Tags

#TGN CLI#Unity#سطر الأوامر#نشر الألعاب#Godot#WebGL

About the Author

Nesto your best freind

Article Summary

Ship faster from the terminal. Learn to package and upload your WebGL build to The Gaming Nest with the TGN CLI, plus versioning and update tips.

Views

0

1 comments
Share this article:

Comments

Share your thoughts about this article

Comments(0)

Sign in to add a comment. Login

Loading...