An open-source CLI and TUI for managing game assets on the Stake Engine RGS. Upload math and front-end bundles, run compliance checks, and publish releases from your terminal or CI pipeline.
Disclaimer: this tool is not affiliated with the Stake Engine team. It is built by the community, privacy- and safety-first. We are in touch with the Stake Engine team about shipping a more convenient way to obtain API tokens — until then, session cookies are used (see Authentication below).
- Interactive TUI with team/game browser, upload wizard and publish flow
- Non-interactive CLI mode for CI/CD (
stakecli upload ...) - Math compliance checks before upload
- Self-update (
stakecli update) - Zero external runtime dependencies (single static binary)
curl -LO https://github.com/mnemoo/cli/releases/download/v1.0.0/stakecli_1.0.0_linux_amd64.deb
sudo dpkg -i stakecli_1.0.0_linux_amd64.debsudo rpm -i https://github.com/mnemoo/cli/releases/download/v1.0.0/stakecli_1.0.0_linux_amd64.rpmcurl -L https://github.com/mnemoo/cli/releases/download/v1.0.0/stakecli_1.0.0_darwin_arm64.tar.gz | tar -xz
sudo mv stakecli /usr/local/bin/
# If Gatekeeper blocks the binary, clear the quarantine flag:
sudo xattr -d com.apple.quarantine /usr/local/bin/stakecliOne-line install in PowerShell (downloads the latest release, installs
to %LOCALAPPDATA%\stakecli and adds it to your user PATH):
irm https://raw.githubusercontent.com/mnemoo/cli/main/install.ps1 | iexOr, to install a specific version:
$env:STAKECLI_VERSION = "v1.0.0"
irm https://raw.githubusercontent.com/mnemoo/cli/main/install.ps1 | iexPrefer a manual install? Download the matching .zip archive from the
latest release and
extract stakecli.exe somewhere on your PATH.
git clone https://github.com/mnemoo/cli.git
cd cli
go build -o stakecli ./cmd/stakeGo 1.25+ is required.
# Launch the interactive TUI
stakecli
# Or upload from the command line
stakecli upload \
--team myteam \
--game mygame \
--type math \
--path ./dist \
--yes --publishstakecli Launch interactive TUI
stakecli upload Upload files to Stake Engine
stakecli update Check for and install new releases
stakecli version Show version and build info
stakecli help Show this help
Upload flags:
--team Team slug (required)
--game Game slug (required)
--type Upload type: math or front (required)
--path Path to local directory (required)
--yes Skip confirmation prompts (for CI/CD)
--publish Publish after upload
| Variable | Description |
|---|---|
STAKE_SID |
Session ID for authentication. Bypasses the keyring; required for CI/CD. |
STAKE_API_URL |
Override API base URL. Default: https://stake-engine.com/api. |
STAKE_NO_UPDATE_CHECK |
Set to any value to disable the background update check. |
stakecli authenticates against the Stake Engine API with the same
session cookie (sid) your browser uses on
stake-engine.com. On interactive launch, you
will be asked to paste your SID; it is then stored securely in your OS
keychain and reused on subsequent runs.
We are working with the Stake Engine team on adding a more convenient way to obtain API tokens. Once that lands,
stakecliwill support the new flow as a first-class option and keep SID login as a fallback.
- Open your browser and log in to https://stake-engine.com as usual.
- Open DevTools:
- Chrome / Edge / Brave:
F12, orCmd+Option+I(macOS) /Ctrl+Shift+I(Windows/Linux) - Firefox:
F12, orCmd+Option+I/Ctrl+Shift+I - Safari: enable the Develop menu in Preferences → Advanced, then
Cmd+Option+I
- Chrome / Edge / Brave:
- Navigate to the cookies panel:
- Chrome / Edge / Brave:
Applicationtab → left sidebar →Storage→Cookies→https://stake-engine.com - Firefox:
Storagetab →Cookies→https://stake-engine.com - Safari:
Storagetab →Cookies→stake-engine.com
- Chrome / Edge / Brave:
- Find the row where Name is
sid. - Double-click the Value cell and copy the full string.
- Paste it into the
stakeclilogin screen, or export it for CI:export STAKE_SID="paste-value-here"
Treat the
sidlike a password. Anyone with this value can act as you on Stake Engine until the session expires. Do not commit it to git, share it in screenshots, or paste it into untrusted terminals. For CI/CD, store it as an encrypted secret (e.g. GitHub Actionssecrets.STAKE_SID).
The example below builds and publishes a front-end bundle from a
pnpm + Turborepo monorepo (the same stack used by the
StakeEngine web SDK: Svelte 5 +
Vite + SvelteKit apps under apps/*, shared libraries under
packages/*). On every push to main, CI builds the target app with
Turbo, then uses stakecli to upload and publish the resulting dist
as a front-end release.
Stack assumed by this workflow:
- Node ≥ 22.16
- pnpm 10.x with workspaces (
pnpm-workspace.yaml→apps/*,packages/*) - Turborepo for orchestration (
turbo run build --filter=cluster) - Vite / SvelteKit with
@sveltejs/adapter-static— outputs a self-contained static bundle toapps/<app>/build/(the web-sdk's sharedconfig-svelteadditionally setsbundleStrategy: 'inline'andassetsInlineLimit: Infinity, so the whole app ships as a single inlined HTML, which is exactly what Stake Engine hosts as a game front-end)
# .github/workflows/publish-front.yml
name: Publish front
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: publish-front-${{ github.ref }}
cancel-in-progress: true
env:
APP_NAME: cluster # workspace package name, e.g. apps/cluster
STAKE_TEAM: myteam
STAKE_GAME: cluster
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0 # full history so Turbo can compute hashes
- name: Setup pnpm
uses: pnpm/action-setup@v4
# version is read from root package.json `packageManager` field
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Cache Turbo
uses: actions/cache@v4
with:
path: .turbo
key: turbo-${{ github.ref_name }}-${{ github.sha }}
restore-keys: |
turbo-${{ github.ref_name }}-
turbo-
- name: Build front-end bundle
run: pnpm turbo run build --filter=${{ env.APP_NAME }}
# Vite/SvelteKit output lands in apps/${APP_NAME}/build/
- name: Install stakecli
uses: jaxxstorm/action-install-gh-release@v2
with:
repo: mnemoo/cli
tag: v1.0.0 # pin a release for reproducible builds
- name: Upload and publish front-end
env:
STAKE_SID: ${{ secrets.STAKE_SID }}
run: |
stakecli upload \
--team "$STAKE_TEAM" \
--game "$STAKE_GAME" \
--type front \
--path "apps/${APP_NAME}/build" \
--yes --publishWhat each step does:
- Checkout with full history — Turborepo uses git for its content-
based cache keys;
fetch-depth: 0makes local caching effective. pnpm/action-setup@v4— installs the pnpm version declared in the rootpackage.json'spackageManagerfield (e.g.pnpm@10.5.0).actions/setup-node@v6withcache: pnpm— Node 22 to satisfy the repo'sengines.node, plus lockfile-aware pnpm store caching.pnpm install --frozen-lockfile— reproducible install; fails the build ifpnpm-lock.yamlis out of sync.- Turbo cache (
actions/cache@v4on.turbo) — skips re-building unchanged packages across runs. Swap for the Turbo remote cache if you have one. pnpm turbo run build --filter=<app>— builds only the target app and its local workspace dependencies.- Install stakecli — via
jaxxstorm/action-install-gh-release, pinned to a release tag. stakecli upload --type front … --publish— uploads the Vite/SvelteKitbuild/output and publishes the new front version in a single call.
Store
STAKE_SIDas an encrypted repository secret (Settings → Secrets and variables → Actions → New repository secret). Pintag:to an explicitstakeclirelease for reproducibility; omit it to always install the latest release.
# Run tests
go test ./...
# Lint
golangci-lint run
# Build all binaries into bin/
make build
# Run the local mock API + demo bundle (see DEMO.md)
make demo-build
make mockapi # terminal 1
make demo-run # terminal 2See DEMO.md for the full demo/development setup using the bundled mock API.
Issues and PRs are welcome. Please keep changes focused and include tests
where reasonable. Run go test ./... and golangci-lint run before
opening a PR.
See LICENSE.