id = "tokei" name = "Tokei" homepage = "https://github.com/XAMPPRocky/tokei" description = "Tokei is a program that displays statistics about your code." executables = ["tokei"] [dotfiles] # README: "Currently tokei looks for this file in three different places. The # current directory, your home directory, and your configuration directory." # src/config.rs `Config::get_config` joins "tokei.toml" onto the base and falls # back to ".tokeirc" in the same directory, and `from_config_files` uses # etcetera's `choose_base_strategy` for the configuration directory. The doc # comment above it gives that base directly: # # Linux $XDG_CONFIG_HOME or $HOME/.config /home/alice/.config # macOS $XDG_CONFIG_HOME or $HOME/.config /Users/alice/.config # Windows {FOLDERID_RoamingAppData} C:\Users\Alice\AppData\Roaming # # That table is `[configHome]` exactly — the XDG configuration directory on # Linux *and* macOS, %APPDATA% on Windows — so one spelling covers all three. # The base is used as-is — there is no "tokei" component under it — so the file # sits directly in the configuration directory and directly in the home # directory. The current directory's copy belongs to the repository. paths = [ "[configHome]/tokei.toml", "[configHome]/.tokeirc", "~/tokei.toml", "~/.tokeirc", ] exclude = [] # Column width, sort order, which languages to count and how doc strings are # treated. Tokei reads source files and talks to nothing. secret = [] # Read once at the start of a run. side_effect = false # No machine_lines: `columns` is the only path-free machine-ish key and it is a # terminal-width preference, not a fact about one machine's disk. [commands] format = 1 label = "Count lines of code" description = "Count code, comments and blanks in one or more paths. Only flags in the Fig spec are offered." quality = "ai-draft" base = "fig:tokei" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tokei.ts" license = "MIT" [[commands.field]] id = "paths" label = "Paths" type = "path" position = 0 multiple = true path = { kind = "any", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "files" label = "Per-file statistics" type = "boolean" option = ["-f", "--files"] sources = ["fig"] [[commands.field]] id = "exclude" label = "Exclude patterns" type = "string" option = ["-e", "--exclude"] multiple = true sources = ["fig"] [[commands.field]] id = "output" label = "Output format" type = "enum" option = ["-o", "--output"] choices = [{ value = "cbor", label = "CBOR" }, { value = "json", label = "JSON" }, { value = "yaml", label = "YAML" }] sources = ["fig"] [[commands.field]] id = "sort" label = "Sort by" type = "enum" option = ["-s", "--sort"] choices = [{ value = "files", label = "Files" }, { value = "lines", label = "Lines" }, { value = "blanks", label = "Blanks" }, { value = "code", label = "Code" }, { value = "comments", label = "Comments" }] sources = ["fig"] [[commands.field]] id = "type" label = "Language types (comma separated)" type = "string" option = ["-t", "--type"] sources = ["fig"] [[commands.field]] id = "hidden" label = "Count hidden files" type = "boolean" option = ["--hidden"] sources = ["fig"] [[commands.field]] id = "no_ignore" label = "Ignore .gitignore rules" type = "boolean" option = ["--no-ignore"] sources = ["fig"] [[commands.field]] id = "columns" label = "Column width" type = "integer" option = ["-c", "--columns"] sources = ["fig"] [[commands.field]] id = "verbose" label = "Verbosity" type = "count" option = ["-v", "--verbose"] sources = ["fig"] [[commands.task]] id = "count" label = "Count a project" fields = ["paths"] required = [] [[commands.task]] id = "files" label = "Per-file, sorted by code" fields = ["paths", "files", "sort"] required = [] set = { files = [true], sort = ["code"] } [[commands.task]] id = "json" label = "JSON report" fields = ["paths", "output"] required = [] set = { output = ["json"] } [[commands.group]] id = "basic" label = "Basic" fields = ["paths", "files", "exclude", "output", "sort"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["type", "hidden", "no_ignore", "columns", "verbose"]