Semantik
A new language with its own compiler and transpiler to other languages.
.smt files are Semantik sources. They are built into code in the language named in the file itself
or in the project file: Python, JavaScript, TypeScript, bash, PowerShell, Go, PHP, Ruby, Lua and
others.
#!Python
func checkAccess(ip, role) {
if (ip !start.with === "192.168") {
return "This IP format is not accepted"
}
role = ["IT", "Manager", "Owner"]
return "Granted"
}
Press Ctrl+Alt+S — a ready .py file appears next to the source.
Two modes
|
Shortcut |
What you get |
| Compile |
Ctrl+Alt+S |
Working code. The compiler chooses the form: its own names, the target language's own tools, edge cases handled |
| Transpile |
Ctrl+Alt+Shift+S |
Code that mirrors the source: same order, same names, nothing beyond what is written |
What never changes, in either mode
- rules and values are carried over literally: lists, bounds, addresses, names;
- message texts stay word for word;
- the order of checks, and the moment the program asks for a value;
- what is not in the source does not appear in the built code.
Before the file is written, the result is checked against the source mechanically. If something is
missing, the compiler says so and offers to build again.
Features
- Whole project.
.smt files see each other's declarations and call them by name. The command
"Semantik: собрать весь проект" works out the build order itself and rebuilds only what changed.
- Repeatability. Editing one line of the source changes one line of code, not the whole file.
- Reverse pass.
Ctrl+Alt+B opens an existing file of another language as .smt, annotated line
by line; your edits are assembled back with a diff shown before writing.
- "Where is this in my source?" — takes an error message and opens the place in the source the
failing code came from.
- Checked before writing. Built code goes through the target language's parser and a separate
review; only what passes both is written to disk.
Before you install
🔴 You need your own API key. Requests are made with your key and cost your money. Enter it with
the command "Semantik: ввести ключ"; it is kept in the editor's secret storage.
🔴 Your sources are sent over the network. Values of passwords and tokens are stripped before
sending, and secret files (.env, keys) are never sent — but the code itself is visible to the
service. If that is unacceptable, this tool is not for you.
⚠️ On someone else's machine: Ctrl+Alt+Shift+K erases the key, the log, the memory of your projects
and the clipboard.
Settings
semantik.deepModel, semantik.deepApiUrl — which model answers and at what address;
semantik.effort — how long the model thinks before answering (not supported by every model);
- the project language is set once in
semantik.json; a #!py line in a single file overrides it.
Requirements
VS Code 1.94 or newer. Checking the built code needs the parsers of your target languages: python,
bash, php, ruby, go, lua. If a parser is missing, Semantik says plainly that it had nothing
to check with.
Note. The interface, messages and command titles are in Russian — the tool is written for its
author first. English is planned once the language itself settles.