https://github.com/jstrieb/just.sh Skip to content Toggle navigation Sign in * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Learning Pathways + White papers, Ebooks, Webinars + Customer Stories + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} jstrieb / just.sh Public * Notifications * Fork 2 * Star 61 Compile Justfiles to portable shell scripts jstrieb.github.io/just.sh/ License GPL-3.0 license 61 stars 2 forks Activity Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Security * Insights Additional navigation options * Code * Issues * Pull requests * Actions * Security * Insights jstrieb/just.sh This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 2 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/j] Use Git or checkout with SVN using the web URL. [gh repo clone jstrie] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @jstrieb jstrieb Link to online version in README ... 338fcc0 Dec 25, 2023 Link to online version in README 338fcc0 Git stats * 74 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Run main tests separately from publishing December 22, 2023 10:32 docs Add web app to try just.sh without installing December 25, 2023 18:24 just_sh Add --help text to generated shell scripts December 24, 2023 11:51 test Add --help text to generated shell scripts December 24, 2023 11:51 .gitattributes Add web app to try just.sh without installing December 25, 2023 18:24 .gitignore Ignore Vim swap files December 20, 2023 15:11 Justfile Add comments to Justfile December 25, 2023 17:56 LICENSE Add LICENSE April 30, 2023 15:04 README.md Link to online version in README December 25, 2023 18:29 pyproject.toml Test on latest dependencies for Python 3.7 December 21, 2023 13:03 View code just.sh Install & Quick Start Project Status Known Issues & Incompatibilities Acknowledgments README.md just.sh just.sh transpiles Justfiles to portable, POSIX-compatible shell scripts. * Run Justfile recipes without installing just * Run just commands in constrained environments (such as CI pipelines and Docker containers) * Use a justfile as a starting point for a shell script just.sh is built as a drop-in replacement for just. It can parse any valid justfile, and generated scripts behave identically to just. In almost all cases, generated scripts even have byte-for-byte identical output to just. There are over 32,000 tests (covering every line of code!) that validate this compatibility for each commit. Install & Quick Start Try just.sh online without installing. Install just.sh locally with: python3 -m pip install just.sh Once installed, run just.sh to convert a Justfile to a shell script. Then, run the generated script ./just.sh as you would run just. $ ls justfile $ just --summary build lint test $ just.sh Compiling Justfile to shell script: `justfile` -> `just.sh` $ ls justfile just.sh $ ./just.sh --summary build lint test The pip installation script also installs the following aliases to the just.sh command-line tool: * just_sh * just-sh * pyjust Project Status I like tools that effectively achieve one well-defined goal, without growing indefinitely. My hope is for just.sh to be such a tool. In other words, just.sh is "complete" software. I will fix bugs and make changes to maintain compatibility with just, but there are no new features planned. As such, even if there are no recent commits, the project is not dead! Few commits means that everything has been running smoothly. just.sh is written in Python with only one dependency outside the Python standard library: parsy, which itself has no external dependencies. All of the code is spread across two fairly small files (plus one more for tests), and every line of code is covered by tests. Known Issues & Incompatibilities * Not all Just functions are implemented in shell + For example, many of the string manipulation functions such as trim_end_match, trim_start_match, titlecase, etc. remain to be implemented + Trying to compile a Justfile with an unimplemented function will raise an error * Some Just functions (sha256 in particular) cannot be made portable without depending on sha256sum or Python on the target system * Not all nested calls to just are detected. Calling just in the middle of a recipe may result in unexpected behavior * 100% Python line coverage guarantees that all Python code that generates shell scripts is exercised, but it does not guarantee that all generated lines of shell are exercised in tests * Just re-runs recipes if they are called again with a unique combination of arguments. just.sh approximates this behavior instead of replicating it, using simpler heuristics for whether a recipe has run before * Generated just.sh shell files may be hard to read, and are typically much larger than the Justfiles they replace * import, [confirm], and possibly some other recent features from Just versions greater than 1.14.0 may not yet be supported * The ./just.sh --dump command does not reformat Justfiles * The tests check colorless output of just.sh against just. They do not confirm that the colors and ANSI escape sequences are the same between the two Acknowledgments * Thanks to Logan Snow for testing early versions, consulting on design decisions, and being a great guy overall About Compile Justfiles to portable shell scripts jstrieb.github.io/just.sh/ Topics shell bash posix transpiler shell-script bash-script just posix-sh shell-scripting bash-scripting justfile Resources Readme License GPL-3.0 license Activity Stars 61 stars Watchers 3 watching Forks 2 forks Report repository Releases 2 tags Languages * Python 99.4% * Just 0.6% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact * Manage cookies * Do not share my personal information You can't perform that action at this time.