It’s a clever exercise in over-engineering that replaces the concise efficiency of traditional shells with unnecessary syntactic overhead. This is a solution for people who would rather write a script than simply get the job done.
深掘り
前提条件
- データがありません。
次のステップ
- データがありません。
深掘り
Lunacmd: What If Your Shell Was Written Around Lua?追加:
If you use the command line tool today, you're probably using one of two maybe three different environments. If you're using Mac OS or Linux, you're using a shell environment that comes from the kind of Unix heritage and you type in shell commands and the shell programming. If you're using Windows, you're probably using PowerShell.
Though, of course, the third way is you could default back to the command prompt, which kind of has its heritage from the DOSs days. Now, of course, in the history of computer, there have been many different types of command line interfaces. Another couple, for example, you may have heard of on vax VMS. There was a very powerful command line and a very powerful set of commands, uh, but very different to Linux or Unix or even DOSs and then use even things like CPM.
So, the command line has been a major part of computing for a long time.
However, we've kind of just got ourselves stuck really in this shell command. uh and maybe PowerShell and that's where we're at. So I was doing some thinking. What happens if we try to think of a new way of writing a shell?
What happens if we write a shell that is actually first a lure command line that you can type in lure programs and secondly it's a shell written in fact on top of all of that lure power that you have. So I've been playing around with it. I've kind of coded together sometimes with a bit of help of AI to help with the speed of the programming.
It's called Luna Command. Uh Lure of course means Luna in some European languages. So Luna Command. Uh and it's Lure First. So I think you'll find it interesting. So uh let's have a dive in.
Okay. So let's get into this. Luna Command, a Lure first command line for Linux. So what is Luna Command? Well, it's a Lure first environment. a command line environment that puts Lure at the center of the experience. It's comfortable for terminal veterans, but it's different enough not just to be another clone of the normal command line shell. It's an interactive shell, but it's fully Lure programmable with a full Lure runtime builtin. And while most shells put the shell first, Lure command puts the language first. So keep lure valid by default and then add shell convenience where it helps. So what's the pitch here? Well, really the idea is you get lure up front and center, but you also get shellike commands to make it familiar and easy to use for shell users. And then there are some interesting side effects of what happens when you put LER first, inclusive, for example, native pipelines, which we'll talk about uh in a minute. So if you were in Lure and you kind of just run pwd lscd and so on, they would just work. So let me give you a quick demo of that. Okay. So here I am at the Luna command prompt and as I said you can type in things like pwd print working directory. There you go. Homegar. I can do ls of slash etc. And it lists out all the files. I can do an ls minus la etc. And it looks exactly like a normal ls output. Of course, I can do cd /temp cd/home/garry.
All the normal things. I can do uh echo hello and I get hello out. I can do the date command uh plus percent y- percent m dash percent d and there's the date in a year, month, day order. So, exactly what you're familiar with at the command line. So the point is all those uh commands like ls and cd are actually builtin commands written themselves in lure and this is the point if you when you do cd ls rm so on they're actually lure scripts that run and there are two commands that can help you which and type which will tell you whether you're using a built-in lure command or a command that's available uh in the main system. So just let me show you that. So if I do a type which ls it shows me actually it's not running ls from the normal place it's actually running this lure script called ls and it's in this built-in directory and if I type type ls it says it's a core builtin found uh in that directory and if I do an ls of that directory then here I can see all those different lure commands and we can have a look at one of them if you want to uh let's have a look at mkdir so it's a lure command that uh understands the system and it can create directories basically. Now builtins are native lure commands written in lure uh and you can actually add your own ones into llure command/builtin. You can build your own scripts into this and put them in your own private directory. And if you want to execute something outside of the lure command, so a command that's part of the OS, then you need to use this word exec execute for a native. So you can do exec ls and that won't call the lure built-in one. That will call the uh one for Linux itself for the normal command shell. Now because it's lure first, we can type all these things here at the command line and they will work. So just let me show you that in action. A is equal to 1.
Print A one. I can even, you know, do more complicated things like for example an if statement and then it prints out.
Okay. But of course things like less than and greater than are actually normal lure uh kind of syntax but then that affects the shell syntax of like you know greater than being kind of redirection. So in lure command there are slightly different uh native operators for pipes and for streams and so on. Basically they start with a colon. So basically colon greater than will redirect standard output and overwrite whatever the source is. Colon double greater than sign will be redirect standard output and append to it and so on. So it's very similar to what you get on normal shell but you start with that colon in front of it so that you can distinguish between uh lure things like greater than less than and these special redirection and pipe operators. So here's an example. If I do echo hello then in shell you would just do greater than /temp/out.ext. Here you do colon greater than. Let's run those commands. So let's look at those native operators. Uh echo hello. And now I can't do just greater than. So I do colon greater than slashtemp slashout.txt.
And that now gets redirected to there.
In fact, I can redirect it back again.
Uh slashtemp slashout. This is kind of the same way as doing more. And there you can see it says hello. I can do echo one two three and then pipe that with the colon word count minus w tells me there are three and so on. So you can do that all those redirections and pipeline stuff but using the special syntax. Now if you want to you can force it just to use the kind of the classical shell pausing. You just start your command with colon exclamation mark. And then here you notice it's got the greater than sign. So it said I know this is not going to be lure. So you can actually get it to just kind of treat it as uh the old way the old shell way of doing things. And it will do that colon exclamation mark and then hello e uh echo hello to /temp/out.txt and and that works. And then we can uh we can echo that, you know, we can do that back again. We can read that back again. Uh cat uh from /temp/out.ext.
And there it's got hello in it. So you can do those uh just like you would in a shell command, but you just have to put the colon exclamation mark in front.
Now, as I said, you can load your own scripts into lure command/builtin. Now, I've got one uh called password generator passgen that's in that directory. Okay? And we can look at that and you can run it. Now, if we look in uh twiddle uh Luna command builtin these are my personal Luna scripts. You can see there are two in here. And so password generator, okay, minus minus count 3 is a simple password generator that generates random strings with big letters and little littles and and numbers and all that stuff uh as a password generator, but that's running from my own kind of personal repository of uh built-in commands. There are lots of different features of Luna Command.
For example, there are aliases. You can do alias LL uh and that will just do an ls minus L and then you can just type ll. You can customize the prompt and the prompt actually can be set from a function. So that's an interesting one.
And if you want to set things kind of at bootup, you've got this uh file lunar command.lure, which is a a lure script.
And you can kind of customize anything you want in lure inside that uh script there, that startup script. And so we can define an alias. Ll is the same as ls minus l. So now we can do ll etc. And it's the same as if I typed in ls minus l slash etc. So there you go. And also you can define the prompt. So I could do prompt is equal to uh dollar dollar.
Let's uh say that. And there you go. It changes it to dollar dollar. Or in fact I can define a function. So here's a nifty little function that's very useful for uh giving you like the current directory uh when you do things. So there we go. There's the there it is. uh is a function returns the current working directory or dot and then the little uh chevron sign. So there we go.
So if I cd into slashtemp there you go slashtemp. If I go back to slhome/garry it goes back like that. Now another interesting function that's part of lure command is these kind of two special uh targets uh at mem and at file which means if you wanted to redirect something temporarily you don't have to say redirect to /temp slash and then give it a file name you can just say I've got these two places one is mem one is file mem is a limited size because it is in memory file is unlimited effectively because it picks a temporary file for you so you can start redirecting things to and from a memory buffer or to or from a file buffer that are built in. So let's just go through these commands here. Now the special buffers. So if I do hello echo hello colon redirect and I send it to colon atme.
Okay, that's now sent it into a memory buffer. Hasn't sent it to uh a file that I have to keep track and I can read it back from there. So I'm doing a redirection from where? From the memory buffer. And there you get hello. And there's a Luna buffer command. Okay, that will show me that there are two buffers. They are actually stored in files because that's everything's a file in Unix. But this one's got six characters. H E L O and then the line feed at the end out of 16K possible. And of course, the file can grow as far as big as a file can grow on your on your file system. So, these are two handy little things that you can just redirect quickly to somewhere, knowing it's going to be there, and you can cut and paste it later and use it later, redirect it later, pipe it later, whatever. So, that's a little feature. Now, there's lots more to talk about that I'm haven't got time to cover in this intro video.
There's history, there's preview mode, there's a TUI, there's JSON tools.
Because you're doing lure, there are lure tables and they can be sent around as part of piping. You can use back tick to evaluate lure expressions. Of course, their job control. You can put things in the background and all that kind of stuff. And that's all built into lure command from day one. Uh if there's interest, we can kind of do a an advanced lure command video. We can cover some more of these things. So, what's the project status? Well, this is very much a concept and an alpha release. Uh if people like it, then it will definitely be developed further. Uh please give it a try. See what works.
See what doesn't work. see what's hard, what you like, what you don't like, and let's let's talk about let's build it together and see what we can do. So, where do you find it? You can find it in my GitHub uh repo. Uh there's also lots of documentation there, and we that's a good place where we can, you know, collaborate uh and we can open up issues. We can have uh you know, the PRs in there and we can build it out from there. So, in summary, lure command is what happens when you stop treating the shell language as the only language that belongs on the prompt. I'm saying let's put lure on the prompt. It's not a drop-in replacement for for bash. It's not trying to evaluate the perfect posic shell behavior, but it's also not trying to hide its uh model to preserve some kind of compatibility illusion. It is saying this is lure first, but I'm making some things convenient so that it's not completely alien. So, it's a different command line environment optimized around Lure semantics first.
Okay, so there it is. Luna Command. Love to know your thoughts. Do go and try out at the GitHub repository. Let me know in the comments what you think. Okay, that's it. I'll see you in the next one.
関連おすすめ
Agentforce NOW AMA: Build with React and Salesforce Multi-Framework
SalesforceDevs
490 views•2026-05-28
How agent o11y differs from traditional o11y — Phil Hetzel, Braintrust
aiDotEngineer
450 views•2026-05-28
Re: 🗣️📍theprophedu📍2026 GST 103 CLASS (E-EXAM REVISION)
theprophedu
636 views•2026-06-04
WEB TECHNOLOGIES UNIT-2 | Degree 4th sem BCOM Computers web technologies unit-2 full explanation💯✅
LearnwithSahera
1K views•2026-05-29
More tests are always better? How to use AI to identify tests that bring little value
Alliance4Qualification
335 views•2026-05-29
Search Algorithms Explained in 60 Seconds! 🤖💨
samarthtuliofficial
218 views•2026-06-01
People of Game of Thrones using JavaScript DOM
AltCampus
296 views•2026-05-30
Instagram accounts got PWNed
EricParker
13K views•2026-06-03











