l0l1.skelfresearch

Quickstart

l0l1 is open source and self-hosted. Get a validation, PII, and pattern-learning loop running against your own database in a few minutes. Commands below use the CLI; the same operations are available through the REST API, Jupyter magic, and the VS Code extension.

  1. 1

    Install l0l1

    Install the open-source package from the project repository and confirm the CLI is on your path.

    # clone and install the open-source project
    git clone https://github.com/skelf-research/l0l1-api
    cd l0l1-api
    pip install -e .
    
    l0l1 --help
  2. 2

    Configure a provider

    Point l0l1 at OpenAI or Anthropic for the LLM-reviewer step. Providers are pluggable; set the key for the one you use.

    # choose a provider for the validation reasoning step
    export OPENAI_API_KEY=sk-...
    # or
    export ANTHROPIC_API_KEY=sk-ant-...
  3. 3

    Connect a database

    Give l0l1 read access to the database whose schema it should validate against. It supports PostgreSQL, MySQL, SQLite, and DuckDB.

    # schema introspection needs a connection string
    export L0L1_DATABASE_URL=postgresql://user:pass@host:5432/analytics
  4. 4

    Scan for PII

    Before any text leaves the local process, scan a prompt or query for PII and anonymize the detected literals.

    l0l1 check-pii "SELECT email, ssn FROM customers WHERE id = 42"
    # Found: EMAIL_ADDRESS, US_SSN
    # Anonymized: SELECT <EMAIL_ADDRESS>, <US_SSN> FROM customers WHERE id = <NUMBER>
  5. 5

    Validate a query

    Validate SQL against the live schema. l0l1 checks real columns and relationships and flags queries that are plausible but wrong.

    l0l1 validate "SELECT customer, sum(total) FROM orders GROUP BY customer"
    # error: column "customer" does not exist on orders
    # hint:  did you mean "customer_id"?
  6. 6

    Learn and complete

    Approved queries are sanitized of literals and stored per workspace, then surfaced as completions the next time someone writes similar SQL.

    l0l1 complete "SELECT customer_id, sum(total) FROM orders WHERE"
    # suggestions drawn from your workspace's approved patterns

Command names and environment variables above are illustrative of the CLI shape. For the exact, current flags and configuration, see the official documentation.