Native executable
Includes shrt.exe, a PowerShell installer, the MIT license, and a compact command reference. No WSL required.
The transpiler · the editor tools · the whole thing
Put a small language in front of a very large compiler.
The CLI only transpiles SHRT into C++. Keep using the C++20 compiler and build system you already trust.
Includes shrt.exe, a PowerShell installer, the MIT license, and a compact command reference. No WSL required.
Includes the portable shrt binary and an installer targeting ~/.local/bin by default.
The lexer, rewriter, CLI, language specification, and examples. Use this for another architecture or to inspect every transformation.
Install only the editor tools you want. Syntax support, compilation commands, and in-place conversion remain separate extensions.
47b1e7d719e89bdd03c38b9cd9828bc46d6412fc17b2683947c20d538b69a10 shrt-0.1.2-linux-x64.tar.gz be841f870c03a194f47cf3d7dd84a2a91ccc398afddd66e4ec3b259e5f2b4d71 shrt-0.1.2-source.zip 2fa45821754ea0ec005a7f78085832024a384fb3ed0a0830d0fa6b4368bf7b2e shrt-0.1.2-windows-x64.zip 07f8be474ff13e6036df1dc510f891eddcc8b4571ad44b34b3fd849ceecbdfcf shrt-build-run-0.5.1.vsix 4bcfc34d464d451e850b78860f67d0bd7a5c5fb7aa89faa2495cb3f128d36ca1 shrt-convert-1.0.0.vsix 8206ab2499b448f880f47360ab2695a166a494031211f48909127274cdf66d47 shrt-tools-visual-studio-1.1.1.vsix 07aa4eda79994e53bf22bc81fe87ef7fcac6b3107c3aafcf887fd9770fe6e7c1 shrt-syntax-0.3.1.vsix
The recommended installers download the signed-off release archive, place one binary in a user-local folder, and add it to PATH. No administrator account, package manager, WSL, or project changes.
Install latest Windows x64 release
irm https://antonveselskyi.com/shrt/install.ps1 | iex
where.exe shrt shrt --version
Download the Windows ZIP, extract it, and run its bundled installer:
Expand-Archive .\shrt-0.1.2-windows-x64.zip .\shrt powershell -ExecutionPolicy Bypass -File .\shrt\shrt-0.1.2-windows-x64\install.ps1
Inspect the quick-install script before running it.
Install latest Linux x64 release
curl -fsSL https://antonveselskyi.com/shrt/install.sh | sh
command -v shrt shrt --version
Download the tarball, extract it, and run its bundled installer:
tar -xzf shrt-0.1.2-linux-x64.tar.gz cd shrt-0.1.2-linux-x64 ./install.sh
If needed, add ~/.local/bin to your shell PATH. You can also inspect the quick-install script.
%LOCALAPPDATA%\Programs\shrt\bin~/.local/bing++.Custom location: set SHRT_INSTALL_DIR before the Windows quick installer or SHRT_PREFIX before the Linux quick installer. The downloadable archives also work fully offline after download.
SHRT owns the front end. Your normal compiler remains the back end. Pass -g so diagnostics map to the original SHRT lines.
Save this as hello.shrt. Any valid C++ also remains valid SHRT, so existing libraries and build knowledge carry over.
i iostream int main() { a who = $string("world"); p $"hello, {who}!"; r 0; }
shrt hello.shrt -g -o hello.shrt.cpp g++ -std=c++20 hello.shrt.cpp -o hello ./hello
Use clang++ in place of g++ if that is your compiler.
shrt hello.shrt -g -o hello.shrt.cpp cl /std:c++20 /EHsc hello.shrt.cpp /Fe:hello.exe .\hello.exe
Run from a Developer PowerShell or Developer Command Prompt so cl and the C++ headers are available.
Syntax, build/run, and in-place conversion remain separate tools. Every command-line integration resolves shrt from PATH—there is no project-folder discovery.
Registers .shrt, highlights SHRT sugar, and falls back to VS Code's C++ TextMate grammar for ordinary C++.
Resolves shrt and g++ from PATH, transpiles the active file, and compiles it. It runs an existing current binary without rebuilding.
g++ first; both commands must be on PATH..shrt file and use the shortcuts below.Select any SHRT text and convert it directly to C++. With no selection, the command finds the function containing the caret—including concise => functions.
shrt --version in a new terminal.Built-in, theme-aware SHRT and C++ highlighting for every .shrt file—no grammar copy required. Open ordinary C++ through an editable SHRT Lens; saving patches only changed, reversible regions into the backing C++ as one Undo step.
VS Code CLI alternative: code --install-extension .\package.vsix --force. After installing SHRT or changing PATH, fully restart the editor before testing a command. SHRT Tools supports VS 2022 Community, Professional, and Enterprise on x64 Windows. Lens mode rejects generated-code features such as defer so the C++ view always round-trips safely.
The editor tools intentionally use the same commands as a terminal. If those commands work in a newly opened terminal, the extensions work after the editor is restarted.
Open a completely new terminal and run shrt --version. If it works there, fully exit and reopen VS Code or Visual Studio. Reloading only the file is not enough.
The build extension deliberately requires g++ on PATH. Syntax highlighting and both converters do not require a compiler.
Place the caret anywhere inside a braced function or a concise => function. Inside nested loops and conditionals, the converter walks outward to the enclosing function.
Conversion is an editor edit, so ordinary Undo restores the SHRT source. Missing includes and the defer helper are inserted once at the top of the document.
The source package needs CMake 3.16+ and a C++20 compiler. It contains no third-party runtime dependencies.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build --config Release
The executable is build/shrt on single-config Linux generators and commonly build/Release/shrt.exe with Visual Studio generators. See the bundled README and spec.md for CLI and language details.