{"id":24764762,"url":"https://github.com/mitchpaulus/neobem","last_synced_at":"2025-10-11T14:30:51.912Z","repository":{"id":43694180,"uuid":"303248151","full_name":"mitchpaulus/neobem","owner":"mitchpaulus","description":"Domain specific language for generating EnergyPlus idf files and DOE-2 BDL files.","archived":false,"fork":false,"pushed_at":"2025-03-31T20:28:33.000Z","size":1413,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-10T21:27:38.519Z","etag":null,"topics":["bdl","building-description-language","command-line","doe2","domain-specific-language","dsl","energy-modeling","energyplus","filter","neobem","shell","terminal"],"latest_commit_sha":null,"homepage":"https://mitchellt.com/neobem","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitchpaulus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-12T01:32:34.000Z","updated_at":"2025-06-02T03:55:44.000Z","dependencies_parsed_at":"2023-01-31T09:15:19.285Z","dependency_job_id":"66ec5afa-7d9e-477b-a8eb-4dc4c5e7f1e6","html_url":"https://github.com/mitchpaulus/neobem","commit_stats":{"total_commits":255,"total_committers":1,"mean_commits":255.0,"dds":0.0,"last_synced_commit":"b292f80fa056729559ee6a89f3a5863f66b81f92"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/mitchpaulus/neobem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchpaulus%2Fneobem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchpaulus%2Fneobem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchpaulus%2Fneobem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchpaulus%2Fneobem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitchpaulus","download_url":"https://codeload.github.com/mitchpaulus/neobem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitchpaulus%2Fneobem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007457,"owners_count":26084313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdl","building-description-language","command-line","doe2","domain-specific-language","dsl","energy-modeling","energyplus","filter","neobem","shell","terminal"],"created_at":"2025-01-28T22:34:23.423Z","updated_at":"2025-10-11T14:30:51.516Z","avatar_url":"https://github.com/mitchpaulus.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neobem\n\nNeobem is a preprocessor programming language primarily targeted for the\nidf input files for [EnergyPlus](https://energyplus.net). It also\nsupports the Building Description Language used for\n[DOE-2](https://www.doe2.com/).\n\nYou can download the entire user manual in PDF form\n[here](https://mitchellt.com/neobem.pdf) or view online at\n[neobem.io](https://mitchellt.com/neobem.html).\n\nQuick links:\n\n- [Introduction](#introduction)\n- [Getting Started](#getting-started)\n- [Support](#support)\n- [Contributing](#contributing)\n- [Building from Source](#building-from-source)\n\n# Introduction\n\nWhile creating your building energy simulation input files, have you\never wanted to:\n\n- Use variables?\n- Break out sections into custom templates?\n- Use arithmetic?\n- Build objects directly from Excel or JSON data?\n- Loop over lists?\n- Easily incorporate work from others?\n- Do all this without setting up a full Python, R, or Ruby working\n  environment?\n\nIf so, Neobem is what you have always wanted.\n\nAt its core, Neobem is a command line application that follows the Unix\nprinciple of doing one thing and doing it well. That thing is compiling\nan expressive programming syntax into building energy simulation input.\n\nIt is a [Unix filter\nprogram](https://en.wikipedia.org/wiki/Filter_(software)), taking input\nvia standard input or a file and writing the results to standard output.\nIt is designed to play one role in larger processing pipelines.\n\nI hope you find it as useful as I do.\n\n# Getting Started\n\n## Installation\n\n### Quick Instructions\n\n1.  Download program file from\n    [GitHub](https://github.com/mitchpaulus/neobem/releases).\n2.  Add directory location containing program file to `PATH` environment\n    variable or symlink the executable `nbem` to a location in `PATH`.\n3.  Execute `nbem` in shell or command interpreter.\n\nSee below for additional details on these steps.\n\n### Download Program\n\nThe latest release of Neobem is on GitHub, at\n\u003chttps://github.com/mitchpaulus/neobem/releases\u003e. There you will see\nzips containing a compiled executable for various operating systems and\nCPU architectures.\n\n1.  linux-arm64.zip\n2.  linux-arm.zip\n3.  linux-musl-x64.zip\n4.  linux-x64.zip\n5.  osx-x64.zip\n6.  win-arm64.zip\n7.  win-arm.zip\n8.  win-x64.zip\n9.  win-x86.zip\n\nDownload the zip file that matches your operating system and\narchitecture.[^1] For most people, this will be `win-x64`, `linux-x64`,\nor `osx-x64`.\n\nThe zip file will contain a single self contained executable. Extract\nthat file from the zip file to a location that you will want the program\nto live. It doesn’t really matter where you put it, but recommended\nplaces would be:\n\n- `C:\\Program Files\\neobem\\neobem.exe` on Windows\n- `/usr/local/bin/nbem` or `~/.local/bin/nbem` on Linux\n\nNeobem is a console or command line application. It is meant to be run\nfrom a shell environment, that could be anything like[^2]:\n\n- `cmd.exe` or PowerShell on Windows\n- `bash`, `zsh`, or `fish` running in any terminal emulator, such as:\n  - Windows Terminal\n  - Terminal.app\n  - iTerm2\n  - Gnome Terminal\n  - Alacritty\n  - Konsole\n  - Terminator\n\n### Add Program Location to PATH Variable\n\nOnce the program files are installed in your preferred location, you\nwill want to add the folder to the `PATH` environment variable (if the\nlocation you put it in isn’t already there). Another option is to\nsymlink the executable to a location that is already in the `PATH`\nvariable. Here’s a\n[link](https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/)\nfor creating symlinks in Windows, and another\n[link](https://www.howtogeek.com/287014/how-to-create-and-use-symbolic-links-aka-symlinks-on-linux/)\nfor creating symlinks in Linux.\n\n#### Windows\n\nOn Windows, you can get to the dialog box to change the `PATH` variable\nby doing a search for ‘Edit System Environment Variables’. There are\nseveral biog posts on the Internet that can guide you through this with\nscreenshots, here are a curated few:\n\n- \u003chttps://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/\u003e\n- \u003chttps://www.howtogeek.com/118594/how-to-edit-your-system-path-for-easy-command-line-access/\u003e\n\nHere’s a post on Superuser answering the question, [“What are PATH and\nother environment variables, and how can I set or use\nthem?”](https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them)\n\n#### Linux/OSX\n\nSetting the `PATH` variable is most often done in the initialization of\nthe particular shell that you are using. The default shell on many\nsystems is `bash`. To add a location to the `PATH` every time bash is\ninvoked, you follow the steps\n[here](https://unix.stackexchange.com/questions/26047/how-to-correctly-add-a-path-to-path).\nYou add the location to the existing `PATH` variable in the\n`.bash_profile` or `.bashrc` initialization file, making sure it is\nexported.\n\nIf you are using a different shell, you already likely know how to add\nlocations to the PATH, but for example the syntax for\n[fish](https://fishshell.com/) (the interactive shell I personally use),\nthe syntax looks like:\n\n``` fish\nset -gxp PATH \"/path/to/directory\"\n```\n\n## Creating Neobem Input Files\n\nThe input files are simple text files - you can use any editor of choice\nto create them. Here’s a list of popular text editors that you might\nwant to try. If you’ve never heard of a “text editor”, I’d begin with\nVisual Studio Code, Sublime Text, or Atom.\n\n**Cross-Platform:**\n\n1.  [Visual Studio Code](https://code.visualstudio.com/)\n2.  [Sublime Text](https://www.sublimetext.com/)\n3.  [Atom](https://atom.io/)\n4.  [Vim](https://www.vim.org/)\n5.  [Neovim](https://neovim.io/)\n6.  [Kate](https://kate-editor.org/)\n7.  [Emacs](https://www.gnu.org/software/emacs/)\n\n**Windows:**\n\n1.  [Notepad++](https://notepad-plus-plus.org/)\n2.  Notepad - yes, that Notepad built into Windows\n\n**Linux:**\n\n1.  [gEdit](https://wiki.gnome.org/Apps/Gedit)\n2.  [Nano](https://www.nano-editor.org/)\n\n## Execute the Program\n\nOn Windows, the program is called `nbem.exe`. On Linux and OSX, it is\njust `nbem` with no extension.\n\nFrom the shell, you can test that things are working by running the\ncommand with the help argument like:\n\n``` console\nmp@mp-computer:~$ nbem -h\n```\n\non Windows:\n\n``` console\nC:\\Users\\mpaulus\u003e nbem.exe -h\n```\n\nIf things are working correctly, you should see help text like:\n\n``` console\nmp@mp-computer:~$ nbem -h\nUSAGE: nbem [options..] [input file]\nCompile Neobem file to EnergyPlus or DOE-2 input files.\n\nWith no [input file], input is read from file named 'in.nbem' in the\ncurrent directory. If the input file is '-', input is read from standard\ninput rather than from a file.\n\nOPTIONS:\n\n    --doe2              Parse input file in DOE-2 Building Description Language format\n-h, --help              Show this help and exit\n-f, --fmt               Format file instead of compiling\n-o, --output \u003cfilename\u003e Output file name. Output is printed to standard output by default.\n    --tokens            Print lexed tokens for debugging\n    --tree              Print parse tree in Lisp format for debugging\n-v, --version           Print version number and exit\n```\n\nIn general, you will call the execute the program `nbem`, passing in\nyour Neobem input file as an argument.\n\nTo compile a Neobem file to an idf file, execute a command like\n\n``` console\nmp@mp-computer:~$ nbem in.nbem\n```\n\nwhere `in.nbem` is the relative path to the file you want to compile. In\nthe example above, this would be the `in.nbem` file in my home directory\n(‘`~`’). By default, the compiled output is printed to standard output,\nwhich you will see on the screen. To put the output into a file, either\nspecify the file path as a option, or redirect the output in the shell.\n\n**Using Option:**\n\n``` console\nmp@mp-computer:~$ nbem -o output.idf in.nbem\n```\n\n**Using Redirection:**\n\n``` console\nmp@mp-computer:~$ nbem in.nbem \u003e output.idf\n```\n\nPlease see this [screencast\nlink](https://asciinema.org/a/392845?size=big) that shows an example\nworkflow from start to finish. This particular workflow example used\n`bash` as the shell and the files were edited with Neovim.\n\n\u003cfigure\u003e\n\u003cimg src=\"img_neobem/demo.png\" style=\"width:80.0%\"\nalt=\"Sample screenshot from demo at: asciinema.org.\" /\u003e\n\u003cfigcaption aria-hidden=\"true\"\u003eSample screenshot from demo at: \u003ca\nhref=\"https://asciinema.org/a/392845?size=big\"\u003easciinema.org\u003c/a\u003e.\u003c/figcaption\u003e\n\u003c/figure\u003e\n\n# Support\n\nIf you believe you have come across a bug, please open a new GitHub\nissue. Please attempt to produce a [“minimum reproducible example\n(MRE)”](https://en.wikipedia.org/wiki/Minimal_reproducible_example) file\nthat reproduces the problem. If the code snippet is small enough,\ninclude directly in the issue, otherwise attach the associated file.\n\nYou can also attempt to get support on [Unmet\nHours](https://unmethours.com/questions/), a site similar in spirit to\n[Stack Overflow](https://stackoverflow.com/), but for building energy\nmodelers. Make sure to tag the question with `neobem` as I have an email\nalert set up for those questions.\n\n# Contributing\n\nFeedback and contributions are welcomed. Small contributions can made\ndirectly in Pull Requests. If you’d like to propose a more significant\nor more fundamental change, I ask that it first be discussed to prevent\nwasted effort. Please use the\n[“Discussions”](https://github.com/mitchpaulus/neobem/discussions)\nwithin the GitHub repository, likely in the “General” or “Ideas”\ncategory.\n\nIf the change adds functionality, corresponding unit tests would be\nexpected. Tests are located in the `test` project/directory.\n\nFor coding style conventions, you can follow the conventions laid out by\nMicrosoft\n([link](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions)).\n\n# Building from Source\n\nBuilding from source requires the following dependencies:\n\n1.  A .NET environment. Typically installed with [Visual\n    Studio](https://visualstudio.microsoft.com/),\n    [Rider](https://www.jetbrains.com/rider/), or directly through the\n    [SDK libraries](https://dotnet.microsoft.com/en-us/download).\n2.  [ANTLR](https://www.antlr.org/) and Java. I typically use the open\n    source version of Java at [jdk.java.net](https://jdk.java.net/).\n3.  Optional: A `redo`. This is a `make` alternative (see original\n    description from [Daniel J. Bernstein](https://cr.yp.to/redo.html)).\n    There are several existing implementations out there. I now use the\n    `redo` from [`zombiezen`](https://github.com/zombiezen/redo-rs) and\n    have used [`apenwarr`s redo](https://github.com/apenwarr/redo) in\n    the past. However, just to get things building, there is a minimal\n    `do` shell executable in the root of the repository.\n\nYou can then follow along with the steps in the GitHub workflow that\ntests building commits\n([`.github/workflows/dotnet.yml`](https://github.com/mitchpaulus/neobem/blob/main/.github/workflows/dotnet.yml)).\n\nThe minimum steps after .NET and Java installation are:\n\n``` sh\n# Get ANTLR (version 4.9.3 in this example)\ncurl --output antlr-4.9.3-complete.jar https://www.antlr.org/download/antlr-4.9.3-complete.jar\n# Compile ANTLR grammars - environment variables ANTLR_JAR and CLASSPATH required.\nexport ANTLR_JAR=\"$(pwd)\"/antlr-4.9.3-complete.jar\nexport CLASSPATH=.:\"$(pwd)/antlr-4.9.3-complete.jar\"\n./do src/antlr/compiled\n./do src/antlr/excelrange/compiled\n./do src/antlr/idf/compiled\n# Run redo targets\n./do src/Help.cs src/Version.cs test/TestFileDirectory.cs\n# Build\ndotnet build src\ndotnet build test\n```\n\n\u003c!-- vim:set ft=markdown: --\u003e\n\n[^1]: If you are running the Windows Subsystem for Linux within Windows,\n    I would recommend the Linux version, and installing like a Linux\n    program\n\n[^2]: If none of this makes sense, take a look at [this\n    link](https://www.unixsheikh.com/articles/the-terminal-the-console-and-the-shell-what-are-they.html)\n    or other web searches for ‘terminal vs. shell’\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchpaulus%2Fneobem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitchpaulus%2Fneobem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitchpaulus%2Fneobem/lists"}