Connect

Authorize once.
Request access at runtime.

Set up Slack, GitHub, Linear, GA4, or a warehouse at the team. Your code asks Connect for a token when it has work. No provider API key in environment variables.

Runtime

Ask for access when you have work

getToken · slack/acme-slack

import { getToken } from "@sarksh/connect";

const token = await getToken("slack/acme-slack");

Your code

getToken

identity + uid

Connect

Mint access

refresh / unwrap

Provider

Short-lived token

use immediately

Model

Connector, token, consumer

Connector

A team-owned login to Slack, GitHub, Linear, GA4, Ads, or a warehouse you already run. Authorize once. The secret stays in the vault.

Token

Your code asks Connect at the moment it needs access. Connect returns a short-lived provider credential. Nothing from the provider lives in env.

Consumer

A pipeline extract, an ontology module, the CLI, or an agent. They store the connector id and call getToken. They never hold the refresh token.

How

Two authentications, every request

Your code authenticates to Connect. Connect authenticates to the provider. The round trip is the runtime credential exchange.

Authorize once

OAuth or an API key at the team. Connect stores the refresh token or secret in the vault. The dashboard never shows it again.

Prove identity

Pipelines and ontology use a workload identity. Local and CLI pass a mint key (SARK_CONNECT_TOKEN). Same check: this caller may use this connector.

Exchange

Connect refreshes or unwraps, and returns a short-lived access token or the static secret. Your code uses it immediately against the provider — or invokes a catalogued operation.

Connectors

Services you already have

Official connectors are code in the registry. OAuth where the provider has it. An API key or URI when that is the grant.

Slack

slack

Post messages and list conversations through a workspace install.

GitHub

github

Open issues and read repos through an org or user OAuth grant.

Linear

linear

Read and write issues against a workspace.

Notion

notion

Search pages and query databases the integration can see.

Stripe

stripe

API key at create time. Balance, customers, payment intents.

GA4

ga4

Google Analytics reports. Property is picked on the connector.

Google Ads

google_ads

Campaign performance and search terms. Customer is picked on the connector.

Search Console

search_console

Query analytics for a verified site.

BigQuery

bigquery

SQL you already run. Project and dataset stay on their side.

Databricks

databricks

A SQL warehouse in their workspace. Host plus warehouse id.

Postgres

postgres

A connection URI. Sark pings and runs read-only SELECT.

PostHog

posthog

Personal API key plus a project. Events, persons, HogQL.

Are

What Connect is

  • Team-level connectors any allowed consumer can reuse
  • Runtime credential exchange — getToken, not a provider key in .env
  • OAuth refresh and API-key unwrap behind one vault
  • Callable operations on the connector (post to Slack, run a report)

Are not

What it is not

  • A place to paste tokens into a pipeline node
  • Backing for ontology objects — extract to a table first
  • A second auth system inside an ontology package
  • Jobs. Jobs is the scheduler. Connect is the login.

FAQ

Frequently asked questions

Get started

Add a connector. Call getToken. Use the credential.

Get started