diff --git a/cmd/lakectl/cmd/docs.go b/cmd/lakectl/cmd/docs.go index d907c05e518..c71c2b3071f 100644 --- a/cmd/lakectl/cmd/docs.go +++ b/cmd/lakectl/cmd/docs.go @@ -84,6 +84,25 @@ the Docker container. That is to say, ` + "`localhost`" + ` to a Docker containe ## Command Reference ` +var cliReferenceHiddenCommandsSeparator = ` +------- + +## Undocumented commands + +**note:** +⚠️ These commands are plumbing commands and for internal use only. +Avoid using them unless you're _really_ sure you know what you're doing, or +have been in contact with lakeFS support! +{: .note .note-warning } + +` + +var cliReferenceHiddenCommandBanner = `**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +` + func printOptions(buf *bytes.Buffer, cmd *cobra.Command) error { flags := cmd.NonInheritedFlags() flags.SetOutput(buf) @@ -103,9 +122,11 @@ func printOptions(buf *bytes.Buffer, cmd *cobra.Command) error { return nil } -// this is a version of github.com/spf13/cobra/doc that fits better -// into lakeFS' docs. -func genMarkdownForCmd(cmd *cobra.Command, w io.Writer) error { +// genMarkdownForCmd is a version of github.com/spf13/cobra/doc that fits +// better into lakeFS' docs. It generates documentation for cmd, then for +// its subcommands. topLevel adds a scarier header before those hidden +// subcommands. +func genMarkdownForCmd(cmd *cobra.Command, w io.Writer, topLevel bool) error { cmd.InitDefaultHelpCmd() cmd.InitDefaultHelpFlag() @@ -115,7 +136,7 @@ func genMarkdownForCmd(cmd *cobra.Command, w io.Writer) error { buf.WriteString("### " + name + "\n\n") if cmd.Hidden { - buf.WriteString("**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing.\n{: .note .note-warning }\n\n") + buf.WriteString(cliReferenceHiddenCommandBanner) } buf.WriteString(cmd.Short + "\n\n") @@ -144,11 +165,37 @@ func genMarkdownForCmd(cmd *cobra.Command, w io.Writer) error { } // recurse to children + hasHidden := false for _, c := range cmd.Commands() { - err := genMarkdownForCmd(c, w) + if c.Hidden { + hasHidden = true + continue + } + err := genMarkdownForCmd(c, w, false) + if err != nil { + return err + } + } + + if hasHidden { + sep := "\n---------\n" + if topLevel { + sep = cliReferenceHiddenCommandsSeparator + } + _, err := io.WriteString(w, sep) if err != nil { return err } + + for _, c := range cmd.Commands() { + if !c.Hidden { + continue + } + err := genMarkdownForCmd(c, w, false) + if err != nil { + return err + } + } } return nil @@ -176,7 +223,7 @@ var docsCmd = &cobra.Command{ if err != nil { DieErr(err) } - err = genMarkdownForCmd(rootCmd, writer) + err = genMarkdownForCmd(rootCmd, writer, true) if err != nil { DieErr(err) } diff --git a/docs/reference/cli.md b/docs/reference/cli.md index fd31e6b916b..4312fcb559f 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -110,185 +110,6 @@ $ export LAKECTL_BASE_URI="lakefs://my-repo/my-branch" $ lakectl fs ls /path ``` -### lakectl abuse - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Abuse a running lakeFS instance. See sub commands for more info. - -#### Options -{:.no_toc} - -``` - -h, --help help for abuse -``` - - - -### lakectl abuse commit - -Commits to the source branch repeatedly - -``` -lakectl abuse commit [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int amount of commits to do (default 100) - --gap duration duration to wait between commits (default 2s) - -h, --help help for commit -``` - - - -### lakectl abuse create-branches - -Create a lot of branches very quickly. - -``` -lakectl abuse create-branches [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int amount of things to do (default 1000000) - --branch-prefix string prefix to create branches under (default "abuse-") - --clean-only only clean up past runs - -h, --help help for create-branches - --parallelism int amount of things to do in parallel (default 100) -``` - - - -### lakectl abuse help - -Help about any command - -#### Synopsis -{:.no_toc} - -Help provides help for any command in the application. -Simply type abuse help [path to command] for full details. - -``` -lakectl abuse help [command] [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for help -``` - - - -### lakectl abuse link-same-object - -Link the same object in parallel. - -``` -lakectl abuse link-same-object [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int amount of link object to do (default 1000000) - -h, --help help for link-same-object - --key string key used for the test (default "linked-object") - --parallelism int amount of link object to do in parallel (default 100) -``` - - - -### lakectl abuse list - -List from the source ref - -``` -lakectl abuse list [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int amount of lists to do (default 1000000) - -h, --help help for list - --parallelism int amount of lists to do in parallel (default 100) - --prefix string prefix to list under (default "abuse/") -``` - - - -### lakectl abuse random-delete - -Delete keys from a file and generate random delete from the source ref for those keys. - -``` -lakectl abuse random-delete [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int amount of reads to do (default 1000000) - --from-file string read keys from this file ("-" for stdin) - -h, --help help for random-delete - --parallelism int amount of reads to do in parallel (default 100) -``` - - - -### lakectl abuse random-read - -Read keys from a file and generate random reads from the source ref for those keys. - -``` -lakectl abuse random-read [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int amount of reads to do (default 1000000) - --from-file string read keys from this file ("-" for stdin) - -h, --help help for random-read - --parallelism int amount of reads to do in parallel (default 100) -``` - - - -### lakectl abuse random-write - -Generate random writes to the source branch - -``` -lakectl abuse random-write [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int amount of writes to do (default 1000000) - -h, --help help for random-write - --parallelism int amount of writes to do in parallel (default 100) - --prefix string prefix to create paths under (default "abuse/") -``` - - - ### lakectl actions Manage Actions commands @@ -1332,57 +1153,75 @@ lakectl auth users policies list [flags] -### lakectl bisect +### lakectl branch -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } +Create and manage branches within a repository -Binary search to find the commit that introduced a bug +#### Synopsis +{:.no_toc} + +Create delete and list branches within a lakeFS repository #### Options {:.no_toc} ``` - -h, --help help for bisect + -h, --help help for branch ``` -### lakectl bisect bad +### lakectl branch create -Set 'bad' commit that is known to contain the bug +Create a new branch in a repository ``` -lakectl bisect bad [flags] +lakectl branch create -s [flags] +``` + +#### Examples +{:.no_toc} + +``` +lakectl branch create lakefs://example-repo/new-branch -s lakefs://example-repo/main ``` #### Options {:.no_toc} ``` - -h, --help help for bad + -h, --help help for create + -s, --source string source branch uri ``` -### lakectl bisect good +### lakectl branch delete -Set current commit as 'good' commit that is known to be before the bug was introduced +Delete a branch in a repository, along with its uncommitted changes (CAREFUL) ``` -lakectl bisect good [flags] +lakectl branch delete [flags] +``` + +#### Examples +{:.no_toc} + +``` +lakectl branch delete lakefs://my-repo/my-branch ``` #### Options {:.no_toc} ``` - -h, --help help for good + -h, --help help for delete + -y, --yes Automatically say yes to all confirmations ``` -### lakectl bisect help +### lakectl branch help Help about any command @@ -1390,10 +1229,10 @@ Help about any command {:.no_toc} Help provides help for any command in the application. -Simply type bisect help [path to command] for full details. +Simply type branch help [path to command] for full details. ``` -lakectl bisect help [command] [flags] +lakectl branch help [command] [flags] ``` #### Options @@ -1405,211 +1244,35 @@ lakectl bisect help [command] [flags] -### lakectl bisect log +### lakectl branch list -Print out the current bisect state +List branches in a repository ``` -lakectl bisect log [flags] +lakectl branch list [flags] ``` -#### Options +#### Examples {:.no_toc} ``` - -h, --help help for log -``` - - - -### lakectl bisect reset - -Clean up the bisection state - -``` -lakectl bisect reset [flags] +lakectl branch list lakefs://my-repo ``` #### Options {:.no_toc} ``` - -h, --help help for reset + --after string show results after this value (used for pagination) + --amount int number of results to return (default 100) + -h, --help help for list ``` -### lakectl bisect run +### lakectl branch reset -Bisecting based on command status code - -``` -lakectl bisect run [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for run -``` - - - -### lakectl bisect start - -Start a bisect session - -``` -lakectl bisect start [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for start -``` - - - -### lakectl bisect view - -Current bisect commits - -``` -lakectl bisect view [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for view -``` - - - -### lakectl branch - -Create and manage branches within a repository - -#### Synopsis -{:.no_toc} - -Create delete and list branches within a lakeFS repository - -#### Options -{:.no_toc} - -``` - -h, --help help for branch -``` - - - -### lakectl branch create - -Create a new branch in a repository - -``` -lakectl branch create -s [flags] -``` - -#### Examples -{:.no_toc} - -``` -lakectl branch create lakefs://example-repo/new-branch -s lakefs://example-repo/main -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for create - -s, --source string source branch uri -``` - - - -### lakectl branch delete - -Delete a branch in a repository, along with its uncommitted changes (CAREFUL) - -``` -lakectl branch delete [flags] -``` - -#### Examples -{:.no_toc} - -``` -lakectl branch delete lakefs://my-repo/my-branch -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for delete - -y, --yes Automatically say yes to all confirmations -``` - - - -### lakectl branch help - -Help about any command - -#### Synopsis -{:.no_toc} - -Help provides help for any command in the application. -Simply type branch help [path to command] for full details. - -``` -lakectl branch help [command] [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for help -``` - - - -### lakectl branch list - -List branches in a repository - -``` -lakectl branch list [flags] -``` - -#### Examples -{:.no_toc} - -``` -lakectl branch list lakefs://my-repo -``` - -#### Options -{:.no_toc} - -``` - --after string show results after this value (used for pagination) - --amount int number of results to return (default 100) - -h, --help help for list -``` - - - -### lakectl branch reset - -Reset uncommitted changes - all of them, or by path +Reset uncommitted changes - all of them, or by path #### Synopsis {:.no_toc} @@ -1824,55 +1487,6 @@ lakectl branch-protect list lakefs://my-repo -### lakectl cat-hook-output - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Cat actions hook output - -``` -lakectl cat-hook-output [flags] -``` - -#### Examples -{:.no_toc} - -``` -lakectl cat-hook-output lakefs://my-repo 20230719152411arS0z6I my_hook_name -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for cat-hook-output -``` - - - -### lakectl cat-sst - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Explore lakeFS .sst files - -``` -lakectl cat-sst [flags] -``` - -#### Options -{:.no_toc} - -``` - --amount int how many records to return, or -1 for all records (default -1) - -f, --file string path to an sstable file, or "-" for stdin - -h, --help help for cat-sst -``` - - - ### lakectl cherry-pick Apply the changes introduced by an existing commit @@ -2056,26 +1670,6 @@ lakectl diff [ref URI] [flags] -### lakectl docs - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - - - -``` -lakectl docs [outfile] [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for docs -``` - - - ### lakectl doctor Run a basic diagnosis of the LakeFS configuration @@ -2093,26 +1687,6 @@ lakectl doctor [flags] -### lakectl find-merge-base - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Find the commits for the merge operation - -``` -lakectl find-merge-base [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for find-merge-base -``` - - - ### lakectl fs View and manipulate objects @@ -2243,75 +1817,78 @@ lakectl fs rm [flags] -### lakectl fs stage +### lakectl fs stat -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Link an external object with a path in a repository - -#### Synopsis -{:.no_toc} - -Link an external object with a path in a repository, creating an uncommitted change. -The object location must be outside the repository's storage namespace +View object metadata ``` -lakectl fs stage [flags] +lakectl fs stat [flags] ``` #### Options {:.no_toc} ``` - --checksum string Object MD5 checksum as a hexadecimal string - --content-type string MIME type of contents - -h, --help help for stage - --location string fully qualified storage location (i.e. "s3://bucket/path/to/object") - --meta strings key value pairs in the form of key=value - --mtime int Object modified time (Unix Epoch in seconds). Defaults to current time - --size int Object size in bytes + -h, --help help for stat + --pre-sign Use pre-signed URLs when downloading/uploading data (recommended) (default true) ``` -### lakectl fs stat +### lakectl fs upload -View object metadata +Upload a local file to the specified URI ``` -lakectl fs stat [flags] +lakectl fs upload [flags] ``` #### Options {:.no_toc} ``` - -h, --help help for stat - --pre-sign Use pre-signed URLs when downloading/uploading data (recommended) (default true) + --content-type string MIME type of contents + -h, --help help for upload + --no-progress Disable progress bar animation for IO operations + -p, --parallelism int Max concurrent operations to perform (default 25) + --pre-sign Use pre-signed URLs when downloading/uploading data (recommended) (default true) + -r, --recursive recursively copy all files under local source + -s, --source string local file to upload, or "-" for stdin ``` -### lakectl fs upload -Upload a local file to the specified URI +--------- +### lakectl fs stage + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Link an external object with a path in a repository + +#### Synopsis +{:.no_toc} + +Link an external object with a path in a repository, creating an uncommitted change. +The object location must be outside the repository's storage namespace ``` -lakectl fs upload [flags] +lakectl fs stage [flags] ``` #### Options {:.no_toc} ``` + --checksum string Object MD5 checksum as a hexadecimal string --content-type string MIME type of contents - -h, --help help for upload - --no-progress Disable progress bar animation for IO operations - -p, --parallelism int Max concurrent operations to perform (default 25) - --pre-sign Use pre-signed URLs when downloading/uploading data (recommended) (default true) - -r, --recursive recursively copy all files under local source - -s, --source string local file to upload, or "-" for stdin + -h, --help help for stage + --location string fully qualified storage location (i.e. "s3://bucket/path/to/object") + --meta strings key value pairs in the form of key=value + --mtime int Object modified time (Unix Epoch in seconds). Defaults to current time + --size int Object size in bytes ``` @@ -2985,67 +2562,6 @@ lakectl metastore import-all [flags] -### lakectl refs-dump - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Dumps refs (branches, commits, tags) to the underlying object store - -``` -lakectl refs-dump [flags] -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for refs-dump - -o, --output string output filename (default stdout) - --poll-interval duration poll status check interval (default 3s) - --timeout duration timeout for polling status checks (default 1h0m0s) -``` - - - -### lakectl refs-restore - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Restores refs (branches, commits, tags) from the underlying object store to a bare repository - -#### Synopsis -{:.no_toc} - -restores refs (branches, commits, tags) from the underlying object store to a bare repository. - -This command is expected to run on a bare repository (i.e. one created with 'lakectl repo create-bare'). -Since a bare repo is expected, in case of transient failure, delete the repository and recreate it as bare and retry. - -``` -lakectl refs-restore [flags] -``` - -#### Examples -{:.no_toc} - -``` -aws s3 cp s3://bucket/_lakefs/refs_manifest.json - | lakectl refs-restore lakefs://my-bare-repository --manifest - -``` - -#### Options -{:.no_toc} - -``` - -h, --help help for refs-restore - --manifest refs-dump path to a refs manifest json file (as generated by refs-dump). Alternatively, use "-" to read from stdin - --poll-interval duration poll status check interval (default 3s) - --timeout duration timeout for polling status checks (default 1h0m0s) -``` - - - ### lakectl repo Manage and explore repos @@ -3084,34 +2600,6 @@ lakectl repo create lakefs://my-repo s3://my-bucket -### lakectl repo create-bare - -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. -{: .note .note-warning } - -Create a new repository with no initial branch or commit - -``` -lakectl repo create-bare [flags] -``` - -#### Examples -{:.no_toc} - -``` -lakectl create-bare lakefs://my-repo s3://my-bucket -``` - -#### Options -{:.no_toc} - -``` - -d, --default-branch string the default branch name of this repository (will not be created) (default "main") - -h, --help help for create-bare -``` - - - ### lakectl repo delete Delete existing repository @@ -3179,6 +2667,37 @@ lakectl repo list [flags] + +--------- +### lakectl repo create-bare + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Create a new repository with no initial branch or commit + +``` +lakectl repo create-bare [flags] +``` + +#### Examples +{:.no_toc} + +``` +lakectl create-bare lakefs://my-repo s3://my-bucket +``` + +#### Options +{:.no_toc} + +``` + -d, --default-branch string the default branch name of this repository (will not be created) (default "main") + -h, --help help for create-bare +``` + + + ### lakectl show See detailed information about an entity @@ -3359,23 +2878,75 @@ lakectl tag show [flags] -### lakectl usage -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. +------- + +## Undocumented commands + +**note:** +⚠️ These commands are plumbing commands and for internal use only. +Avoid using them unless you're _really_ sure you know what you're doing, or +have been in contact with lakeFS support! {: .note .note-warning } -Usage reports from lakeFS +### lakectl abuse + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Abuse a running lakeFS instance. See sub commands for more info. #### Options {:.no_toc} ``` - -h, --help help for usage + -h, --help help for abuse ``` -### lakectl usage help +### lakectl abuse commit + +Commits to the source branch repeatedly + +``` +lakectl abuse commit [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int amount of commits to do (default 100) + --gap duration duration to wait between commits (default 2s) + -h, --help help for commit +``` + + + +### lakectl abuse create-branches + +Create a lot of branches very quickly. + +``` +lakectl abuse create-branches [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int amount of things to do (default 1000000) + --branch-prefix string prefix to create branches under (default "abuse-") + --clean-only only clean up past runs + -h, --help help for create-branches + --parallelism int amount of things to do in parallel (default 100) +``` + + + +### lakectl abuse help Help about any command @@ -3383,10 +2954,10 @@ Help about any command {:.no_toc} Help provides help for any command in the application. -Simply type usage help [path to command] for full details. +Simply type abuse help [path to command] for full details. ``` -lakectl usage help [command] [flags] +lakectl abuse help [command] [flags] ``` #### Options @@ -3398,9 +2969,467 @@ lakectl usage help [command] [flags] +### lakectl abuse link-same-object + +Link the same object in parallel. + +``` +lakectl abuse link-same-object [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int amount of link object to do (default 1000000) + -h, --help help for link-same-object + --key string key used for the test (default "linked-object") + --parallelism int amount of link object to do in parallel (default 100) +``` + + + +### lakectl abuse list + +List from the source ref + +``` +lakectl abuse list [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int amount of lists to do (default 1000000) + -h, --help help for list + --parallelism int amount of lists to do in parallel (default 100) + --prefix string prefix to list under (default "abuse/") +``` + + + +### lakectl abuse random-delete + +Delete keys from a file and generate random delete from the source ref for those keys. + +``` +lakectl abuse random-delete [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int amount of reads to do (default 1000000) + --from-file string read keys from this file ("-" for stdin) + -h, --help help for random-delete + --parallelism int amount of reads to do in parallel (default 100) +``` + + + +### lakectl abuse random-read + +Read keys from a file and generate random reads from the source ref for those keys. + +``` +lakectl abuse random-read [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int amount of reads to do (default 1000000) + --from-file string read keys from this file ("-" for stdin) + -h, --help help for random-read + --parallelism int amount of reads to do in parallel (default 100) +``` + + + +### lakectl abuse random-write + +Generate random writes to the source branch + +``` +lakectl abuse random-write [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int amount of writes to do (default 1000000) + -h, --help help for random-write + --parallelism int amount of writes to do in parallel (default 100) + --prefix string prefix to create paths under (default "abuse/") +``` + + + +### lakectl bisect + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Binary search to find the commit that introduced a bug + +#### Options +{:.no_toc} + +``` + -h, --help help for bisect +``` + + + +### lakectl bisect bad + +Set 'bad' commit that is known to contain the bug + +``` +lakectl bisect bad [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for bad +``` + + + +### lakectl bisect good + +Set current commit as 'good' commit that is known to be before the bug was introduced + +``` +lakectl bisect good [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for good +``` + + + +### lakectl bisect help + +Help about any command + +#### Synopsis +{:.no_toc} + +Help provides help for any command in the application. +Simply type bisect help [path to command] for full details. + +``` +lakectl bisect help [command] [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for help +``` + + + +### lakectl bisect log + +Print out the current bisect state + +``` +lakectl bisect log [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for log +``` + + + +### lakectl bisect reset + +Clean up the bisection state + +``` +lakectl bisect reset [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for reset +``` + + + +### lakectl bisect run + +Bisecting based on command status code + +``` +lakectl bisect run [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for run +``` + + + +### lakectl bisect start + +Start a bisect session + +``` +lakectl bisect start [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for start +``` + + + +### lakectl bisect view + +Current bisect commits + +``` +lakectl bisect view [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for view +``` + + + +### lakectl cat-hook-output + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Cat actions hook output + +``` +lakectl cat-hook-output [flags] +``` + +#### Examples +{:.no_toc} + +``` +lakectl cat-hook-output lakefs://my-repo 20230719152411arS0z6I my_hook_name +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for cat-hook-output +``` + + + +### lakectl cat-sst + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Explore lakeFS .sst files + +``` +lakectl cat-sst [flags] +``` + +#### Options +{:.no_toc} + +``` + --amount int how many records to return, or -1 for all records (default -1) + -f, --file string path to an sstable file, or "-" for stdin + -h, --help help for cat-sst +``` + + + +### lakectl docs + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + + + +``` +lakectl docs [outfile] [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for docs +``` + + + +### lakectl find-merge-base + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Find the commits for the merge operation + +``` +lakectl find-merge-base [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for find-merge-base +``` + + + +### lakectl refs-dump + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Dumps refs (branches, commits, tags) to the underlying object store + +``` +lakectl refs-dump [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for refs-dump + -o, --output string output filename (default stdout) + --poll-interval duration poll status check interval (default 3s) + --timeout duration timeout for polling status checks (default 1h0m0s) +``` + + + +### lakectl refs-restore + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Restores refs (branches, commits, tags) from the underlying object store to a bare repository + +#### Synopsis +{:.no_toc} + +restores refs (branches, commits, tags) from the underlying object store to a bare repository. + +This command is expected to run on a bare repository (i.e. one created with 'lakectl repo create-bare'). +Since a bare repo is expected, in case of transient failure, delete the repository and recreate it as bare and retry. + +``` +lakectl refs-restore [flags] +``` + +#### Examples +{:.no_toc} + +``` +aws s3 cp s3://bucket/_lakefs/refs_manifest.json - | lakectl refs-restore lakefs://my-bare-repository --manifest - +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for refs-restore + --manifest refs-dump path to a refs manifest json file (as generated by refs-dump). Alternatively, use "-" to read from stdin + --poll-interval duration poll status check interval (default 3s) + --timeout duration timeout for polling status checks (default 1h0m0s) +``` + + + +### lakectl usage + +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. +{: .note .note-warning } + +Usage reports from lakeFS + +#### Options +{:.no_toc} + +``` + -h, --help help for usage +``` + + + +### lakectl usage help + +Help about any command + +#### Synopsis +{:.no_toc} + +Help provides help for any command in the application. +Simply type usage help [path to command] for full details. + +``` +lakectl usage help [command] [flags] +``` + +#### Options +{:.no_toc} + +``` + -h, --help help for help +``` + + + + +--------- ### lakectl usage summary -**note:** This command is a lakeFS plumbing command. Don't use it unless you're really sure you know what you're doing. +**note:** +lakeFS plumbing command. Don't use unless you're _really_ sure you know what you're doing. {: .note .note-warning } Summary reports from lakeFS