{"id":26805,"library":"bobe","title":"Bobe","description":"Bobe is a template runtime compiler that parses a custom indentation-based template syntax into an AST. Current stable version is 0.0.47. It is a niche, experimental tool for generating structured node trees from a compact DSL, with typed output. Unlike general-purpose template engines like Handlebars or EJS, Bobe focuses on a unique indentation-aware syntax with key-value attributes and nested children.","status":"active","version":"0.0.47","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/bobe-js/bobe","tags":["javascript","bobe","smooth","cat","typescript"],"install":[{"cmd":"npm install bobe","lang":"bash","label":"npm"},{"cmd":"yarn add bobe","lang":"bash","label":"yarn"},{"cmd":"pnpm add bobe","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Compiler is a named export, not default.","wrong":"import Bobe from 'bobe'","symbol":"Compiler","correct":"import { Compiler } from 'bobe'"},{"note":"ESM-only; CommonJS require may not work as expected.","wrong":"const compile = require('bobe').compile","symbol":"compile","correct":"import { compile } from 'bobe'"}],"quickstart":{"code":"import { Compiler } from 'bobe';\n\nconst template = `\nnode1 k1=1\n  node1_1 k2=2 k3=3\nnode2\n| p1=1\n| p2=2 p3=3\n  node2_1\n  | p4=4 p5=5 p6=6\n`;\n\nconst compiler = new Compiler(template);\nconst ast = compiler.program();\nconsole.log(JSON.stringify(ast, null, 2));","lang":"typescript","description":"Parses a sample template string into an AST using the Bobe compiler."},"warnings":[{"fix":"Use spaces for indentation consistently.","message":"The template syntax requires proper indentation with spaces; tabs may not be supported.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Wrap in try-catch or validate template before parsing.","message":"In v0.0.47, the Compiler constructor expects a string, but the program() method may throw if the template is malformed.","severity":"breaking","affected_versions":">=0.0.47"},{"fix":"Ensure that props on a separate line from the node name begin with '|'.","message":"The '|' pipe prefix is used for props on the same line as a node; forgetting the pipe causes props to be parsed incorrectly.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use a consistent number of spaces (e.g., 2 spaces per level) and avoid tabs.","cause":"Indentation is inconsistent or uses non-space characters.","error":"SyntaxError: Unexpected token at line 3: expected indent"},{"fix":"Use `import { Compiler } from 'bobe'`.","cause":"Import of Compiler is incorrect (e.g., default import instead of named).","error":"TypeError: compiler.program is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}