{"id":24878,"library":"0x-lang","title":"0x Lang","description":"0x (v0.1.29) is an experimental AI-first programming language and compiler that transpiles a concise DSL into full-stack production code for React, Vue 3, Svelte 5, Express, React Native, and Terraform. It significantly reduces boilerplate — a component written in 18 lines of 0x typically generates ~96 lines of TypeScript React. The compiler is distributed as a CLI tool via npm, supports watch mode and project scaffolding, and ships with TypeScript types. Active development, monthly releases. Differentiators: multi-target compilation from a single source, built-in DSL for UI, state, and backend logic, and LSP/IDE support.","status":"active","version":"0.1.29","language":"javascript","source_language":"en","source_url":"https://github.com/user/0x-lang","tags":["javascript","0x","compiler","ai","react","vue","svelte","react-native","express","typescript"],"install":[{"cmd":"npm install 0x-lang","lang":"bash","label":"npm"},{"cmd":"yarn add 0x-lang","lang":"bash","label":"yarn"},{"cmd":"pnpm add 0x-lang","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"compiler output targets TypeScript; types required for generated code","package":"typescript","optional":true}],"imports":[{"note":"The package is primarily a CLI tool. Install globally for '0x' command, or use npx 0x-lang for one-off runs.","wrong":"npm install 0x-lang (local install requires npx or global)","symbol":"0x CLI","correct":"npm install -g 0x-lang"},{"note":"Programmatic API is ESM-only starting v0.1.0; CJS require works only for default export.","wrong":"const { compile } = require('0x-lang')","symbol":"default export (programmatic use)","correct":"import compile from '0x-lang'"},{"note":"Use 'dev' subcommand for watch/recompile mode.","wrong":"0x watch counter.ai (no such command)","symbol":"build command (watch mode)","correct":"0x dev counter.ai --target react"}],"quickstart":{"code":"npm install -g 0x-lang\ncat > hello.ai << 'EOF'\npage Hello:\n  state name: str = \"World\"\n  layout col gap=16 padding=24 center:\n    text \"Hello, {name}!\" size=3xl bold\n    input name placeholder=\"Your name\"\nEOF\n0x build hello.ai --target react","lang":"typescript","description":"Installs the 0x-lang CLI globally, creates a minimal 0x source file with a stateful page component, and compiles it to a React component."},"warnings":[{"fix":"Upgrade to >=0.1.0 and use `0x build` (defaults to source files). For JSON output, pipe through a custom formatter.","message":"Version 0.1.0 changed output format from JSON to source files. Older versions' `0x build --format json` no longer works.","severity":"breaking","affected_versions":"<0.1.0"},{"fix":"Update Node.js to 18+ using nvm or your package manager.","message":"Requires Node.js >=18; fails silently on Node 16 with obscure errors.","severity":"breaking","affected_versions":"<18"},{"fix":"Replace `--format` with `--target` in CLI commands. Example: `0x build app.ai --target react`.","message":"The `--format` flag (`--format react`, `--format vue`) is deprecated as of v0.1.0. Use `--target react` instead.","severity":"deprecated","affected_versions":">=0.1.0,<0.2.0"},{"fix":"Ensure your project uses React 18+. If stuck on React 17, compile with `--target react-17`? No such option — fork or avoid.","message":"Generated React components use React 18's createRoot; not compatible with React 17 automatically.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0x':1,3,48,104 '18':45 '3':29 '5':31 '96':51 'activ':77 'ai':9,106 'ai-first':8 'backend':98 'boilerpl':40 'built':91 'built-in':90 'cli':62 'code':25 'compil':14,57,85,105 'compon':42 'concis':18 'develop':78 'differenti':81 'distribut':59 'dsl':19,93 'experiment':7 'express':32,113 'first':10 'full':22 'full-stack':21 'generat':50 'javascript':103 'lang':2 'languag':12 'line':46,52 'logic':99 'lsp/ide':101 'mode':68 'month':79 'multi':83 'multi-target':82 'nativ':34,112 'npm':65 'product':24 'program':11 'project':70 'react':27,33,55,107,111 'react-nat':110 'reduc':39 'releas':80 'scaffold':71 'ship':73 'signific':38 'singl':88 'sourc':89 'stack':23 'state':96 'support':66,102 'svelt':30,109 'target':84 'terraform':36 'tool':63 'transpil':16 'type':76 'typescript':54,75,114 'typic':49 'ui':95 'v0.1.29':4 'via':64 'vue':28,108 'watch':67 'written':43","created_at":"2026-05-01T13:41:51.132097+00:00","updated_at":"2026-05-01T13:41:51.132097+00:00","problems":[{"fix":"Run `npm install -g 0x-lang` or use `npx 0x-lang build ...`.","cause":"Package installed locally but not globally.","error":"Error: Cannot find module '0x-lang'"},{"fix":"Use `import compile from '0x-lang'` (ESM) or `const compile = require('0x-lang').default` (CJS).","cause":"Using require('0x-lang') which returns the default export as an object with compile property? Actually default export is a function. Wrong import style.","error":"TypeError: compile is not a function"},{"fix":"Upgrade to >=0.1.0 or use `--format` if on older version: `0x build app.ai --format react`.","cause":"Using older version <0.1.0 that used --format instead.","error":"error: unknown option `--target'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"0x","cli_version":null,"type":"library","homepage":"https://0x-lang.com","github":"https://github.com/user/0x-lang","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/0x-lang","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","devops","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}