Skip to content

ClayWarren/vibe

Repository files navigation

Vibe Coding Language (VCL)

Pragmatic, English-forward DSL with a working compiler, VM, runtime, and package manager.

Structure

  • src/tokenizer – indentation-aware tokenizer
  • src/parser – AST generator
  • src/types – AST types
  • src/ir – lowering to intermediate representation
  • src/transpilers – TypeScript and Rust emitters
  • src/runtime – pluggable runtime adapters (in-memory defaults)
  • src/cli – CLI commands (compile, repl, run, install, publish, format, lint)
  • docs/ – deeper reference material (philosophy, runtime, stdlib, roadmap)

Quick start

nvm use 24   # >=20 works; tests run on 24
pnpm install
pnpm run build
# Compile to TypeScript (links stdlib)
node dist/cli/index.js compile examples/user_profile.vcl --target ts --with-stdlib
# Run via interpreter
node dist/cli/index.js run examples/webapp.vcl --event "http GET /api/health"
# Run via VM
node dist/cli/index.js run examples/webapp.vcl --event "http GET /api/health" --vm
# Format / lint / check
node dist/cli/index.js format examples/user_profile.vcl
node dist/cli/index.js lint examples/webapp.vcl
node dist/cli/index.js check examples/webapp.vcl

VS Code icon for .vcl

  • A local icon theme lives in .vscode/vcl-icon-theme; no marketplace download needed.
  • Install once from the repo root: code --install-extension .vscode/vcl-icon-theme.
  • The workspace sets workbench.iconTheme to vcl-icons-local, so the VCL icon will appear after install/reload. If it doesn’t, run ⌘⇧P → “File Icon Theme” → choose “VCL Icons Local”.

Web playground

cd web
pnpm install   # first time only
pnpm run dev   # opens VCL playground with live compile to TS/Rust

Spec highlights

  • Indent defines blocks, statements end with .
  • English-like control words (define, when, fetch, ensure, validate)
  • Implicit async for I/O verbs

Docs

Registry: set export VCL_REGISTRY=$HOME/.vcl-registry (default local path used by vcl install/publish). Install CLI via npm (after publish): npm i -g @claywarren/vcl.

Status

  • Tokenizer hardened (indentation, multiline strings, escapes, imports).
  • Parser + linker handle namespaced imports (foo::bar), scheduling, and module inlining.
  • Transpilers: runnable TypeScript/Rust emitters; WASM text stub; optional sourcemaps.
  • Runtime + VM: interpreter/VM parity, pluggable adapters; CLI run --vm.
  • Package manager: vcl install/publish with local registry support; formatter/linter; LSP-style completion stub.
  • REPL prints TS preview; demo server remains in scripts/demo-server.ts.

About

Vibe Coding Language (VCL)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published