Hypertekt › Docs › Reference

The tekt command

Every tekt command: building and serving a site on your own computer, working with it on Hypertekt, and signing in from CI.

tekt builds, checks and serves a site on your own computer, and works with sites on Hypertekt. It’s also installed as hypertekt, the same command by its full name. Install it with bun add -g @hypertekt/cli: it needs Bun 1.4 or later.

Every command works on the site you’re in, from any of its folders. To work on another, give its folder at the end: tekt build sites/example. A command on Hypertekt works on the site the folder was cloned from, or on another site with --site, given by its name, its domain or its id.

On your computer

tekt init

tekt init

Start a new site in the folder you’re in: a site.yaml, a layout, a home page and a stylesheet, ready for tekt start.

tekt build

tekt build [--out <folder>] [--timings]

Build the site into <folder>/.hypertekt/build, or --out. --timings says how long each step of the build took.

tekt start

tekt start [--port <port>] [--host] [--published] [--country <code>] [--timings]

Serve the site at localhost:4321 as a preview, building it again when a file changes. --host serves it on your network too, to try it on a phone; --published builds it as published, with its integrations; --country sets the country visitors are in, for the cookie banner; --timings says how long each step of every build took.

tekt check

tekt check [--json] [--strict]

Check the site without building it. Exits with 1 if there’s an error, or, with --strict, a warning; --json prints the problems as JSON.

tekt run

tekt run <function> [--item <collection>/<id>] [--dry-run]

Run one of the site’s functions and save what it changes in content/. --item runs it as if that item had just been added; --dry-run saves nothing.

On Hypertekt

tekt login

tekt login [--api <url>] [--no-browser]

Sign in, by approving this computer in the dashboard. tekt keeps the token it’s given, and git uses that token as the password for your sites.

tekt logout

tekt logout

Sign out, taking the token away.

tekt whoami

tekt whoami

Who you’re signed in as, and how.

tekt sites

tekt sites [--json]

Every site you’re on, with its name, its id and your role.

tekt clone

tekt clone [site] [folder]

Clone a site (by its name, a domain or its id, or picked from a list), on its draft, set up so git uses your token. The folder is named after the site.

tekt pull

tekt pull

Bring in what’s new on the site’s draft, keeping your own changes.

tekt push

tekt push [-m <message>] [--no-wait]

Commit everything, bring in what’s new, and push to the draft. Waits for the draft to build, then says where its preview is, or what’s wrong with it: --no-wait doesn’t wait. A big push (photos) goes in parts.

tekt status

tekt status [--site <site>] [--json]

The draft, how its build went, its preview, and what’s live.

tekt publish

tekt publish [--site <site>]

Make the draft live, as a new release.

tekt releases

tekt releases [--site <site>] [--json]

Every release, with the live one marked.

tekt rollback

tekt rollback [release] [--site <site>]

Make an earlier release live again: the one before the live one, unless you say which.

tekt people

tekt people [--site <site>]

Who’s on the site, with their roles, and the invitations still pending.

tekt invite

tekt invite <email> [--owner] [--site <site>]

Put someone on the site as a developer, or with --owner as an owner. Someone new is emailed an invitation.

tekt remove

tekt remove <email> [--site <site>]

Take someone off the site, or cancel their invitation.

tekt secrets

tekt secrets [--site <site>]

The site’s secrets by name (never their values), and any secrets its files ask for that aren’t set.

tekt secrets set

tekt secrets set <NAME> [--site <site>]

Set a secret, typed at a prompt that doesn’t show it, or piped in: never as an argument, so it isn’t kept in your shell’s history.

tekt secrets delete

tekt secrets delete <NAME> [--site <site>]

Take a secret away.

tekt secrets push

tekt secrets push [--site <site>]

Set the secrets in the site’s .env that its files ask for, so what works under tekt start works on Hypertekt too.

tekt help

tekt help [command]

Say what tekt does, or what one command does (as tekt <command> --help does)

tekt --version

tekt --version

Say which version this is.

In CI

HYPERTEKT_TOKEN and HYPERTEKT_API, if they’re set, are used instead of what tekt login keeps. Make a personal token in the dashboard’s own Settings, for 30, 90 or 365 days, and give it to CI as HYPERTEKT_TOKEN:

HYPERTEKT_TOKEN=ht_pat_… tekt publish --site example

Git also takes the token as its password for your sites, with any user name.