ptkl profile
Manage authentication profiles. A profile stores the credentials and connection details needed to
interact with a Protokol project — every other ptkl command depends on an active profile.
Overview
Profiles are stored in ~/.ptkl/profiles.json. Each profile contains the API host, project
identifier, username, and an authentication token. You can create multiple profiles (e.g. one per
project or environment) and switch between them with ptkl profile use.
Subcommands
| Subcommand | Description |
|---|---|
| (none) | Print the name of the currently active profile |
new |
Create a new profile |
auth |
Re-authenticate the current profile |
list |
List all profiles |
use <name> |
Set a profile as active |
inspect <name> |
Print profile details |
delete <name> |
Delete a profile |
ptkl profile (no subcommand)
Prints the name of the currently active profile.
ptkl profile new
Create a new profile and authenticate against the Protokol API.
Options
| Option | Description |
|---|---|
-n, --name <name> |
Profile name (used to reference the profile in other commands) |
-u, --username <username> |
Username — email authenticates as a user, non-email as an API user |
-p, --password [password] |
Password — if provided without a value, prompts securely |
-P, --project <project> |
Project identifier |
-h, --host <host> |
API host URL (e.g. https://api.protokol.io) |
Example
ptkl profile new \
--name staging \
--username admin@example.com \
--password \
--project my-project \
--host https://api.staging.protokol.io
When --password is specified without a value, the toolkit prompts for the password with hidden
input — the password is never visible in your terminal history.
ptkl profile auth
Re-authenticate the current active profile. Use this when a token has expired or when you need to switch projects or update credentials.
Options
| Option | Description |
|---|---|
-p, --password [password] |
Password — if provided without a value, prompts securely |
-t, --token |
Authenticate using a token instead of a password |
-P, --project <project> |
Change project identifier |
Example
# re-authenticate with a password prompt
ptkl profile auth --password
# switch to a different project
ptkl profile auth --project other-project --password
ptkl profile list
List all configured profiles. The active profile is marked with *.
ptkl profile use
Set a profile as the active profile.
All subsequent commands will use the production profile unless --profile is specified.
ptkl profile inspect
Print the details of a profile (host, project, username, token expiry).
ptkl profile delete
Delete a profile from ~/.ptkl/profiles.json.
Warning
Deleting a profile is irreversible. If the deleted profile was active, you must run
ptkl profile use to select a new active profile.
See Also
- Toolkit Overview — all available toolkit commands
ptkl forge— build and deploy Forge apps