Skip to main content
You must fill in every variable in your .env file before starting Quark. The app validates all environment variables on startup and exits immediately if any are missing or malformed.
1

Clone the repo and run setup

Clone the repository and run the setup script. It creates a .env file from .env.example, sets up a Python virtual environment, installs all Node.js and Python dependencies, applies Supabase database migrations, and runs the test suite to confirm everything is working.
git clone https://github.com/drona-gyawali/Quark.git
cd Quark
chmod +x setup.sh
./setup.sh
The setup script requires Node.js (with npm) and Python 3. If psql is available and SUPABASE_DB_URL is set in your .env, it will also apply database migrations automatically.
2

Configure your .env file

Open the .env file created by setup and fill in every variable. Each variable maps to a specific service — register for each one using the links below.LLM provider
Sign up at https://console.groq.com to get a Groq API key. Quark uses the OpenAI-compatible API format, so any provider that exposes an OpenAI-compatible endpoint works.
.env
LLM_TOKEN=your-llm-api-key
LLM_URL=https://api.groq.com/openai/v1
LLM_MODEL=meta-llama/llama-4-scout-17b-16e-instruct
VoyageAI embeddings
Sign up at https://www.voyageai.com/ to get an embedding API key.
.env
EMBEDDDING_TOKEN=your-voyageai-api-key
EMBEDDING_MODEL=voyage-4-large
Unstructured.io document parser
Sign up at https://unstructured.io/?modal=try-for-free to get your API key and server URL.
.env
UNSTRUCTURED_TOKEN=your-unstructured-api-key
UNSTRUCTURED_URL=https://api.unstructuredapp.io/general/v0/general
Qdrant vector database
Sign up at https://qdrant.tech/ to create a free cloud cluster. Copy the cluster URL and API key from the Qdrant dashboard. Choose any name for your collection.
.env
VECTOR_DB_TOKEN=your-qdrant-api-key
VECTOR_DB_URL=https://your-cluster-id.us-east4-0.gcp.cloud.qdrant.io
COLLECTION_NAME=your-collection-name
Mem0 long-term memory
Sign up at https://mem0.ai/ to get your API key.
.env
MEM0_API=m0-your-mem0-api-key
Upstash Redis (short-term memory)
Sign up at https://upstash.com/ and create a Redis database. Copy the REDIS_URL from the database details page.
.env
REDIS_URL=rediss://default:[email protected]:6379
ElasticLake object storage
Sign up at https://app.elasticlake.com/ to create an object and obtain your access credentials.
.env
OBJECT_NAME=quark-object
OBJECT_ID=your-access-key-id
OBJECT_ACCESS_KEY=your-secret-access-key
Supabase database
Sign up at https://supabase.com/ and create a project. Find the API URL, anon key, service key, and direct connection URL in Project Settings → API.
.env
SUPERBASE_URL=https://your-project-ref.supabase.co
SUPERBASE_KEY=your-anon-key
SUPERBASE_DEV_KEY=your-service-role-key
SUPABASE_DB_URL="postgresql://postgres.your-ref:[email protected]:5432/postgres"
Logging and environment
.env
PINO_LOG_LEVEL=debug
ENV=dev
3

Start the CLI

Once all environment variables are set, start the interactive CLI:
npm run cli
The CLI launches a terminal UI. You will see a welcome prompt once Quark connects to all services successfully.
4

Ingest a document

Inside the CLI, use the :ingest command followed by the absolute or relative path to your PDF:
:ingest /path/to/your/document.pdf
Quark will parse the document, extract text and images, generate embeddings, and store everything in Qdrant. Ingestion time varies with document size.
You can ingest multiple documents. Each document is stored under its own metadata so Quark can cite the correct source in its answers.
5

Ask a question

Once ingestion is complete, type your question directly in the CLI prompt:
What are the key findings in section 3?
Quark retrieves the most relevant chunks from Qdrant, hydrates the prompt with session context from Redis and long-term memory from Mem0, and returns an answer grounded in your document content.

Next steps

Configuration

Full reference for every environment variable and pipeline constant.

CLI usage

Learn all available CLI commands and session management options.

Build docs developers (and LLMs) love