id = "exercism" name = "Exercism CLI" homepage = "https://github.com/exercism/cli" description = "A Go based command line tool for exercism.org." icon = "SimpleIcons:exercism" executables = ["exercism"] [dotfiles] # config/config.go Dir(): %APPDATA%\ on Windows, otherwise # $EXERCISM_CONFIG_HOME, $XDG_CONFIG_HOME/exercism or ~/.config/exercism — the # XDG location on macOS too, which is [configHome]. # cmd/configure.go calls viperConfig.SetConfigName("user") and config/persister.go # writes it as JSON, so the file is user.json. paths = ["[configHome]/exercism/user.json"] exclude = [] # user.json is not a whole-file secret: it also carries apibaseurl and the # workspace setting. Only the token is lifted out. secret = [] # Loaded once per command through viper. side_effect = false # cmd/configure.go: `cfg.Set("token", token)` — the API token from # exercism.org/settings/api_cli. [[dotfiles.secret_paths]] file = "[configHome]/exercism/user.json" match = { key_path = ["token"] } # cmd/configure.go runs the workspace through config.Resolve() before storing it, # which turns it into an absolute path — the directory this machine downloads # exercises into, and nothing another machine can use. It is where the user's # own solutions sit, so it is kept for a rebuild of this machine: backup. [[dotfiles.machine_lines]] file = "[configHome]/exercism/user.json" match = { key_path = ["workspace"] } scope = "backup" [commands] format = 1 label = "Exercism" description = "Download exercises, submit solutions and configure the client." quality = "ai-draft" base = "fig:exercism" 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/exercism.ts" license = "MIT" [[commands.subcommand]] path = ["download"] label = "Download exercise" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/exercism.ts" license = "MIT" [[commands.subcommand.field]] id = "exercise" label = "Exercise slug" type = "string" option = ["--exercise", "-e"] sources = ["fig"] [[commands.subcommand.field]] id = "track" label = "Track" type = "string" option = ["--track", "-t"] sources = ["fig"] [[commands.subcommand.field]] id = "team" label = "Team" type = "string" option = ["--team", "-T"] sources = ["fig"] [[commands.subcommand.field]] id = "uuid" label = "Solution UUID" type = "string" option = ["--uuid", "-u"] sources = ["fig"] [[commands.subcommand.task]] id = "download" label = "Download" fields = ["exercise", "track"] required = ["exercise", "track"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["exercise", "track"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["team", "uuid"] [[commands.subcommand]] path = ["submit"] label = "Submit solution" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/exercism.ts" license = "MIT" [[commands.subcommand.field]] id = "file" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.subcommand.task]] id = "submit" label = "Submit" fields = ["file"] required = ["file"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["file"] [[commands.subcommand]] path = ["configure"] label = "Configure client" [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/exercism.ts" license = "MIT" [[commands.subcommand.field]] id = "show" label = "Show current config" type = "boolean" option = ["--show", "-s"] sources = ["fig"] [[commands.subcommand.field]] id = "token" label = "API token" type = "string" option = ["--token", "-t"] sources = ["fig"] [[commands.subcommand.field]] id = "workspace" label = "Workspace" type = "path" option = ["--workspace", "-w"] path = { kind = "directory", role = "output" } sources = ["fig"] [[commands.subcommand.field]] id = "api" label = "API base URL" type = "string" option = ["--api", "-a"] sources = ["fig"] [[commands.subcommand.field]] id = "no_verify" label = "Skip token check" type = "boolean" option = ["--no-verify"] sources = ["fig"] [[commands.subcommand.task]] id = "show" label = "Show config" set = { show = [true] } fields = ["show"] [[commands.subcommand.task]] id = "workspace" label = "Set workspace" fields = ["workspace", "token"] required = ["workspace"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["show", "token", "workspace"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["api", "no_verify"]