Lim Local: an offline contract checker for freelancers, built with Gemma 4 A developer built Lim Local, an open-source command-line tool that audits freelance contracts entirely offline using Google's Gemma 4 model (gemma4:e2b-it-qat) run locally through Ollama. The tool extracts payment, IP ownership, and indemnification clauses from .md, .txt, .docx, or text-based .pdf files, compares them against the Common Paper Professional Services Agreement Standard Terms v1.1, and generates a single-file HTML report with risk ratings, redlines, and suggested negotiation language. On an RTX 4050 with 6 GB of VRAM, a full audit takes roughly 10 to 20 seconds, and the MIT-licensed code never sends contract text off the local machine. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle https://dev.to/challenges/hacktoberfest-week2-2026-10-12 Imagine you are a freelance developer and a new client sends you a contract. Payment is due 90 days after you send the invoice, and only after the client's own customer has paid them. The IP clause says everything you write belongs to the client the moment you write it, even if they never pay you. You would like a second opinion before you sign. You have two bad choices. A contracts lawyer often charges $300 to $800 an hour, which is hard to justify on a small project. Or you can paste the contract into a cloud AI tool, but that can break the NDA you signed, because the client never agreed to let anyone else read their draft. Lim Local is a command-line tool that gives you that second opinion on your own laptop. The contract never leaves your computer. You give it a contract file .md , .txt , .docx or a text-based .pdf . It finds the three clauses that cause freelancers the most trouble: payment terms, IP ownership, and indemnification and liability who has to pay when something goes wrong . It compares each one with the open Common Paper standard terms and writes one HTML report that looks like a Wikipedia page. For every clause, the report shows: Here is a real example from my test contract. The tool flags this sentence: Payment is explicitly conditioned upon Client successfully collecting licensing disbursement from its ultimate institutional enterprise client. and in the suggested rewrite, the payment clause says: Client agrees to remit payment within thirty 30 days of receipt of invoice. Who would pay for it? Solo freelancers and small agencies who sign client contracts without a lawyer. My idea is a packaged desktop app with a one-time price something like $29 , plus paid add-on packs for other kinds of clauses, such as non-competes. I have not sold anything yet, and the price is a guess. This short video shows Lim Local auditing a test contract and the report it writes. The test contract in the demo has deliberately unfair terms. To try it yourself: git clone https://github.com/harjasbb07-eng/Lim-Local.git cd Lim-Local npm install ollama pull gemma4:e2b-it-qat npm run audit -- sample sow.md Then open audit sample sow.html in your browser. An offline contract triage tool for independent contractors and small agencies. It reads a client contract, finds three high-risk clauses, compares them with the Common Paper standard terms, and writes a single-file HTML report with risk ratings, redlines and negotiation lines. Everything runs on your own machine with a local Gemma 4 model through Ollama. Lim Local is a preliminary triage aid. It is not legal advice. Freelancers and boutique studios regularly receive client-drafted Master Services Agreements MSAs and Statements of Work SOWs that contain unbalanced terms: A commercial contracts lawyer costs roughly $300 to $800 per hour, which is hard to justify for a routine SOW… The code is MIT licensed. The README lists what the tool cannot do. The model. Lim Local uses Gemma 4 gemma4:e2b-it-qat , a small open model from Google. It runs through Ollama, a free program that runs AI models on your own computer. The tool only talks to 127.0.0.1 , which is your own machine. On my laptop RTX 4050, 6 GB video memory a full audit usually takes 10 to 20 seconds. The steps. reader.ts pulls the text out of the file. splitter.ts cuts it into sections and picks one section for each of the three clause types. auditor.ts compares each section with 13 sections of the Common Paper Professional Services Agreement PSA Standard Terms v1.1, copied word for word. They are licensed CC BY 4.0. generate report.ts writes the report. Anything that comes from the contract or the model is HTML-escaped. Code decides, Gemma writes. Two or more red flags means HIGH, one means MEDIUM, none means LOW. LOW does not mean the clause is safe. It only means none of my checklist items were found. What broke along the way. A small model is not a good judge on its own. These are the problems I hit: What I tested. | Document | Result | |---|---| | sample sow.md , deliberately unfair | 3 HIGH | | sample fair sow.md also as .docx and .pdf , balanced | 3 LOW | | messy sow.txt , headings with no numbers | 3 HIGH | | example.txt , a government-style sample with fictional data | Payment MEDIUM no deadline, 10 percent holdback . The other two clauses are not in the file, and the report says so. | | Tester's .docx , a fictional contract with a deliberately bad addendum | 3 HIGH | This is a small set. I tuned the rules while looking at most of these files, so please do not read it as an accuracy score. The tester's file was the first one I had not tuned against, and it found the bugs above. What it cannot do. I used AI chat assistants and a coding extension to help write and review the code. I ran and tested every change myself. The tester's contract was also drafted with AI and is marked as a fictional test file. The contract stays on the laptop. This is the reason the project exists. A freelancer under an NDA cannot send a client's draft to a closed cloud service. Because the model is open, it runs on the freelancer's own machine, and after the one-time model download the tool needs no internet. I also checked this myself: I switched off my laptop’s Wi-Fi, ran an audit on sample sow.md, and it finished normally. It costs nothing per contract. There is no bill for each page, so a one-time price like $29 can work as a business. A tool built on a paid cloud API would pay for every audit, and every upload would add a privacy risk. I could change how the model behaves. Because the model runs on my own machine, I could turn off its hidden thinking, set its memory window, and put code checks around its answers. That is how I went from a model that copied my checklist to a tool that gives steady ratings. Where a closed model would be better. A large cloud model would probably read a contract more carefully than a small one. But it would break the one rule this tool has to follow, which is that the contract never leaves the machine. For this problem, a small model that stays local is the better trade. One independent tester cloned the repo and ran Lim Local on their own laptop, which has an RTX 2050 with 4 GB of video memory. It worked on that smaller card. On their last run, a full contract took 35.9 seconds. That is slower than on my laptop, but it finished. I do not have times for their earlier runs. They sent me a contract and two complaints. I fixed all three problems: audit sample sow.html . I do not have their exact words, so this is my summary of what they told me and not a quote. They said that if Lim Local really works well and keeps them from pasting their contracts into a cloud AI tool, they would definitely pay a one-time fee for it. They did not name an amount, but they said a finished product would be worth something to them. Nobody has paid yet, so I still do not know the right price. Best Use of Gemma. Gemma 4 runs locally through Ollama and writes the suggested rewrites and the negotiation sentences.