cliq¶
cliq is the dev CLI for interacting with Sartiq deployments and
resources. Today it focuses on managing the canonical local-dev seed
dataset (DB rows plus image assets in MinIO/R2); over time it will grow
to cover the rest of the day-to-day devops surface — deploys, log
inspection, environment-aware DB operations.
The CLI ships as a single self-contained Go binary, distributed from
releases.sartiq.com/cliq/.
Full command reference: the canonical, always-current docs live in the
cliqrepo README. This page introduces the tool and explains how it fits into our workflow — flag-level details are kept next to the code.
Why it exists¶
Local development needs two things the framework alone doesn't give us:
- Realistic test data. Onboarding to a new feature is much faster if every new clone of the backend can pull the same curated seed (products, shoots, generations, image assets) instead of starting empty or rolling its own.
- A consistent way to publish updates to that seed. When QA produces a useful state — say, a clean reproduction of a bug — we want a one-command path to make it the team's new canonical starting point.
cliq seed pull and cliq seed push are the two halves of that loop.
The dataset lives in Cloudflare R2 at sartiq-misc/seed-data/
(dump.sql.zst plus an assets/ tree) and is mirrored into the local
backend stack's db (Postgres) and minio containers.
Install¶
The installer detects your OS/arch and drops the binary into
~/.local/bin/cliq. Make sure that's on your PATH.
To pin a specific version:
First-run setup¶
cliq init # interactive wizard — captures backend path + Cloudflare account
cliq login # creates + verifies a Cloudflare User API Token
cliq init asks for:
- Your local
shootify-backendcheckout (socliqcan talk to the runningdb/miniocontainers viadocker-compose.dev.yml). - The Sartiq Cloudflare account ID.
- The R2 bucket + prefix to use (defaults to
sartiq-misc/seed-data).
cliq login walks you through creating a Cloudflare User API Token
(profile-scoped, so it auto-invalidates if you leave the org) with the
Workers R2 Storage / Edit permission on the Sartiq account, then
verifies it can mint short-lived R2 credentials and reach the seed
prefix.
Config lives at ~/.config/cliq/config.yaml; credentials at
~/.config/cliq/credentials.yaml (mode 0600).
Daily commands¶
cliq seed pull # restore the canonical seed dataset into the local stack
cliq seed push # publish current local state as the new canonical
cliq seed doctor # diagnose the local backend stack (db + minio reachable, etc.)
cliq upgrade # self-update to the latest release
cliq seed pull is destructive on the DB side — it TRUNCATEs
public tables before restoring — and incremental on the asset side
(ETag short-circuit, no redownload of unchanged objects). It refuses to
run if the local DB already contains user data unless you pass
--force. See the repo README
for the full flag list.
Upgrading¶
cliq upgrade # download + install the latest release
cliq upgrade --check # report current vs. latest without installing
cliq upgrade does not call the GitHub Releases API (the repo is
private; unauthenticated GH endpoints 404). It reads the version
pointer from releases.sartiq.com/cliq/latest/VERSION and pulls the
matching tarball from the same prefix.
If self-update is ever broken, re-running the installer one-liner is always a safe fallback.
Related documentation¶
cliqrepo README — Full command + flag referencecliqCONTRIBUTING — Dev loop, release pipeline- Environment Setup — Where new devs first encounter
cliq - Storage — R2 bucket layout the seed dataset lives in