HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
oils-for-unix
oils
Python2016–2025
oils-for-unix / oils

oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

35Distinct people
225Mentions
1Explicit recommenders
3.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

There are Usenix papers on bash and ksh -- I archived the ksh one here: http://www.oilshell.org/archive/ksh-usenix.pdf The surprising thing to me is that ksh was Lua-like in…

chubot used a recommendation phrase. 4 indexed comments match. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 3:59:04 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year225 dated mentions

Observed mentions: 2016-11-26 10:24:57 UTC to 2025-11-06 22:34:08 UTC.

02040602016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 13 mentions; 0 submissions, 13 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 27 mentions; 2 submissions, 25 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 52 mentions; 3 submissions, 49 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 41 mentions; 2 submissions, 39 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 27 mentions; 3 submissions, 24 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 16 mentions; 1 submissions, 15 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 17 mentions; 2 submissions, 15 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 20 mentions; 2 submissions, 18 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC303
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC13013
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC909
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC27225
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC52349
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC41239
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC27324
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC16115
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC17215
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC20218

What Hacker News says

41 sources
(author here) Yes thanks, that is exactly the point! As I point out at the end of the doc, coreutils ls actually started quoting the names in 2016. However the format is confusing for people who can't read 2 or 3 types of shell strings, and not that readable. In contrast, QSN is simply Rust string literal syntax, which are a cleaned up version of C string literal syntax. $ touch $'foo\nbar' 'dq"dq' "sq'sq" # create 3 files with newline, double quote, single quote # coreutils is correct, though I'm not sure people will understand $'\n' $ ls 'dq"dq' eggs 'foo'$'\n''bar' "sq'sq" Pipe through cat mangles the name: $ ls|cat dq"dq foo bar sq'sq In Oil, write --qsn will ALWAYS give you 5 lines if you have 5 names, no matter what they are $ oil -c 'write --qsn -- *' 'dq"dq' 'foo\nbar' #
Read the rest
more familiar encoding 'sq\'sq' Without --qsn it's like ls|cat: $ oil -c 'write -- *' dq"dq foo bar sq'sq I think it's important for something like QSN to be built into the shell, because quoting issues arise in many places, not just filenames and ls. Although this makes me think that we should have the inverse of `printf %q` to parse the output of coreutils ls. Oil does implement printf %q, but most people don't know about it. $ printf '%q\n' -- * dq\"dq $'foo\nbar' sq\'sq Again it is actually correct, but sort of a grab bag of formats derived from shell strings. QSN strings will be familiar to anyone using Python, Rust, etc. consistent with Oil's slogan: It's for Python and JavaScript users who avoid shell! ----- edit: Also reminds me that I wrote this page before designing QSN: https://github.com/oilshell/oil/wiki/Shell-Almost-Has-a-JSON... So printf %q and %b are inverses in bash, but this doesn't work in other shells. QSN can represent NUL bytes, which are illegal in filenames, but are useful elsewhere.
In You shouldn't parse the output of ls(1)
(author here) Thanks for nicely summarizing the project! I didn't know about fftw, but another nice analogy is TeX by Donald Knuth! TeX is actually written in WEB / a subset of Pascal (H-Pascal I think), and then translated to C. That is, it's NOT typically compiled with a Pascal compiler (I wonder if anyone even maintains those?). This came up a few times on Hacker News and I got some interesting details. I wrote yesterday that I want to hire a Compiler Engineer to help with the C++ translation: https://news.ycombinator.com/item?id=29605304 It's already half done, passing ~1100 of 1950 spec tests, so I believe it's very feasible. But it needs someone who can concentrate on it full time. I might as well post the draft of the "job listing" to get people thinking about this. I think the challenge is finding the right person rather than
Read the rest
funding it (I'm applying for funding now) https://github.com/oilshell/oil/wiki/Compiler-Engineer-Job (rough draft, you may see polished versions of this later) One sentence description: write an ~10K line translator for statically typed Python, and a ~5K line C++ runtime, and get a free shell out of it! (over 5 years of painstaking work on the semantics!) The input is ~36K lines of Python the output is ~100K lines of C++. This is a very doable project for an experienced compiler engineer. :) So if anyone knows a good candidate, send them my way at andy@oilshell.org. ---- Also, I (virtually) attended the panel where this paper originated: http://www.oilshell.org/blog/2021/06/hotos-shell-panel.html It was basically a call for researchers, hence lesser focus on existing and new implementations. I think it's good to publish future-facing ideas (almost all of which I've read), whereas Oil is a lot of engineering work!
In Unix Shell Programming: The Next 50 Years
So somehow this paper misses one of the greatest developments in this area, oil https://www.oilshell.org/ - which: 1. has a compatibility mode with sh and bash. it's the only new shell I know with a upgrade path from bash [0] 2. otherwise fixes tons of unix shell misfeatures and in particular fixes quoting hell [2] PS: one fun quirk of the oil implementation is that it's written in Python.. but actually in a DSL that generates statically typed C++ code, ditching the Python runtime altogether [3] [4] - when you do compile Oil, you just get a C++ tarball (somewhat like fftw, a FFT package written in OCaml but which generates C code; fftw developers write OCaml, but fftw users compile C) [0] https://www.oilshell.org/why.html [1] https://www.oilshell.org/blog/2020/01/simplest-explanation.h... [2] https://www.oilshell.org/release/latest/doc/id
Read the rest
ioms.html [3] https://www.oilshell.org/blog/2021/01/why-a-new-shell.html#w... [4] But actually I think there's still work to do to remove the CPython dependency at runtime, https://github.com/oilshell/oil/issues/636
In Unix Shell Programming: The Next 50 Years
If you're gonna be calling a lot of external programs and interacting with files a lot, non-shell scripting languages tend to feel pretty clunky. I know what you mean, though. Most shell languages don't feel like flexible, expressive programming languages in the way that they ought to and could. As you may know, there are some new shells/languages that are trying to bridge the gap in a way that still leaves the shell well-suited to interactive use. The Oil shell wiki has a great list of them (and Oil is one such shell itself, of course): https://github.com/oilshell/oil/wiki/Alternative-Shells
In The fish shell is amazing
The project has two sides: a lot of it is about running existing programs and improving the language (OSH), but there is also an upgrade path into a new language Oil: http://www.oilshell.org/release/latest/doc/oil-language-tour... The OSH part is mature, but the Oil part is less mature, which is why there is more written about OSH. (Yes it's a bit confusing that the whole project is called Oil, and it contains a part called the Oil language.) ---- I need to write a blog post about it, but basically ALL my Python programs are driven by shell scripts, and it saves a ton of code. The oilshell.org website (which is bigger than it seems) is written this way: http://www.oilshell.org/site.html All the tests and benchmarks are written this way, links here: https://www.oilshell.org/release/0.9.4/ There are a lot of examples in the benchmark/, tes
Read the rest
t/, build/, etc. dirs: https://github.com/oilshell/oil/tree/master/benchmarks Factoring into processes is an important design skill. It lets you write a lot less code and thus create more reliable and stable systems. It's basically policy vs. mechanism, or control plane vs. data plane. These are very important but seems to be out of fashion for some reason. So yeah I have been behind in writing about them, but there are some under #shell-the-good-parts https://www.oilshell.org/blog/tags.html?tag=shell-the-good-p...
In Oil 0.9.4 – User Feedback
Hm interesting, yup that is exactly the kind of program that might get "too big" for bash, and running it under Oil is a good idea. You can then incrementally upgrade to Oil -- no big bang rewrite required! Other huge shell programs here: https://github.com/oilshell/oil/wiki/The-Biggest-Shell-Progr... And yes Oil should be suitable for writing command line tools (although it needs a modern flag parser, not the ancient getopt builtin that shell has.) Often the right thing to do is to write a tiny bit of C to interface with the kernel, and then call that from shell. That is very useful for Linus container syscalls, and I can also see it being useful for low level networking. I would love to see a project in that direction :) I'm writing some posts now about project plans! Thanks for the support.
In A Tour of the Oil Language
I meant to write a blog post about implementing the Oil language, but this blurb gives a lot of info! https://www.oilshell.org/blog/2020/07/blog-roadmap.html#how-... The algebraic data types alone give a huge leg up, but there's more than that. The spec is the code! That's why it's written in an unusual style with a high level language: http://www.oilshell.org/blog/2019/06/17.html#why-is-it-writt... At the end of every release there are some links to key source files. At some point these could be nice HTML diagrams rather than raw source code, but the info is concisely encoded: https://www.oilshell.org/release/0.9.2/ (scroll down to "Source Code") Also, I don't expect much of this to be intelligible at first... It's a bunch of pointers to start. Anyone who wants to go down this path this will have to ask a lot of questions on Zulip, w
Read the rest
hich will motivate updates to the docs. ----- I will write a FAQ about OSH vs Oil, since that has come up several times, and it has evolved over time. There is only a single binary and single interpreter, but there are two entry points bin/osh and bin/oil, which basically correspond to the OSH and Oil languages. So the interpreter is parameterized by parsing and runtime options. They are all under this group: shopt --set oil:all # turn on everything as if you were running bin/oil That is what this Tour doc refers to -- a shared interpreter data model, and a shared process model. So we talk about them and document them as separate languages. But really it's a graceful upgrade of a single language. If you want you can even set individual options like shopt --set parse_paren. ----- The syntax const v = max(1, 2) is valid in both bin/osh and bin/oil, since nobody has complained the taking 'const' breaks anything. (We try to minimize new keywords -- e.g. 'pass' was removed from the language based on feedback). Whether you want to consider it OSH or Oil is up for debate :) The meanings of OSH and Oil have slightly changed as the project evolves, but OSH means roughly "compatible features" and Oil means "new, incompatible features". It's a spectrum. (I think I have written all of this in various places, but it does need to be put in a more central place on the site) ---- pyp looks interesting, I added it here under Awk-like DSLs: https://github.com/oilshell/oil/wiki/Internal-DSLs-for-Shell
In A Tour of the Oil Language
(author here) I don't think anything you wrote should be a surprise to regular readers of the blog. Many of my blog posts in the last year say "the scope of the project is too large" and similar stuff. http://www.oilshell.org/why.html#why-not-use-it It might be a surprise if you're only reading what shows up on news aggregators. But to be clear, I basically write about what I'm thinking, what progress has been made, etc. And I do "documentation-driven development", which is IMO the best way to design a consistent and coherent language. The main purpose is to get people to test out the shell, and attract developers who want to push in the same direction. I like this way of working, as I've gotten a lot of valuable feedback and contributions on both OSH and Oil. And I can use more. Oil is NOT a "product" which you can download and use.
Read the rest
(It doesn't even have a logo, partly for that reason.) Right now it's better for say people who have the desire and ability to make it through the quick start for contributing: https://github.com/oilshell/oil/wiki/Contributing (how to get a working bin/osh from git in 30 seconds on most Linux distros. You can then hack on it in pure Python and it will be fast) ---- The "summer blog backlog" has some project status updates that aren't out yet, but I'll give the tl;dr version here. There are roughly 5 equal sized parts of project, all large: 1. The compatible OSH language (mature, NOT buggy, but not fast yet) 2. The Oil language (this is 2 years old; there are bugs due to the way we reuse CPython) 3. The interactive shell (punting this to "headless shell") 4. Semi-automatic translation of the "executable spec" from Python to C++ 5. Documentation For context, last October I wrote a post saying that four features (that are DONE and polished) justify the OSH language and I can punt on the Oil language until the indefinite future. https://www.oilshell.org/blog/2020/10/osh-features.html So that was one way of cutting scope. But basically I changed my mind based on prior successes. So I worked on the Oil language a lot this year, and I'm pleased with how its coming together. (The summer blog backlog has sketches of new features. Big things left: the "missing declarative part" of shell for configuration/not-YAML; functions/coprocesses as opposed to shell-like procs) I made a big list of alternative shells, and none of them is what I want, or what I think the open source ecosystem needs: https://github.com/oilshell/oil/wiki/Alternative-Shells This is a very long argument and has to do with the "Perlis-Thompson Principle" and "narrow waists", which I'm about 25% through explaining on the blog. ----- So the other way of cutting scope is punting the interactive shell into another process, with Oil being a "headless shell": See these two comments for details: https://lobste.rs/s/xestey/opinionated_guide_xargs#c_cn4r2i https://lobste.rs/s/sdum3p/if_you_could_rewrite_anything_fro... (yes I need to make blog posts out of these) To clearly repeat what's in those posts: you won't get more than a basic interactive shell based on Oil unless someone else makes big effort. Join #shell-gui on Oil's Zulip, etc. ---- So the project is now focused on #1 #2 and #5: OSH and Oil and documentation. The translation to C++ passes about half the tests, but it has stalled. So I have to come up with some way of getting that done too, and it might involve soliciting donations to hire someone, some kind of two-sided market etc. But right now I'm just concentrating on the Oil language design and explaining it. So you might see many more compelling posts about things you won't be able to immediately use. That is on purpose! It all absolutely works -- download it now and try it -- but there is a gap to bridge to make it production quality, which involves documentation and translation to C++. (This post is from a year ago but may give some color on these issues: https://www.oilshell.org/blog/2020/08/risks.html) In addition to direct collaboration, I also encourage parallel efforts. Someone started porting Oil to Nim, and another person wanted to rewrite Oil only (not OSH) in Rust, etc. I encourage all those efforts. The project is long, but the "hard part" OSH is quite mature (you should test it), and the "exciting part" Oil is less than 2 years old. And five years ago people said it was impossible to evolve bash into a good language. Now people seem to be taking it for granted that it should exist :)
In A Tour of the Oil Language
Thinking this is so cool! I was wondering if seriously buying into an alternate shell like this would be worth it in the long run. Would really love to read from people who use(d) an alternative shell, both success and failure stories. I cannot shake from my head the idea that buying into a non-standard shell will only work for personal projects in one's own workstation, but it won't fly too far for company work because you'd then be introducing an implicit dependency on your special snowflake non-standard runtime. Which is something we came to accept and assume for interpreted languages (Python, Ruby, Node, etc.) but I'm not yet ready to assume for shell scripts. So right when I was going to test Nushell, I discover there are also other shells like Elvish [0] and Oil which supports structured data [1]. Now on top of my hesitations I'm ad
Read the rest
In GitHub – nushell/nushell: A new type of shell

Showing the 15 most recent of 41 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.