def spec

ezx@1.11.0.0 · src/ez/line.bend:30

import ezx@1.11.0.0/src/ez/line.bend as Line
import Base
import shake@0.6.0.0/main.bend as Shake

30# the program: every command, and the flags and positionals it binds
31def spec() -> Shake.Cli:
32  Shake.app("ez", "dependency tracking and builds for Bend 2", None{},
33    [],
34    [
35      Shake.sub("init", "scaffold a project: ez.toml, ignore, entry, src/",
36        [
37          Shake.pos("name", "package name", False{}, None{}, []),
38          Shake.pos("entry", "entry file", False{}, None{}, []),
39          Shake.opt("description", None{}, Some{"description"},
40            "one line: the entry's first line, which the hub shows", False{}, None{}, [])
41        ], []),
42      Shake.sub("add", "record a git or hub package",
43        [
44          Shake.pos("target", "owner/repo, git url, path, or name@version", True{}, None{},
45            []),
46          Shake.pos("ref", "commit, tag or branch", False{}, None{}, []),
47          Shake.pos("entry", "entry file", False{}, None{}, []),
48          Shake.opt("rename", None{}, Some{"rename"},
49            "record it under this name, ahead of its own (a TOML bare key)",
50            False{}, None{}, [])
51        ], []),
52      Shake.sub("remove", "drop a package from the ledger",
53        [
54          Shake.pos("name", "package name", True{}, None{}, [])
55        ], []),
56      Shake.sub("lock", "resolve every import, write ez.lock.toml",
57        [
58          Shake.flag("upgrade", None{}, Some{"upgrade"},
59            "re-pin git deps and tools that moved, then write the lock"),
60          Shake.opt("package", None{}, Some{"package"},
61            "with --upgrade, only this dependency or tool", False{}, None{}, [])
62        ], []),
63      Shake.sub("fetch", "fill BEND_LIB from the lock", [], []),
64      Shake.sub("check", "check the entry, without running it", [], []),
65      Shake.sub("build", "build the entry to a native binary",
66        [
67          Shake.pos("out", "output path", False{}, None{}, [])
68        ], []),
69      Shake.sub("run", "check and run the entry", [], []),
70      Shake.sub("tool", "build or run another project's binary", [], [
71        Shake.sub("sync", "build and link every pinned tool at its lock rev",
72          [], []),
73        Shake.sub("run", "fetch, build and run the binary a repo declares",
74          [
75            Shake.pos("target", "owner/repo, git url, path, or name@version", True{}, None{},
76              []),
77            Shake.opt("entry", None{}, Some{"entry"},
78              "build this file of the checkout, not the one it names", False{}, None{}, [])
79          ], []),
80        Shake.sub("install", "build the binary and link it on PATH",
81          [
82            Shake.pos("target", "owner/repo, git url, path, or name@version", True{}, None{},
83              []),
84            Shake.opt("entry", None{}, Some{"entry"},
85              "build this file of the checkout, not the one it names", False{}, None{}, [])
86          ], []),
87        Shake.sub("upgrade", "rebuild when the commit moved, and refresh the link",
88          [
89            Shake.pos("target", "owner/repo, git url, path, or name@version", True{}, None{},
90              []),
91            Shake.opt("entry", None{}, Some{"entry"},
92              "build this file of the checkout, not the one it names", False{}, None{}, [])
93          ], [])
94      ]),
95      Shake.sub("publish", "send the entry to the hub, under ez's 0x name",
96        [], []),
97      Shake.sub("test", "run every */tests/*.bend against its trailer", [], []),
98      Shake.sub("prove", "check every PROOF.bend: the proof gate",
99        [], []),
100      Shake.sub("doctor", "report on the toolchain and the project", [], [])
101    ])

Uses (9)

Used by (2)