genroc

    docs / Reference / CLI

    Setup

    The genctl commands for setup: `init`, `config`, `token`, `lsp`.

    init

    scaffold a project, or mint a new UI password

    genctl init [dir] [--eval-node] [--ui] [--auth] [--postgres] [--version <tag>] [-y]
    genctl init password [email]

    Writes definitions/, a .genroc and optionally a compose.yaml, asking which parts you want; -y (or no terminal) takes the defaults, ./genroc-app unless you name a folder. --auth with --ui is a login; without it, genroc tokens. init password mints a new UI password.

    config

    read and write ~/.config/genroc/config.yaml

    genctl config get <key> | set <key> <value> | unset <key>

    Keys (the file is mode 0600):

    server    genroc server base URL                    ($GENROC_SERVER wins)
    token     API credential, a genroc_sk_* value       ($GENROC_TOKEN wins)

    --server on a command overrides both.

    token

    manage API credentials

    genctl token create --perms <list> [--label <name>] [-q]
    genctl token generate | token list [--json] | token revoke <id>...

    Perms, comma-separated (--perms read,operate): admin, deploy, operate, read, worker. Flat, not nested: only admin implies the others.

    create needs an admin token. generate makes a secret offline, for the first token. Without any token: genroc token, run against the database.

    lsp

    run the language server an editor talks to over stdio

    genctl lsp [--stdio]

    Language server for *.genroc.yaml over stdin/stdout, started by an editor. Reports the same errors as apply. --stdio is accepted and ignored.

    VS Code: the extension in editors/vscode. Neovim: genctl lsp as the cmd for yaml.