Editor

VS Code / Cursor

Highlighting, snippets, and a Run command for .sapi files. Lives in the snapapi-language folder. Older .snaptest files still highlight.

It isn’t on the VS Code Marketplace. Copy the folder from the repo, or build a VSIX. There’s nothing to search for in Extensions.

What you get

Install from this repo

Clone deekshith-poojary98/snapapi, then copy the language pack into your editor:

cp -R snapapi-language ~/.vscode/extensions/deekshithpoojary.snapapi-language-0.1.0

Restart the editor. Cursor uses ~/.cursor/extensions/ instead. Open a .sapi file and highlighting should kick in.

VSIX

cd snapapi-language
npx @vscode/vsce package
code --install-extension snapapi-language-0.1.0.vsix

Install the CLI separately (pip install pysnapapi, or pip install -e . from the repo). GUI editors often drop the venv from PATH — set snapapi.cliPath or keep a .venv in the workspace.

Contributor debug

  1. Open the snapapi-language folder in VS Code or Cursor.
  2. Press F5 to launch an Extension Development Host.
  3. Open a .sapi file.

If the workspace is the SnapAPI repo root, set the launch argument to --extensionDevelopmentPath=${workspaceFolder}/snapapi-language.

Settings

SettingDefaultMeaning
snapapi.cliPathsnapapiCLI executable. ${workspaceFolder} is expanded. Default snapapi also looks in .venv/bin (GUI editors often omit the venv from PATH).
snapapi.envFileemptyOptional --env file for interpolation.
snapapi.profileemptyOptional --profile name.
{
  "snapapi.cliPath": "${workspaceFolder}/.venv/bin/snapapi",
  "snapapi.envFile": "${workspaceFolder}/.env"
}

Run current file

With a .sapi file focused, SnapAPI: Run current file saves it and runs snapapi <file>. Env next to the suite loads automatically unless you set snapapi.envFile. Run test at cursor uses the nearest TEST: and passes --name. Output goes to the SnapAPI channel; the status bar shows the last result.

The playground doesn’t use the extension. Learn the language there; use the CLI (or these commands) for real HTTP.