tk authenticates with a Turnkey API key stored in a named profile.
# Create a profile with a fresh credential, then register the printed public
# key with Turnkey.
tk profile create --profile-name admin --organization-id ORG_UUID
# Verify the credential with Turnkey and select the profile.
tk login --profile-name admin
# Check the selection.
tk auth status
tk whoamiSeveral profiles can share one machine:
tk profile list
tk profile show --profile-name agent
tk profile use --profile-name agent
tk --profile agent whoami
export TK_PROFILE=agent
# Change a profile's organization, API endpoint, or credential file.
tk profile set --profile-name agent --organization-id OTHER_ORG_UUID
tk profile set --profile-name agent --api-key-file ~/.config/turnkey/tk/api-keys/02….json
# Forget a profile. Credential files are kept.
tk profile delete --profile-name agent
tk auth logoutThe registry lives at ~/.config/turnkey/tk.config.toml and generated
credentials under ~/.config/turnkey/tk/api-keys/.
Skip the registry and pass the credential through the environment:
export TURNKEY_ORGANIZATION_ID=ORG_UUID
export TURNKEY_API_PUBLIC_KEY=API_PUBLIC_KEY
export TURNKEY_API_PRIVATE_KEY=API_PRIVATE_KEY
export TURNKEY_API_BASE_URL="https://api.turnkey.com" # optional
tk whoami--profile or TK_PROFILE wins over the environment bundle, which wins over
the active profile. Credential secrets are never accepted as arguments.
- bootstrapping-organization: the root profile and tags an organization needs before its first agent.
- managing-identities: creating users and rotating the credentials profiles hold.
- provisioning-agent-identity: generating the agent's credential with
profile createon its own host and proving the identity withwhoami. - revoking-agent-keys: the revoker host's own credential and the
whoamifailure that proves a deleted key is dead. - provisioning-session-agent: the agent profile that session keys are activated into and the
whoamicheck after each renewal. - sidecar-patterns: confirming a renewed key with
whoamias the agent and pinningHOMEandTK_PROFILEfor every process that runstk.