Docs

amfelt init agent

Initialize the agent identity and generate its keypair.

Initialize the Amfelt agent with machine identity (MI) credentials from your Amfelt invite. This command:

  1. Validates input credentials
  2. Creates ~/.amfelt/ and ~/.amfelt/keys/ directories (mode 0700)
  3. Generates Ed25519 keypair (locally, never transmitted pre-registration)
  4. Stores encrypted config with MI credentials

The private key is encrypted with AES-256-GCM using PBKDF2-derived key. All setup is offline — no network calls.

Example:
  amfelt init-agent \
    --vault-mi-id mi-550e8400-e29b-41d4-a716 \
    --vault-mi-secret "your-secret-from-infisical" \
    --config-format yaml

Next step: Register with the API using --register flag.

Usage  

amfelt init-agent [flags]

Flags  

FlagTypeDefaultDescription
--config-formatstringyamlconfiguration file format; one of yaml, json
--forceboolfalseignore warnings and errors
--vault-mi-idstring—machine identity ID from your Amfelt invite (format mi-*)
--vault-mi-secretstring—machine identity secret from your Amfelt invite (minimum 32 characters)

Global flags  

FlagTypeDefaultDescription
--amfelt-dirstring.amfeltdirectory for workspace files (such as plugins); does not move agent identity (controlled by AMFELT_DIR)
--configstring—directory or filename of the application configuration
-f, --formatstringdefaultlog format to use; either default, pretty, or json
-l, --levelstringinfominimum log level to display; either error, warn, info, or debug
-v, --verboseboolfalsetrigger to use verbose logging

Generated from amfelt v5.6.3.


Last updated on November 1, 2026