Skip to main content
1

Install @kernel/react

npm install @kernel/react@beta

2

Set environment keys

Set this in your .env file
REACT_APP_KERNEL_PUBLISHABLE_KEY=<your_publishable_key>
3

Set ZOD schema

Kernel allows you to collect and associate arbitrary user-provided data alongside a git connection. Example use cases:
  1. a path representing the root directory (e.g. for monorepos)
  2. a boolean specifying whether or not the user would like preview deployments enabled
Set the ZOD schema in the Terminal (see ZOD autoform docs).
4

use <Link>

import { KernelProvider, Link } from '@kernel/react'

if (!process.env.REACT_APP_KERNEL_PUBLISHABLE_KEY) {
  throw new Error("Missing Kernel Publishable Key")
}
const kernelPubKey = process.env.REACT_APP_KERNEL_PUBLISHABLE_KEY;

function App() {
  return (
    <div className="App">
      <KernelProvider publishableKey={kernelPubKey}>
        <Link clientId={<unique_connection_identifier>}></Link>
        ...
      </KernelProvider>
    </div>
  );
}
The client ID represents a unique connection to a repository. If you’d like a connection per account, it should be an account ID, if you’d like a connection per project, it should be a project ID, etc.