GoodMemGoodMem
ReferenceCLIUser

User Enroll

User Enroll CLI command reference

goodmem user enroll

Exchange an enrollment credential for your initial API key

Synopsis

Complete human enrollment without an existing GoodMem API key.

The command reads the enrollment credential from GOODMEM_ENROLLMENT_TOKEN, piped standard input, an owner-only file, or a hidden terminal prompt. By default, it generates the initial API key locally, saves the exact retry tuple in an owner-only recovery file, and removes that file after confirmed completion. A lost response can therefore be retried without generating a different key.

Use --server-generate-key to omit the client-generated tuple and let the server generate the key. That mode creates no recovery state, and a response lost after commit cannot be recovered by retrying because the server delivers the raw key only once.

goodmem user enroll [flags]

Examples

  # Prefer a hidden interactive prompt
  goodmem user enroll --token-prompt

  # Read from a protected file or an environment variable
  goodmem user enroll --token-file ./enrollment-token
  GOODMEM_ENROLLMENT_TOKEN='gme_...' goodmem user enroll --quiet

  # Ask the server to generate the key without creating local recovery state
  goodmem user enroll --token-prompt --server-generate-key

Options

  -f, --format string                      Output format: table, json, compact, quiet (default "table")
  -h, --help[=true|false]                  help for enroll
  -q, --quiet[=true|false]                 Output only the raw API key
      --server-generate-key[=true|false]   Let the server generate the initial API key (one-time response; no recovery state)
      --token string                       Enrollment credential (use '-' for piped stdin; visible in shell history)
      --token-file string                  Read the enrollment credential from an owner-only file
      --token-prompt[=true|false]          Prompt for the enrollment credential with input hidden

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server URL (gRPC API; default ports: https=443, http=80)

SEE ALSO

On this page