Authentication
Logging in
Section titled “Logging in”stocksmith auth login # interactive prompt (hidden input)echo "$KEY" | stocksmith auth login # from stdin (CI)stocksmith auth login --token "$KEY" # explicit flagOn success your account name + token are stored in ~/.stocksmith/config.toml (mode 0600).
Status & logout
Section titled “Status & logout”stocksmith auth status # shows account, masked key, and API URLstocksmith auth logout # removes stored credentialsToken resolution precedence
Section titled “Token resolution precedence”The token is resolved in this order — first match wins:
--tokenflagSTOCKSMITH_API_TOKENenvironment variable- stored profile (
~/.stocksmith/config.toml)
A missing token yields a clear error and exit code 3.