Skip to content

Commit aeed356

Browse files
committed
docs: update CLI documentation for v1.12.0
Signed-off-by: amisevsk <16168279+amisevsk@users.noreply.github.com>
1 parent d66cccc commit aeed356

2 files changed

Lines changed: 59 additions & 15 deletions

File tree

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "v1.11.0",
2+
"version": "v1.12.0",
33
"peerDependencies": {
44
"vue": "^3.5"
55
},

docs/src/docs/cli/cli-reference.md

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -432,15 +432,19 @@ kit info --remote registry.example.com/my-model:1.0.0
432432

433433
## kit init
434434

435-
Generate a Kitfile for the contents of a directory
435+
Generate a Kitfile for the contents of a directory or remote repository
436436

437437
### Synopsis
438438

439-
Examine the contents of a directory and attempt to generate a basic Kitfile
440-
based on common file formats. Any files whose type (i.e. model, dataset, etc.)
441-
cannot be determined will be included in a code layer.
439+
Examine the contents of a directory or remote repository and attempt to generate
440+
a basic Kitfile based on common file formats. Any files whose type (i.e. model,
441+
dataset, etc.) cannot be determined will be included in a code layer.
442442

443-
By default the command will prompt for input for a name and description for the Kitfile
443+
For local directories, the generated Kitfile is saved in the target directory by
444+
default. Use --output to specify a different path, or --output=- for stdout.
445+
For remote repositories (--remote), the Kitfile is printed to stdout by default.
446+
447+
By default the command will prompt for input for a name and description for the Kitfile.
444448

445449
```
446450
kit init [flags] PATH
@@ -457,6 +461,18 @@ kit init ./my-model --name "mymodel" --desc "This is my model's description"
457461
458462
# Generate a Kitfile, overwriting any existing Kitfile:
459463
kit init ./my-model --force
464+
465+
# Generate a Kitfile for a remote HuggingFace model:
466+
kit init https://huggingface.co/myorg/mymodel --remote
467+
468+
# Generate a Kitfile for a HuggingFace dataset:
469+
kit init huggingface.co/datasets/myorg/mydataset --remote
470+
471+
# Generate a Kitfile for a remote repository with a specific ref:
472+
kit init myorg/mymodel --remote --ref v1.0
473+
474+
# Save the generated Kitfile to a specific path:
475+
kit init myorg/mymodel --remote --output ./Kitfile
460476
```
461477

462478
### Options
@@ -466,6 +482,10 @@ kit init ./my-model --force
466482
--desc string Description for the ModelKit
467483
--author string Author for the ModelKit
468484
-f, --force Overwrite existing Kitfile if present
485+
--remote Generate Kitfile from a remote HuggingFace repository
486+
--ref string Branch or tag for remote repository (requires --remote) (default "main")
487+
--token string Auth token for remote repository (requires --remote)
488+
-o, --output string Output path for generated Kitfile ('-' writes to stdout; default: Kitfile in directory for local, stdout for remote)
469489
-h, --help help for init
470490
```
471491

@@ -552,6 +572,16 @@ appear multiple times in the list, distinguished by their DIGEST.
552572
The SIZE displayed for each modelkit represents the total storage space
553573
occupied by all its components.
554574

575+
Use the --filter (-f) flag to narrow results based on modelkit contents. Only
576+
modelkits containing at least one layer matching the filter will be shown.
577+
578+
Valid filters have the format
579+
[types]:[filters]
580+
where [types] is a comma-separated list of Kitfile fields (kitfile, model, datasets,
581+
code, docs, or prompts) and [filters] is an optional comma-separated list of names
582+
or paths to match against. Multiple --filter flags use OR logic (a modelkit is
583+
listed if it matches any filter).
584+
555585
Use the --format flag to change how results are printed. Valid values are
556586
"table", "json", or a Go template. When a value other than "table" or "json"
557587
is supplied, the flag contents are treated as a Go template executed once per
@@ -578,20 +608,33 @@ kit list
578608
579609
# List modelkits from a remote repository
580610
kit list registry.example.com/my-namespace/my-model
611+
612+
# List only modelkits that contain prompt layers
613+
kit list -f prompts
614+
615+
# List only modelkits containing a model
616+
kit list -f model
617+
618+
# List modelkits that have either prompts or datasets
619+
kit list -f prompts -f datasets
620+
621+
# List modelkits with a specific named prompt
622+
kit list -f prompts:pdf-processing
581623
```
582624

583625
### Options
584626

585627
```
586-
--format string Output format: table, json, or Go template string (default "table")
587-
--plain-http Use plain HTTP when connecting to remote registries
588-
--tls-verify Require TLS and verify certificates when connecting to remote registries (default true)
589-
--tls-cert strings Path to TLS cert to add to trust store (flag can be repeated)
590-
--cert string Path to client certificate used for authentication (can also be set via environment variable KITOPS_CLIENT_CERT)
591-
--key string Path to client certificate key used for authentication (can also be set via environment variable KITOPS_CLIENT_KEY)
592-
--concurrency int Maximum number of simultaneous uploads/downloads (default 5)
593-
--proxy string Proxy to use for connections (overrides proxy set by environment)
594-
-h, --help help for list
628+
--format string Output format: table, json, or Go template string (default "table")
629+
-f, --filter stringArray Filter modelkits by content type (e.g., model, datasets, code, docs, prompts). Can be specified multiple times
630+
--plain-http Use plain HTTP when connecting to remote registries
631+
--tls-verify Require TLS and verify certificates when connecting to remote registries (default true)
632+
--tls-cert strings Path to TLS cert to add to trust store (flag can be repeated)
633+
--cert string Path to client certificate used for authentication (can also be set via environment variable KITOPS_CLIENT_CERT)
634+
--key string Path to client certificate key used for authentication (can also be set via environment variable KITOPS_CLIENT_KEY)
635+
--concurrency int Maximum number of simultaneous uploads/downloads (default 5)
636+
--proxy string Proxy to use for connections (overrides proxy set by environment)
637+
-h, --help help for list
595638
```
596639

597640
### Options inherited from parent commands
@@ -1041,6 +1084,7 @@ kit unpack registry.example.com/myrepo/my-model:latest -o -d /path/to/unpacked
10411084
-o, --overwrite Overwrites existing files and directories in the target unpack directory without prompting
10421085
-i, --ignore-existing Skip unpacking files if a file with that name already exists
10431086
-f, --filter stringArray Filter what is unpacked from the modelkit based on type and name. Can be specified multiple times
1087+
--include-remote Include remote datasets in unpacked files
10441088
--kitfile Unpack only Kitfile (deprecated: use --filter=kitfile)
10451089
--model Unpack only model (deprecated: use --filter=model)
10461090
--code Unpack only code (deprecated: use --filter=code)

0 commit comments

Comments
 (0)