SOLWYN
Commands

login / logout / whoami

Authenticate with Solwyn, clear stored credentials, and inspect the current identity

Solwyn authenticates one of two ways: a project API key for a single project, or an email/password login that stores a short-lived JWT for account-wide work. Keys and passwords are never accepted as command-line arguments or echoed — the CLI reads them only from a hidden prompt or from stdin, and stores them in your OS keychain.

For how credentials are resolved at call time — flag, environment, keychain, and which one wins — see Authentication.

login

Authenticate and store the credential. With no flag, login runs an interactive email/password exchange and stores the resulting JWT. With --with-key, it reads and stores a single project key.

Terminal
solwyn login [--with-key]
OptionTypeDefaultPurpose
--with-keybooleanfalseRead and store a project API key from a hidden prompt or stdin instead of logging in with email and password.
Contract
Authnone
Exit codes0 success · 1 generic/API · 2 usage · 3 auth or credential storage
JSON schemasolwyn.login.v1

A project key is validated structurally — sk_proj_ followed by 64 hexadecimal characters — before it is stored. An invalid value never appears in an error message or a log.

Email/password login requires an interactive terminal; in a non-interactive shell, use a project key instead.

Never pass a key or password as an argument. solwyn login --with-key reads the key from a hidden prompt, or from stdin when input is piped — nothing lands in your shell history or the process table.

Examples

Interactive email/password login:

Terminal
$ solwyn login
Email: alice@example.com
Password:
Authentication  Status
jwt             authenticated

Store a project key from a hidden prompt:

Terminal
$ solwyn login --with-key
Project key:
Authentication  Status
project_key     authenticated

Pipe a project key from a secret store, for CI:

Terminal
$ solwyn login --with-key < project.key
Authentication  Status
project_key     authenticated

logout

Clear every stored Solwyn credential — the project key and both JWT tokens — from the OS keychain. The SOLWYN_API_KEY environment variable is not touched; unset it separately if it is set.

Terminal
$ solwyn logout
Credentials  Status
all          cleared
Contract
Authlocal (none)
Exit codes0 success · 2 usage · 3 credential storage
JSON schemasolwyn.logout.v1

whoami

Show the active identity and project context. With a project key, whoami reports the credential source and configured project — never the key material. With a JWT, it fetches your account and lists the projects you can reach.

Terminal
$ solwyn whoami
Field               Value
Authentication      project_key
Source              environment
Configured project  proj_abc12345

With a JWT credential:

Terminal
$ solwyn whoami
Field           Value
Authentication  jwt
Source          keyring
User            Alice Example
Email           alice@example.com
Tier            founder
Project         proj_abc12345 (my-agent)
Project         proj_def67890 (staging-bot)
Contract
Authany
Exit codes0 success · 1 generic/API · 2 usage · 3 auth
JSON schemasolwyn.whoami.v1
  • Authentication — credential sources, storage, and resolution order
  • keys — rotate or revoke a leaked project key
  • projects — create a project and capture its first key
  • SDK quickstart — use a project key from the Python SDK

On this page