From bd706d2d9b0cf99a8c1ed9b076e8392c790d90ee Mon Sep 17 00:00:00 2001 From: amisevsk <16168279+amisevsk@users.noreply.github.com> Date: Thu, 2 Apr 2026 19:35:57 +0000 Subject: [PATCH] docs: update CLI documentation for v1.12.0 Signed-off-by: amisevsk <16168279+amisevsk@users.noreply.github.com> --- docs/package.json | 2 +- docs/src/docs/cli/cli-reference.md | 72 ++++++++++++++++++++++++------ 2 files changed, 59 insertions(+), 15 deletions(-) diff --git a/docs/package.json b/docs/package.json index 1ec8dea14..930bb6ae0 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,5 +1,5 @@ { - "version": "v1.11.0", + "version": "v1.12.0", "peerDependencies": { "vue": "^3.5" }, diff --git a/docs/src/docs/cli/cli-reference.md b/docs/src/docs/cli/cli-reference.md index 5ae94dda7..b5cdbf093 100644 --- a/docs/src/docs/cli/cli-reference.md +++ b/docs/src/docs/cli/cli-reference.md @@ -432,15 +432,19 @@ kit info --remote registry.example.com/my-model:1.0.0 ## kit init -Generate a Kitfile for the contents of a directory +Generate a Kitfile for the contents of a directory or remote repository ### Synopsis -Examine the contents of a directory and attempt to generate a basic Kitfile -based on common file formats. Any files whose type (i.e. model, dataset, etc.) -cannot be determined will be included in a code layer. +Examine the contents of a directory or remote repository and attempt to generate +a basic Kitfile based on common file formats. Any files whose type (i.e. model, +dataset, etc.) cannot be determined will be included in a code layer. -By default the command will prompt for input for a name and description for the Kitfile +For local directories, the generated Kitfile is saved in the target directory by +default. Use --output to specify a different path, or --output=- for stdout. +For remote repositories (--remote), the Kitfile is printed to stdout by default. + +By default the command will prompt for input for a name and description for the Kitfile. ``` kit init [flags] PATH @@ -457,6 +461,18 @@ kit init ./my-model --name "mymodel" --desc "This is my model's description" # Generate a Kitfile, overwriting any existing Kitfile: kit init ./my-model --force + +# Generate a Kitfile for a remote HuggingFace model: +kit init https://huggingface.co/myorg/mymodel --remote + +# Generate a Kitfile for a HuggingFace dataset: +kit init huggingface.co/datasets/myorg/mydataset --remote + +# Generate a Kitfile for a remote repository with a specific ref: +kit init myorg/mymodel --remote --ref v1.0 + +# Save the generated Kitfile to a specific path: +kit init myorg/mymodel --remote --output ./Kitfile ``` ### Options @@ -466,6 +482,10 @@ kit init ./my-model --force --desc string Description for the ModelKit --author string Author for the ModelKit -f, --force Overwrite existing Kitfile if present + --remote Generate Kitfile from a remote HuggingFace repository + --ref string Branch or tag for remote repository (requires --remote) (default "main") + --token string Auth token for remote repository (requires --remote) + -o, --output string Output path for generated Kitfile ('-' writes to stdout; default: Kitfile in directory for local, stdout for remote) -h, --help help for init ``` @@ -552,6 +572,16 @@ appear multiple times in the list, distinguished by their DIGEST. The SIZE displayed for each modelkit represents the total storage space occupied by all its components. +Use the --filter (-f) flag to narrow results based on modelkit contents. Only +modelkits containing at least one layer matching the filter will be shown. + +Valid filters have the format + [types]:[filters] +where [types] is a comma-separated list of Kitfile fields (kitfile, model, datasets, +code, docs, or prompts) and [filters] is an optional comma-separated list of names +or paths to match against. Multiple --filter flags use OR logic (a modelkit is +listed if it matches any filter). + Use the --format flag to change how results are printed. Valid values are "table", "json", or a Go template. When a value other than "table" or "json" is supplied, the flag contents are treated as a Go template executed once per @@ -578,20 +608,33 @@ kit list # List modelkits from a remote repository kit list registry.example.com/my-namespace/my-model + +# List only modelkits that contain prompt layers +kit list -f prompts + +# List only modelkits containing a model +kit list -f model + +# List modelkits that have either prompts or datasets +kit list -f prompts -f datasets + +# List modelkits with a specific named prompt +kit list -f prompts:pdf-processing ``` ### Options ``` - --format string Output format: table, json, or Go template string (default "table") - --plain-http Use plain HTTP when connecting to remote registries - --tls-verify Require TLS and verify certificates when connecting to remote registries (default true) - --tls-cert strings Path to TLS cert to add to trust store (flag can be repeated) - --cert string Path to client certificate used for authentication (can also be set via environment variable KITOPS_CLIENT_CERT) - --key string Path to client certificate key used for authentication (can also be set via environment variable KITOPS_CLIENT_KEY) - --concurrency int Maximum number of simultaneous uploads/downloads (default 5) - --proxy string Proxy to use for connections (overrides proxy set by environment) - -h, --help help for list + --format string Output format: table, json, or Go template string (default "table") + -f, --filter stringArray Filter modelkits by content type (e.g., model, datasets, code, docs, prompts). Can be specified multiple times + --plain-http Use plain HTTP when connecting to remote registries + --tls-verify Require TLS and verify certificates when connecting to remote registries (default true) + --tls-cert strings Path to TLS cert to add to trust store (flag can be repeated) + --cert string Path to client certificate used for authentication (can also be set via environment variable KITOPS_CLIENT_CERT) + --key string Path to client certificate key used for authentication (can also be set via environment variable KITOPS_CLIENT_KEY) + --concurrency int Maximum number of simultaneous uploads/downloads (default 5) + --proxy string Proxy to use for connections (overrides proxy set by environment) + -h, --help help for list ``` ### Options inherited from parent commands @@ -1041,6 +1084,7 @@ kit unpack registry.example.com/myrepo/my-model:latest -o -d /path/to/unpacked -o, --overwrite Overwrites existing files and directories in the target unpack directory without prompting -i, --ignore-existing Skip unpacking files if a file with that name already exists -f, --filter stringArray Filter what is unpacked from the modelkit based on type and name. Can be specified multiple times + --include-remote Include remote datasets in unpacked files --kitfile Unpack only Kitfile (deprecated: use --filter=kitfile) --model Unpack only model (deprecated: use --filter=model) --code Unpack only code (deprecated: use --filter=code)