id = "croc"
name = "croc"
homepage = "https://github.com/schollz/croc"
description = "A tool that allows any two computers to simply and securely transfer files and folders."
icon = "https://raw.githubusercontent.com/schollz/croc/main/web/public/branding/croc-head-favicon-256.png"
executables = ["croc"]
[dotfiles]
paths = ["~/.config/croc/"]
exclude = [
"~/.config/croc/best-relay",
]
secret = []
side_effect = false
[[dotfiles.secret_paths]]
file = ["~/.config/croc/send.json", "~/.config/croc/receive.json"]
match = { key_path = ["SharedSecret", "RelayPassword"] }
[commands]
format = 1
label = "Receive files"
description = "Receive files with a croc code phrase; use the Send subcommand to send. Relay, proxy and throttle options are left out."
quality = "ai-draft"
base = "fig:croc"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/croc.ts"
license = "MIT"
[[commands.field]]
id = "code"
label = "Code phrase"
description = "The code phrase shown by the sender."
type = "string"
position = 0
sources = ["fig"]
[[commands.field]]
id = "out"
label = "Output folder"
type = "path"
option = ["--out"]
path = { kind = "directory", role = "output", must_exist = false }
sources = ["fig"]
[[commands.field]]
id = "yes"
label = "Agree to all prompts"
type = "boolean"
option = ["--yes"]
sources = ["fig"]
[[commands.field]]
id = "overwrite"
label = "Overwrite without prompting"
type = "boolean"
option = ["--overwrite"]
effect = "overwrite"
sources = ["fig"]
[[commands.field]]
id = "local"
label = "Local connections only"
type = "boolean"
option = ["--local"]
sources = ["fig"]
[[commands.field]]
id = "stdout"
label = "Write to stdout"
type = "boolean"
option = ["--stdout"]
sources = ["fig"]
[[commands.task]]
id = "receive"
label = "Receive files"
fields = ["code", "out", "yes", "local"]
required = ["code"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["code", "out", "yes"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["overwrite", "local", "stdout"]
[[commands.subcommand]]
path = ["send"]
label = "Send files"
description = "Send files, a folder or text. Hash, port and multiplexing options are left out."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/croc.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "files"
label = "Files or folders"
type = "path"
position = 0
multiple = true
path = { kind = "any", role = "input", must_exist = true }
sources = ["fig"]
[[commands.subcommand.field]]
id = "text"
label = "Text to send"
description = "Send some text instead of files."
type = "string"
option = ["--text", "-t"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "code"
label = "Custom code phrase"
type = "string"
option = ["--code", "-c"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "local"
label = "Local connections only"
type = "boolean"
option = ["--local"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_compress"
label = "Disable compression"
type = "boolean"
option = ["--no-compress"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "send"
label = "Send files"
fields = ["files", "code", "local", "no_compress"]
required = ["files"]
[[commands.subcommand.task]]
id = "send-text"
label = "Send text"
fields = ["text", "code"]
required = ["text"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["files", "text", "code"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["local", "no_compress"]