You will then have access to kit init, which is a bootstrapping case, so that if you ever end up at an empty state, you can run it to reinitialize yourself.
$ kit
Usage:
kit - Composable command-line toolkit.
kit [global options] command [options] <arguments>
Commands:
init
Initializes a kit config.
$ kit init
$ kit
Usage:
kit - Composable command-line toolkit.
kit [global options] command [options] <arguments>
Commands:
plugin
Manage kit plugins.
# Add the `plugin/add` plugin as `foobar`
$ kit plugin add /foobar QmVrAu9VUahsA89Xfyuc5A3fEHWtogfdQX4MefdSicdKtJ
$ kit
Usage:
kit - Composable command-line toolkit.
kit [global options] command [options] <arguments>
Commands:
foobar [--usage <string>] [--pin] [--overwrite] [--] <command path> <manifest>
Adds a plugin to kit.
[--usage <string>]: Specify usage help text for the plugin.
[--pin]: Pins the plugin's parent namespace if adding to an implicit namespace.
[--overwrite]: Overwrites any namespace or command if conflicting at the command path.
<command path>: The command path to add the plugin.
<manifest>: The content address or resolvable name for a plugin's metadata.
plugin
Manage kit plugins.
# Add an empty plugin namespace for `/some/namespace`
$ kit plugin add /some/namespace ""
$ kit some namespace
Usage:
kit some namespace - A plugin namespace.
kit [global options] command [options] <arguments>
Commands:
No commands in kit some namespace.
Current issues
plugin doesn't use CGO but still require cross-compiling toolchain
When cross-compiling go plugins from linux to darwin or darwin to linux, it uses external linking, therefore you need to have cross compiling toolchain for the target platform installed. For example, to cross-compile go plugin from linux to darwin, you need the darwin cross compiling toolchain (binaries like /Users/urso/.gvm/gos/go1.8beta1/pkg/tool/darwin_amd64/link). Go could compile using internal linking if CGO isn't used but that is only a punted feature request at this moment.
plugin was built with a different version of package
Waiting for Go 1.13 to resolve reproducible builds issue (otherwise plugins need to have identical go env) in order to load properly. Without this, kit compiled with a different GOPATH cannot load plugins built by a CI server with a different GOPATH:
请发表评论