For AI agents: the complete documentation index is available at /en/llms.txt, the full documentation bundle is available at /en/llms-full.txt, and this page is available as Markdown at /en/operations/cli-and-config.md.
  • English
  • CLI Commands & Environment Reference

    Yearning v4 ships as a single yearning binary with strict configuration precedence:

    built-in defaults < YAML config (--config) < YEARNING_* environment variables

    Subcommands

    CommandPurposeKey Flags
    yearning serveRun control plane HTTP server, scheduler, SSE hub, and embedded Web UI--config, --listen, --bootstrap-admin-password-file, --migration-mode
    yearning migrateRun PostgreSQL schema migrations and v3 -> v4 data cutoverpreflight / dry-run / apply / verify, --config, --run-id, --migrations-dir, --catalog, --report-dir
    yearning reset-admin-passwordReset locked built-in admin password out-of-band (also --reset-admin-password)--config
    yearning mockContract-driven mock server with zero external dependenciesUses api/openapi/yearning-v4.yaml
    yearning versionPrint build version, commit, OS/arch, and Go versionNone

    Key YEARNING_* Environment Variables

    VariableDescription
    YEARNING_ENVIRONMENTRuntime mode (development or production; required for non-loopback listen)
    YEARNING_SERVER_LISTEN_ADDRESSListen address (default 127.0.0.1:8080, container 0.0.0.0:8080)
    YEARNING_TRUSTED_PROXIESComma-separated trusted reverse proxy IPs / CIDRs
    YEARNING_DATABASE_HOST / PORT / USER / PASSWORD / DBNAMEPostgreSQL metadata database connection settings
    YEARNING_DATABASE_SSLMODE / SSLROOTCERTTLS verification mode (verify-full recommended) and CA file path
    YEARNING_RETENTION_DATABASE_DSNRequired in production: dedicated yearning_retention role DSN
    YEARNING_KEY_PROVIDER_KIND / PATHAEAD keyring provider (file) and path to keyring.json
    YEARNING_SESSION_COOKIE_NAME / SECURESession cookie name (yearning_session) and HTTPS Secure flag
    YEARNING_LOGGING_LEVEL / FORMATStructured logging level (info) and format (json / console)
    YEARNING_OBSERVABILITY_SERVICE_NAME / DEPLOYMENT_ID / INSTANCE_IDService telemetry identifiers
    YEARNING_SCHEMA_MIGRATIONS_DIRMigration directory validated by exact_schema_version readiness probe
    YEARNING_ALLOW_LOOPBACK_TARGETSDev-only loopback target override (rejected at startup in production)