lit command

安裝方式

請參考「官網這篇」,從「Get Lit」那開始。

執行

$ curl -L https://github.com/luvit/lit/raw/master/get-lit.sh | sh

主要會產生兩個檔案「lit」和「luvi」。(還會產生其他的檔,例如「~/litconfig」)

將「lit」移到「~/bin」

$ mv lit ~/bin

將「luvi」移到「~/bin」

$ mv luvi ~/bin

若要研讀「get-lit.sh」,可以執行下面指令下載。

$ wget -c https://github.com/luvit/lit/raw/master/get-lit.sh

使用說明文件

觀看 help

執行

$ lit --help

或是執行

$ lit -h

或是執行

$ lit help

顯示

lit version: 3.4.4
luvi version: v2.7.4
command: help

Lit CLI Commands
================
 lit help                    Show usage information.
 lit version                 Show just the lit version.
 lit update                  Update lit to the latest version.
 lit make appdir             Build appdir into a single executable.
 lit serve prefix            Start a lit package server (upstream or proxy).
                             `prefix` is the protocol and host.
                             EG: lit serve https://lit.luvit.io
Local configuration
-------------------
 lit auth username           Verify local private key and set username.
 lit up [url]                Go online.  Uses default upstream or url.
 lit down                    Go offline (disable upstream).
 lit config                  Print configuration.

Package Management
------------------
 lit init                    Bootstrap a new package.lua file or an init.lua
                             entry file
 lit ls [path]               List packages in folder or zip.
 lit install                 Install deps of package in cwd.
 lit install names*          Install dependencies.
 lit sync [author] [name]    Sync down upstream updates for any locally cached
 lit publish path*           Add and publish packages to upstream.
 lit add path*               Import, tag, and sign packages from disk.
                             to the local db.
Organization Management
-----------------------
 lit claim org               Claim github org of which you are a public member.
 lit share org user          Add collaborator who can push to this lit org.
 lit unclaim org             Remove yourself from a lit organization.

done: success

觀看版本

執行

$ lit version

或是執行

$ lit --version

或是執行

$ lit -v

顯示

lit version: 3.4.4
luvi version: v2.7.4