Commands
This guide covers the Commands that ship with Tinka. The Tinka CLI, tinka, runs the ones that need no App; act runs the ones that work inside an App. List them with tinka --help or act --help, and add --help after a Command's name to see its flags.
act --helpEvery Command also answers agents with a single JSON result, described in Agent mode. The JSON examples below show the keys each Command adds.
tinka version
tinka version prints which Tinka you are running, along with the Go toolchain and platform it was built for. Include its output in bug reports so maintainers can reproduce your setup.
tinka versiontinka v1.0.0-alpha.1 (go1.27.2, linux/amd64)A binary installed with go install reports its release tag. A binary built from a checkout reports a pseudo-version such as v0.0.0-20261017094113-8b9632f181a3, ending in +dirty when the checkout has uncommitted changes. tinka --version prints the same version on its own.
With --json, or when an agent runs it, tinka version prints a single result:
{"command":"version","result":"ok","version":"v1.0.0-alpha.1","go":"go1.27.2","platform":"linux/amd64","duration_ms":0}act generate:key
act generate:key creates a random APP_KEY: 32 bytes from crypto/rand, written as 43 URL-safe base64 characters. It writes the key to .env and adds APP_KEY= with no value to .env.example, so the example names the variable without revealing the key. Run it from your App's directory.
act generate:keyWrote APP_KEY to .env and .env.exampleAn existing APP_KEY is replaced in place, and every other line of both files stays as it was. The files are found the way env.Load finds them, including ENV_PATH. .env.example is only changed when it exists, and the Command fails when there's no .env, because it never creates one.
When APP_ENV is production, the Command prints the key with a reminder instead of writing it, because production reads no .env file:
APP_KEY=8fOW8QykADQK8HFBSFcj31kcZmMNiBJP6drrWYwwXho
APP_ENV is production, which reads no .env file: set APP_KEY in your platform's environmentFollowing is the list of flags you can pass to act generate:key:
With --json, or when an agent runs it, act generate:key prints a single result:
{"command":"generate:key","result":"ok","files":[".env",".env.example"],"duration_ms":1}It fails with one of these error codes:
See also: The APP_KEY, Agent mode