Documentation
¶
Overview ¶
Copyright The KCL Authors. All rights reserved.
Copyright The KCL Authors. All rights reserved.
#### Language & Tooling Commands
``` kcl
run compile kcl package from a url or filepath build build the kcl package (Not yet implemented) check check the current package, but don't build target files (Not yet implemented) doc documentation tool fmt format tool lint lint tool vet vet tool test unit/integration/benchmark test tool deps dependency analysis, providing dependency diagrams for KCL modules and packages (Not yet implemented) server run a KCL server to provider REST APIs for other applications clean remove object files and cached files play open the playground
```
#### Package & Registry Related Commands (mod and registry workspace)
``` kcl
mod init initialize new module in current directory mod search search a command from registry mod add add new dependency mod remove remove dependency mod update update dependency mod pkg package a kcl package into tar mod metadata output the resolved dependencies of a package mod push push kcl package to OCI registry. mod pull pull kcl package from OCI registry. registry login login to a registry registry logout logout from a registry
```
#### Integration Commands
``` kcl
import migration other data and schema to kcl e.g., openapi, jsonschema, json, yaml export convert kcl schema to other schema e.g., openapi (Not yet implemented)
```
#### Plugin Commands (Not yet implemented)
``` kcl
plugin install install one or more kcl command plugins plugin list list installed command plugins plugin uninstall uninstall one or more command plugins plugin update update one or more command plugins
```
#### Version and Help Commands
``` kcl
help, h Shows a list of commands or help for one command version Shows the command version
``` #### Alias
``` alias kcl="kcl run" alias kpm="kcl mod" ```
Index ¶
- func ModAdd(cli *client.KpmClient, args []string) error
- func ModGraph(cli *client.KpmClient, args []string) error
- func ModPush(cli *client.KpmClient, args []string) error
- func ModUpdate(cli *client.KpmClient, args []string) error
- func New() *cobra.Command
- func NewCleanCmd() *cobra.Command
- func NewDocCmd() *cobra.Command
- func NewDocGenerateCmd() *cobra.Command
- func NewFmtCmd() *cobra.Command
- func NewImportCmd() *cobra.Command
- func NewLintCmd() *cobra.Command
- func NewModAddCmd(cli *client.KpmClient) *cobra.Command
- func NewModCmd() *cobra.Command
- func NewModGraphCmd(cli *client.KpmClient) *cobra.Command
- func NewModInitCmd(cli *client.KpmClient) *cobra.Command
- func NewModMetadataCmd(cli *client.KpmClient) *cobra.Command
- func NewModPkgCmd(cli *client.KpmClient) *cobra.Command
- func NewModPullCmd(cli *client.KpmClient) *cobra.Command
- func NewModPushCmd(cli *client.KpmClient) *cobra.Command
- func NewModUpdateCmd(cli *client.KpmClient) *cobra.Command
- func NewRegistryCmd() *cobra.Command
- func NewRegistryLoginCmd(cli *client.KpmClient) *cobra.Command
- func NewRegistryLogoutCmd(cli *client.KpmClient) *cobra.Command
- func NewRunCmd() *cobra.Command
- func NewServerCmd() *cobra.Command
- func NewTestCmd() *cobra.Command
- func NewVersionCmd() *cobra.Command
- func NewVetCmd() *cobra.Command
- func NewWithName(name string) *cobra.Command
- func NewWithNameAndCommands(name string, commands []*cobra.Command) *cobra.Command
- func ParseSourceFromArgs(cli *client.KpmClient, args []string) (*downloader.Source, error)
- func ParseUrlFromArgs(cli *client.KpmClient, args []string) (*url.URL, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDocGenerateCmd ¶
NewDocGenerateCmd returns the doc generate command.
func NewModAddCmd ¶ added in v0.7.0
NewModAddCmd returns the mod add command.
func NewModGraphCmd ¶ added in v0.8.0
NewModGraphCmd returns the mod graph command.
func NewModInitCmd ¶ added in v0.7.0
NewModInitCmd returns the mod init command.
func NewModMetadataCmd ¶ added in v0.7.0
NewModMetadataCmd returns the mod metadata command.
func NewModPkgCmd ¶ added in v0.7.0
NewModPkgCmd returns the mod pkg command.
func NewModPullCmd ¶ added in v0.7.0
NewModPullCmd returns the mod pull command.
func NewModPushCmd ¶ added in v0.7.0
NewModPushCmd returns the mod push command.
func NewModUpdateCmd ¶ added in v0.7.0
NewModUpdateCmd returns the mod update command.
func NewRegistryLoginCmd ¶ added in v0.7.0
NewRegistryLoginCmd returns the registry login command.
func NewRegistryLogoutCmd ¶ added in v0.7.0
NewRegistryLogoutCmd returns the registry logout command.
func NewServerCmd ¶ added in v0.7.0
NewServerCmd returns the server command.
func NewTestCmd ¶ added in v0.7.0
NewTestCmd returns the test command.
func NewWithName ¶ added in v0.10.0
NewWithName creates a new KCL CLI with the name
func NewWithNameAndCommands ¶ added in v0.11.2
NewWithNameAndCommands creates a new KCL CLI with the specified name and additional commands.
func ParseSourceFromArgs ¶ added in v0.11.0
Types ¶
This section is empty.