LARK License Check
Find open-source license problems in a Python project before you ship it.
LARK reads your requirements.txt, identifies the license of every package,
and shows which ones are incompatible with each other or with your own
project's license.
What you get
- A visual report beside the editor: a result chart, the mix of license
families, every finding with its reason, and a package table. Click a package
to jump to its line.
- A license badge on every line of
requirements.txt, coloured by license
family.
- Gutter icons and underlines on the packages with a finding:
- red: an incompatibility;
- yellow: allowed only under a condition, or it depends on your project's license;
- blue: the license of that package could not be determined.
- A status bar summary and a "Check licenses" link at the top of the file.
- The Problems panel lists every finding with the packages, licenses and reason.
Getting started
- Get an OpenAI API key at platform.openai.com/api-keys.
The extension uses your own key; a check of a typical file costs well under one US cent with the default model.
- Open a project that has a
requirements.txt and open that file.
- Click Check licenses at the top of the file, or run
LARK: Check requirements.txt licenses from the Command Palette (
Ctrl+Shift+P).
- Paste your key when asked. It is asked only once.
For clear yes or no answers, tell LARK the license of your own project: set
lark.projectLicense to an SPDX identifier such as MIT, Apache-2.0,
GPL-3.0-only or Proprietary. If you leave it empty, LARK reads it from
pyproject.toml or a LICENSE file when there is one.
Your API key and your data
- The key is stored with VS Code's secret storage, which uses the operating
system's credential store (Windows Credential Manager, macOS Keychain,
libsecret on Linux). It is never written to settings, to the project, or to a
file.
- A check sends this to the provider you selected, and nothing else: the package
names and version specifiers from the requirements file, and your project's
license (the value you set, the one in
pyproject.toml, or the first 1,500
characters of your LICENSE file).
- The extension collects no telemetry.
Limits
- The license of each package is stated from the model's own knowledge. It is
not looked up on PyPI, so it can be wrong, especially for less common
packages. The report marks licenses the model was unsure of.
- Only the packages listed in the file are checked. Their own dependencies,
-r includes, URLs and local paths are not.
- Two runs on the same file can give slightly different answers.
- This is an automated first pass, not legal advice.
Commands
| Command |
What it does |
LARK: Check requirements.txt licenses |
Runs the check on the open requirements file, or finds one in the workspace |
LARK: Open license report |
Opens the visual report of the last check |
LARK: Set API key |
Stores the key for the selected provider |
LARK: Clear API key |
Removes it |
Settings
| Setting |
Default |
Meaning |
lark.provider |
openai |
openai or anthropic |
lark.openaiModel |
gpt-4.1-mini |
OpenAI model (must support JSON-schema structured outputs) |
lark.anthropicModel |
claude-opus-5-5 |
Claude model |
lark.projectLicense |
empty |
SPDX id of your own project's license |
lark.openReportAfterCheck |
true |
Open the visual report after each check |
lark.checkOnSave |
false |
Re-run on every save (each run is a paid request) |
Background
LARK License Check is a lightweight companion to the LARK research system
(License Analysis with RAG and Knowledge Graphs). This extension uses only a
language model; it does not include the knowledge graph or the retrieval
component of the research system.
For developers
npm install
npm run compile
Open this folder in VS Code and press F5. A second window opens on the
samples/ folder with the extension loaded. npm run package builds the
.vsix file.
| File |
Role |
src/prompt.ts |
The system prompt and the JSON schema of the answer |
src/requirementsParser.ts |
Parses requirements.txt with line positions |
src/llm.ts |
OpenAI and Claude calls |
src/diagnostics.ts |
Turns the answer into underlines, hovers and report data |
src/decorations.ts |
License badges, gutter icons and line tints |
src/reportHtml.ts, src/reportPanel.ts |
The visual report |
src/extension.ts |
Commands, key storage, status bar, project-license detection |
| |