{"id":26097,"library":"powscript","title":"Powscript","description":"Powscript is a bash dialect transpiler written in bash that provides a CoffeeScript-inspired, indentation-based syntax for shell scripting. It compiles to bash (version 4+) or experimental POSIX sh, reducing semantic noise from traditional shell syntax. Features include automatic quoting, safety checks (halt on error, require_cmd/require_env), functional programming constructs, JSON support, module system, and easy async. The current stable version is 0.9 (based on old compiler), with a new compiler in development (beta available). It is self-installing with no external dependencies (bash-only) and targets embedded systems or any environment where bash is available. Key differentiator: no need for gcc or node – pure bash, but not actively maintained.","status":"deprecated","version":"1.1.2","language":"javascript","source_language":"en","source_url":"https://coderofsalvation@github.com/coderofsalvation/powscript","tags":["javascript","bash","shell","coffeescript","functional","transpiler","sh","unix"],"install":[{"cmd":"npm install powscript","lang":"bash","label":"npm"},{"cmd":"yarn add powscript","lang":"bash","label":"yarn"},{"cmd":"pnpm add powscript","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Powscript is a shell script, not a JavaScript package. Download and execute directly.","wrong":"npm install powscript","symbol":"powscript","correct":"./powscript myscript.pow"},{"note":"Use -c for compile to bash, --sh for POSIX sh output.","wrong":"./powscript -o output bash myscript.pow","symbol":"compile","correct":"./powscript -c myscript.pow > myscript.bash"},{"note":"Run .pow files directly with powscript interpreter.","wrong":"bash myscript.pow","symbol":"run","correct":"./powscript myscript.pow"}],"quickstart":{"code":"wget \"https://raw.githubusercontent.com/coderofsalvation/powscript/master/powscript\" -O /usr/local/bin/powscript && chmod 755 /usr/local/bin/powscript\n# Create a test.pow file:\ncat > test.pow << 'EOF'\n#!/usr/bin/env powscript\nrequire_cmd 'echo'\nrequire_env 'HOME'\n\nrun(@args -- foo)\n  if empty? foo\n    echo \"error: please pass --foo <string>\"\n    exit 1\n  echo $args[@] \"$foo universe!!\"\n  echo \"HOME=$HOME\"\n\nrun $@\nEOF\n# Run it:\npowscript test.pow hello --foo powful\n# Or compile to bash:\npowscript -c test.pow > test.bash","lang":"bash","description":"Install powscript, create a simple script with argument handling, run it directly, and compile to bash."},"warnings":[{"fix":"Upgrade bash to version 4 or later, or use a different shell.","message":"Powscript requires bash >= 4.x. Running on older bash versions will cause errors.","severity":"gotcha","affected_versions":"<0.0"},{"fix":"Check the beta compiler repository for migration notes.","message":"The new compiler (beta) is not backward compatible; scripts written for the old compiler may not work.","severity":"breaking","affected_versions":">=0.9"},{"fix":"Consider alternatives like shellcheck, bashate, or writing bash directly if future support is needed.","message":"Project is in maintenance mode with no active development. The README points to a beta version by another author.","severity":"deprecated","affected_versions":">=1.1.2"},{"fix":"Manually verify output with checkbashisms or stick to bash output.","message":"POSIX sh output (--sh flag) is experimental and may contain bashisms if the powscript uses bash-specific features.","severity":"gotcha","affected_versions":">=0.9"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Download and make executable: wget -O /usr/local/bin/powscript https://raw.githubusercontent.com/coderofsalvation/powscript/master/powscript && chmod +x /usr/local/bin/powscript","cause":"Powscript not installed in PATH or not executable.","error":"bash: powscript: command not found"},{"fix":"Re-download the raw script from GitHub using wget or curl.","cause":"The powscript file was not downloaded correctly (e.g., missing shebang).","error":"./powscript: line 1: syntax error near unexpected token `newline'"},{"fix":"Install the missing command (e.g., via apt-get, yum) or remove the require_cmd line.","cause":"The required command is not installed on the system.","error":"require_cmd: echo: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}