PolyKode
AI coding assistant for SAS, R, and Python analysis workflows, built into a VS Code sidebar. PolyKode pairs a chat-based agent (with file read/write/edit and script-execution tools) with two quick actions purpose-built for analysts: generating exploratory data analysis (EDA) scripts and migrating code across SAS, R, and Python.
Features
- Chat sidebar — an agent loop with tool use (read/write/edit files, list files, run scripts, read the active editor) for working through analysis and migration tasks conversationally.
- Generate Analysis Scripts — point PolyKode at a dataset and it writes EDA scripts (R or Python) into a workspace output folder, with a
README.md/AUDIT.md summary of what was produced.
- Run Migration — translate SAS, R, or Python source files to another of the three languages, preserving logic rather than doing a line-by-line rewrite.
- Parity reports — every migration run produces a report comparing the original and translated output (row/column coverage, schema, and value-level differences), so you can see exactly what changed before you trust a translation.
- Inline script execution — click ▶ Run on a generated or translated file to execute it and see its output (charts, CSVs, logs) without leaving VS Code.
- Bring your own model — talks to any OpenAI-compatible chat-completions endpoint (e.g. a local vLLM/LiteLLM proxy, or a hosted provider). No model is bundled and no data leaves your configured endpoint.
Requirements
- VS Code 1.85 or later.
- An OpenAI-compatible chat-completions endpoint. PolyKode defaults to
http://localhost:8000; point it at your own deployment from the sidebar's Model Config tab or via the polykodeAssistant.* settings.
- To execute translated/generated code: R and/or Python installed locally (SAS execution is optional — see below).
Getting started
- Install the extension and open the PolyKode Assistant icon in the Activity Bar.
- In the Model Config tab, set your endpoint (and API key, if required). PolyKode auto-discovers the model from the endpoint's
GET /v1/models.
- Open a workspace folder containing your SAS/R/Python source, then use PolyKode: Run Migration or PolyKode: Generate Analysis Scripts from the Command Palette, or chat with the assistant directly in the sidebar.
SAS execution
Running .sas files (via the ▶ Run button or the chat agent's tools) needs a SAS engine. PolyKode auto-detects, in order: the official SAS extension for VS Code, a local SAS 9.4 install, Altair SLC, sasc (an open-source SAS-language compiler/VM, currently early-stage), or SAS Viya. If none is available, .sas files are still generated and translated — they just aren't run automatically. See the polykodeAssistant.sasBackend setting to pin a specific engine.
Privacy
PolyKode sends file/code content only to the model endpoint you configure. No telemetry, and no data is sent to PolyKode or ProCogia servers.
License
MIT — see LICENSE.
| |