Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>LonghandNew to Visual Studio Code? Get it now.
Longhand

Longhand

Longhand

|
1 install
| (0) | Free
Private inline code completion from a model that runs on your machine and was trained only on code people wrote before AI assistants existed.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Longhand

Inline code completion from a small model that runs entirely on your computer. Your code never leaves the machine, there is no account, and there is no telemetry.

The model was fine-tuned only on code that people committed to GitHub before June 2021, before AI coding assistants were publicly available. It suggests what a person would write next, and it stops where a person would stop: usually the rest of the statement or block, never the rest of the file.

Getting started

  1. Install the extension.

  2. Click Download when Longhand asks. It fetches two things, once:

    • the llama.cpp runtime, about 36 MB, from github.com/ggml-org/llama.cpp
    • the Longhand model, 1.8 GB (1.1 GB on machines without a GPU), from huggingface.co/yethdev/longhand-1.7b-gguf

    Both are checked against SHA-256 hashes pinned in the extension, and a download you cancel resumes where it stopped.

  3. Start typing. Suggestions appear as gray text. Tab accepts, Ctrl+→ (Cmd+→ on macOS) accepts one word, and Alt+\ asks for a suggestion on demand.

If you said "Not now", click Longhand in the status bar, or run Longhand: Download Model.

Requirements

  • VS Code 1.100 or newer on Windows, macOS or Linux (x64 or arm64).
  • 3 GB of free disk space.
  • A GPU with 2 GB of free memory is strongly recommended: NVIDIA, AMD or Intel through Vulkan, or Apple silicon through Metal. Without one, Longhand runs on the CPU, which works but takes a couple of seconds per suggestion.
  • On Linux, using the GPU through Vulkan needs the system Vulkan loader (libvulkan1 on Debian and Ubuntu) and a Vulkan driver for your GPU.

How well it works

Scored on 300 completions from 83 GitHub repositories held out of training:

Base model Longhand
Ends the suggestion by itself 2% 85%
Writes 3+ lines more than the author did 92% 20%
First line exactly right 1% 43%
Whole suggestion exactly right 0% 24%

On an RTX 5080 a suggestion takes 126 ms (median) through Vulkan. On a 16-core CPU it takes about 2 seconds.

It trained on C, C++, C#, Go, Java, JavaScript, Kotlin, Lua, PHP, Python, Ruby, Rust, Scala, shell, Swift, TypeScript and TSX, and is switched on for every language except prose and data formats. Languages close to those, such as other C-family languages, work reasonably well.

Privacy

  • The model server listens on 127.0.0.1 only and requires a random key generated per session.
  • Files matching longhand.exclude (.env, keys, anything named *secret* by default) are never completed in and never read as context.
  • The only network traffic is the one-time download above. Nothing is sent anywhere after that.

Staying out of your way

  • One model server is shared by all your VS Code windows.
  • It runs at below-normal priority and uses no CPU while you aren't typing.
  • After 15 minutes without a suggestion it frees the model's memory, and reloads it in a couple of seconds when you type again (longhand.server.idleMinutes).
  • With Remote-SSH, WSL or Dev Containers, the model runs on your local machine's GPU, not on the remote host.

Settings

Setting Default
longhand.enabled true Turn suggestions on or off everywhere.
longhand.languages everything but prose Per-language switch, e.g. {"markdown": true}.
longhand.exclude secrets and keys Files that are never completed or read.
longhand.maxLines 24 Upper limit per suggestion.
longhand.server.backend auto vulkan, cuda, metal or cpu. CUDA is an extra 590 MB for about 10% more speed.
longhand.server.model auto q8_0 (more accurate) or q4_k_m (smaller and faster).
longhand.server.device auto Force a device such as Vulkan1; the log lists them.
longhand.server.idleMinutes 15 Minutes before the model is unloaded. 0 keeps it loaded.
longhand.server.mode managed external connects to a llama-server you run yourself.

Server settings apply to the whole machine and can't be changed by a workspace.

The status bar

Longhand keeps one small pen-nib icon in the status bar. A solid nib means suggestions are on. A hollow nib means they're off for this file or language, or snoozed, in which case the minutes left are shown next to it. Hover for details and quick actions, or click for the menu.

Commands

  • Longhand: Show Menu, also opened by clicking the nib
  • Longhand: Snooze for 30 Minutes and Resume Suggestions. While snoozed, Alt+\ still asks for a suggestion.
  • Longhand: Turn Suggestions On or Off, everywhere or for the current language
  • Longhand: Download Model
  • Longhand: Restart Model Server
  • Longhand: Show Log
  • Longhand: Remove Downloaded Files frees the disk space. Uninstalling the extension does not remove ~/.longhand on its own, so run this first if you want it gone.

Troubleshooting

  • No suggestions: hover the nib in the status bar; it says why, and turns amber when something needs fixing. Longhand: Show Log has the details.
  • Slow suggestions: hover the nib. If it says the model is running on the CPU, your GPU wasn't detected or didn't have 2 GB free. Set longhand.server.device if the wrong GPU was picked.
  • Download fails behind a proxy: try setting http.proxySupport to override along with http.proxy. If that doesn't help, download the files yourself: put a llama.cpp b12032 build anywhere and set longhand.server.binaryPath to its llama-server, then download a GGUF from the model page and set longhand.server.modelPath to it.

Licenses

The Longhand extension is closed source. The model is a fine-tune of LiquidAI/LFM3-1.7B-Base and is distributed under the LFM Open License v1.0: free for individuals and for companies with less than $10M in annual revenue, and not licensed for commercial use by companies above that. The license and notice are copied next to the model when it's downloaded. llama.cpp is MIT licensed. The extension includes THIRD_PARTY_NOTICES.md.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft