Authentication variables
Typeset uses Clerk for user authentication. You’ll need to create a Clerk application and obtain your API keys.Your Clerk publishable key. This is safe to expose in the browser and is used for client-side authentication.Find this in your Clerk dashboard under API Keys.
Your Clerk secret key. This should be kept secure and is used for server-side authentication.Find this in your Clerk dashboard under API Keys.
Collaboration variables
Typeset uses Liveblocks for real-time collaboration features.Your Liveblocks secret key used for authenticating users and managing real-time collaboration.Get this from your Liveblocks dashboard under Project > API Keys.
AI model variables
Typeset integrates with OpenAI and Google AI for the AI assistant feature.Your OpenAI API key for accessing GPT models. Used for the AI assistant that can edit documents and answer questions.Create an API key at platform.openai.com.
Your Google AI API key for accessing Gemini models. This is optional if you only want to use OpenAI models.Get an API key from Google AI Studio.
LaTeX compilation
Typeset uses Tectonic for LaTeX compilation. The binary must be installed separately and available in your system PATH or in the
bin/ directory of your project.Ensure your system PATH includes the Tectonic binary location:
- Linux:
/usr/local/bin/tectonicor./bin/tectonic - macOS:
/usr/local/bin/tectonic(default installation path) - Custom location: Add your custom path to the system PATH
Optional deployment variables
Automatically set by Vercel. This is used for generating absolute URLs in production.If self-hosting outside of Vercel, set this to your domain name (e.g.,
typeset.yourdomain.com).Example configuration
Create a.env.local file in your project root with the following variables:
Validating your configuration
After setting up your environment variables:- Restart your development server
- Check the browser console for any authentication errors
- Test creating a new project to verify Liveblocks integration
- Try the AI assistant to confirm API keys are working
- Compile a LaTeX document to ensure Tectonic is properly configured
Next steps
Authentication setup
Configure Clerk authentication in detail
Database configuration
Set up Liveblocks storage