{"id":41353,"library":"kalang","title":"KaLang","description":"KaLang is a programming language transpiled to JavaScript, designed to make game development fast and fun. It provides a custom syntax and a command-line transpiler. The current stable version is 0.0.24, released with active development. Key differentiators include a specialized focus on game development and a custom VSCode extension for editor support. It is not yet stable for production use and lacks extensive documentation or community adoption compared to established languages.","status":"active","version":"0.0.24","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","typescript"],"install":[{"cmd":"npm install kalang","lang":"bash","label":"npm"},{"cmd":"yarn add kalang","lang":"bash","label":"yarn"},{"cmd":"pnpm add kalang","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package is ESM-only; CommonJS require is not supported.","wrong":"const kalang = require('kalang')","symbol":"kalang","correct":"import { kalang } from 'kalang'"},{"note":"Named export for transpiling KaLang code.","wrong":"const transpile = require('kalang').transpile","symbol":"transpile","correct":"import { transpile } from 'kalang'"},{"note":"The correct export is 'run', not 'runProgram'.","wrong":"import { runProgram } from 'kalang'","symbol":"run","correct":"import { run } from 'kalang'"}],"quickstart":{"code":"import { run } from 'kalang';\nimport { readFileSync } from 'fs';\n\nconst code = readFileSync('program.ka', 'utf8');\nrun(code).then(() => console.log('Done'));\n\n// Or use the CLI:\n// npm i -g kalang\n// kalang run program.ka","lang":"typescript","description":"Shows how to programmatically run a KaLang file using the run function and also the CLI method."},"warnings":[{"fix":"Pin to exact version and test updates.","message":"Breaking changes in minor versions: API may change without notice.","severity":"breaking","affected_versions":">=0.0.1 <1.0.0"},{"fix":"Use 'transpile' instead of 'compile'.","message":"The 'compile' function is deprecated in favor of 'transpile'.","severity":"deprecated","affected_versions":">=0.0.20"},{"fix":"Use npx kalang or install globally with -g.","message":"KaLang CLI requires global installation; local install may not expose 'kalang' command.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Evaluate stability before using in production.","message":"The language is experimental; not suitable for production use.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Upgrade Node.js to version 14 or higher.","message":"Support for Node.js <14 has been dropped.","severity":"deprecated","affected_versions":">=0.0.22"}],"env_vars":null,"search_vec":"'0.0.24':34 'activ':37 'adopt':70 'command':26 'command-lin':25 'communiti':69 'compar':71 'current':30 'custom':21,50 'design':10 'develop':14,38,47 'differenti':40 'document':67 'editor':54 'establish':73 'extens':52,66 'fast':15 'focus':44 'fun':17 'game':13,46 'includ':41 'javascript':9,75 'kalang':1,2 'key':39 'lack':65 'languag':6,74 'line':27 'make':12 'product':62 'program':5 'provid':19 'releas':35 'special':43 'stabl':31,60 'support':55 'syntax':22 'transpil':7,28 'typescript':76 'use':63 'version':32 'vscode':51 'yet':59","created_at":"2026-06-04T18:51:59.908179+00:00","updated_at":"2026-06-04T18:51:59.908179+00:00","problems":[{"fix":"npm install kalang or use import instead of require.","cause":"Missing local installation or attempting to require CommonJS.","error":"Error: Cannot find module 'kalang'"},{"fix":"Use import syntax or set type: 'module' in package.json.","cause":"Using CommonJS require on an ESM-only package.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"npm install -g kalang or npx kalang.","cause":"CLI not globally installed.","error":"kalang: command not found"},{"fix":"import { run } from 'kalang' instead of import kalang from 'kalang'.","cause":"Incorrect import; using default instead of named export.","error":"TypeError: kalang.run is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"kalang","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devtools"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}