Official VS Code extension for the BashJS programming language — part of the BashLife ecosystem.
Features
- Syntax Highlighting — Full syntax highlighting for
.bjsfiles including keywords, strings, template literals, operators, and stdlib modules - Code Snippets — Productivity snippets for common BashJS patterns
- Language Configuration — Bracket matching, auto-closing pairs, and comment toggling
- File Icon — Dedicated icon for
.bjsfiles in the file explorer
Supported Syntax
- Variables (
let,const,var) - Functions (declaration, expression, arrow)
- Control flow (
if,else,while,for,for..of,for..in) - Modules (
import,export,from) - Template literals (with
${...}interpolation) - All BashJS operators and punctuation
- Standard library modules (
fs,path,json,math,time,args,net,core) - Built-in functions (
println,print,input,len,typeof) - Error handling (
try,catch,finally,throw)
Installation
From VSIX file
code --install-extension bashjs-language-1.0.0.vsix
Manual install
- Copy this folder to
~/.vscode/extensions/bashjs-language-1.0.0/ - Restart VS Code
Usage
Any file with the .bjs extension will automatically use BashJS syntax highlighting.
Snippets
| Prefix | Description |
|---|---|
fn |
Function declaration |
arrow |
Arrow function |
if |
If statement |
ifelse |
If-else statement |
for |
For loop |
forof |
For-of loop |
while |
While loop |
import |
Import statement |
importfs |
import fs from "fs" |
importnet |
import net from "net" |
importjson |
import json from "json" |
pl |
println() |
try |
Try-catch block |
main |
Main entry point template |
map |
Array .map() call |
filter |
Array .filter() call |
reduce |
Array .reduce() call |
Settings
| Setting | Default | Description |
|---|---|---|
bashjs.interpreterPath |
bashjs |
Path to the BashJS interpreter |
bashjs.formatOnSave |
false |
Auto-format on save |
bashjs.linting |
true |
Enable linting |
About BashJS
BashJS is a modern, lightweight interpreted programming language for the BashLife ecosystem. It features:
- JavaScript-inspired syntax
- Rust-powered interpreter
- Portable runtime (native + browser via WASM)
- Standard library:
fs,path,json,math,time,args,net,core
BashLife — https://bashlife.dev