Lens

Configuration

Set up your environment and customize Lens for your research needs.

Project Initialization

When you run lens init, a lens.config.yaml file is created in your directory. This file is the source of truth for your project's collectors and pipelines.

bash
lens init my-project

Managing API Keys

Most technical collectors (like GitHub or arXiv) require authentication for optimal performance. We recommend using a .env file or system environment variables to keep your keys secure.

bash
# .env file
LENS_GITHUB_TOKEN=ghp_your_token
LENS_OPENAI_API_KEY=sk-your-key

Security

Never share your API keys or commit them to source control. Ensure .env is added to your .gitignore.

Common Customizations

Changing the Language

By default, Lens searches in English. You can change this globally or per-collector.

yaml
collectors:
  wikipedia:
    language: "de"

Adjusting Result Limits

Control how much data Lens collects from each source to balance speed and depth.

yaml
engine:
  max_results_per_source: 10

Next Steps

For an exhaustive list of every possible configuration setting, see our Reference guide.

View Configuration Reference