Skip to content
A simple subcommand router for programs written in Go with Lua scripting
Go Lua
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/example
internal/gluaflag
.gitignore
LICENSE
README.md
builtin.go
command.go
config.ld
go.mod
go.sum
router.go
script.go

README.md

eclier

Pronounced like eclair

The core of a command line application allowing for trivial user extension.

Every command and subcommand is its own .lua file that is either shipped as part of the built-in cartridge of commands or a plugin that the user installs.

The core contains the following:

  • A module loading system for preparing different commands for use
  • The core subcommand router

How to write plugins

Create a new file in the script home named after the plugin subcommand, for example: scripts/hello.lua:

script.verb = "hello"
script.help = "prints everyone's favorite hello world message"
script.author = "Xe" -- put your github username here
script.version = "1.0"
script.usage = ""

function(run) 
  print "Hello, world!"
end

And then run it using the example shell cli:

~/go/src/github.com/Xe/eclier:master λ go run ./example/main.go hello
Hello, world!
You can’t perform that action at this time.