Lightyear LogoLightyear Docs

Quick start

From install to your first authenticated API call in under 2 minutes

Quick start

This guide takes you from zero to making authenticated API calls in under 2 minutes. No configuration files, no environment variables, no OAuth libraries.

Install the CLI

npm install -g @unscrambled/cli

Or with Homebrew:

brew install unscrambled/tap/unscrambled

Verify the installation:

unscrambled --version

Log in to Unscrambled

Create an account or log in to your existing one:

unscrambled login

This opens your browser for authentication. Once complete, your session token is stored securely and the CLI is ready to use.

Connect your first service (OAuth)

Let's connect GitHub. This uses an OAuth flow — Unscrambled handles the entire handshake.

unscrambled auth add github

Your browser opens to GitHub's authorization page. Approve the permissions and you're done:

Opening browser for GitHub OAuth...
✓ Authenticated as @yourname
Credentials stored securely in Unscrambled vault.

Make your first API call

Now call the GitHub API. No tokens, no headers, no .env files:

unscrambled curl https://api.github.com/user/repos

Unscrambled detects that this URL belongs to GitHub, retrieves your stored OAuth token, injects it as a Bearer header, and returns the response:

[
  {
    "name": "my-project",
    "private": true,
    "language": "TypeScript"
  },
  {
    "name": "dotfiles",
    "private": false,
    "language": "Shell"
  }
]

Connect an API key service

Not every service uses OAuth. For API key services like OpenAI, Unscrambled prompts you once and encrypts the key:

unscrambled auth add openai
OpenAI uses API keys. Paste your key:
sk-proj-████████████████████████
✓ API key encrypted and stored. Never touches disk.

Now call the OpenAI API:

unscrambled curl -X POST https://api.openai.com/v1/chat/completions \
  -d '{
    "model": "gpt-4",
    "messages": [{"role": "user", "content": "What is 2+2?"}]
  }'

The API key is injected server-side. The request and response are logged (encrypted) for debugging.

See your connected services

unscrambled auth list
SERVICE     TYPE       CONNECTED
github      OAuth      2 hours ago
openai      API Key    5 minutes ago

Next steps

  • Authentication guide — supported services, OAuth vs API key flows, managing credentials
  • Curl reference — all flags, response formatting, examples for popular APIs
  • Automations — write and deploy scripts that run on a schedule

On this page