subconscious-cli
v0.1.1
Published
CLI for Subconscious — authenticate and manage your API keys
Maintainers
Readme
@subconscious/cli
Authenticate with Subconscious from your terminal. One command opens your browser, signs you in (or up), and saves your API key locally.
Quick start
npx @subconscious/cli loginThat's it. Your API key is saved to ~/.subcon/config.json and ready to use.
How it works
Terminal Browser
│ │
│ 1. Start local callback server │
│ 2. Open browser ───────────────►│
│ │ 3. Sign in / sign up via Clerk
│ │ 4. API key auto-created
│ 5. Receive key ◄────────────────│
│ 6. Save to ~/.subcon/config.json│
│ │ "You can close this tab"
✓ Logged in! │Commands
login
Opens your browser to sign in (or create an account). After authentication, your API key is automatically generated and saved.
npx @subconscious/cli loginlogout
Removes your saved API key.
npx @subconscious/cli logoutwhoami
Shows your current authentication status and which key is active.
npx @subconscious/cli whoamiWhere keys are stored
Keys are saved to ~/.subcon/config.json with 600 permissions (owner-read-only). The file looks like:
{
"subconscious_api_key": "sk-..."
}Environment variable SUBCONSCIOUS_API_KEY takes precedence over the config file.
Global install
If you prefer a persistent command:
npm install -g @subconscious/cli
subconscious login