id = "truffle" name = "Truffle" homepage = "https://github.com/trufflesuite/truffle" description = "Truffle is a development environment, testing framework, and asset pipeline for Ethereum." # Truffle's logomark, still served from its own site. icon = "https://trufflesuite.com/img/truffle-logomark.svg" executables = ["truffle"] [dotfiles] # packages/config/src/index.ts: # # public static getUserConfig(): Conf { # return new Conf({ projectName: "truffle" }); # } # # `conf` with only a projectName resolves its directory through # envPaths("truffle", { suffix: "nodejs" }).config (source/index.ts), and # env-paths gives that as ~/Library/Preferences/ on macOS, # $XDG_CONFIG_HOME or ~/.config/ on Linux, and %APPDATA%\\Config on # Windows — with the "-nodejs" suffix appended to the name in every case. The # file inside is conf's default `config.json`. # # truffle-config.js belongs to the project directory, not here. paths = [ "~/.config/truffle-nodejs/config.json", "~/Library/Preferences/truffle-nodejs/config.json", "%APPDATA%/truffle-nodejs/Config/config.json", ] exclude = [] # The user-level file holds the analytics opt-in and the id below. Truffle's # network credentials live in truffle-config.js in the project, and its # mnemonics are supplied per run. secret = [] # packages/core/lib/commands/config/utils.js generates `uniqueId` with uuid() # the first time it is missing and keeps it to label this installation's # analytics events. It identifies one install, so carrying it to a second # machine would merge the two under one id. `enableAnalytics` and # `analyticsSet` beside it are the user's answer to the prompt and travel. # All three spellings are named, or the rule never runs off Linux. [[dotfiles.machine_lines]] file = [ "~/.config/truffle-nodejs/config.json", "~/Library/Preferences/truffle-nodejs/config.json", "%APPDATA%/truffle-nodejs/Config/config.json", ] match = { key_path = ["uniqueId"] } [commands] format = 1 label = "Truffle project" description = "Compile, migrate and test Solidity contracts. Console, debug and package commands are left out." quality = "ai-draft" base = "fig:truffle" 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/truffle.ts" license = "MIT" [[commands.subcommand]] path = ["compile"] label = "Compile contracts" description = "Compile contract sources." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/truffle.ts" license = "MIT" [[commands.subcommand.field]] id = "all" label = "Compile all contracts" type = "boolean" option = ["--all"] sources = ["fig"] [[commands.subcommand.field]] id = "quiet" label = "Suppress output" type = "boolean" option = ["--quiet"] sources = ["fig"] [[commands.subcommand.task]] id = "compile" label = "Compile changed" fields = ["all", "quiet"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["all", "quiet"] [[commands.subcommand]] path = ["migrate"] label = "Run migrations" description = "Deploy contracts to a network. Use a dry run first." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/truffle.ts" license = "MIT" [[commands.subcommand.field]] id = "network" label = "Network" type = "string" option = ["--network"] sources = ["fig"] [[commands.subcommand.field]] id = "reset" label = "Rerun from the beginning" type = "boolean" option = ["--reset"] sources = ["fig"] [[commands.subcommand.field]] id = "compile_all" label = "Compile all contracts" type = "boolean" option = ["--compile-all"] sources = ["fig"] [[commands.subcommand.field]] id = "dry_run" label = "Dry run on a fork" type = "boolean" option = ["--dry-run"] sources = ["fig"] [[commands.subcommand.field]] id = "to" label = "Run up to migration" type = "integer" option = ["--to"] sources = ["fig"] [[commands.subcommand.task]] id = "migrate" label = "Migrate to network" fields = ["network", "reset", "compile_all"] required = ["network"] [[commands.subcommand.task]] id = "dry" label = "Dry run" fields = ["network", "dry_run"] required = ["network"] set = { dry_run = [true] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["network", "reset", "compile_all", "dry_run", "to"] [[commands.subcommand]] path = ["test"] label = "Run tests" description = "Run JavaScript and Solidity tests." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/truffle.ts" license = "MIT" [[commands.subcommand.field]] id = "test_file" label = "Test file" type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.subcommand.field]] id = "network" label = "Network" type = "string" option = ["--network"] sources = ["fig"] [[commands.subcommand.field]] id = "compile_all" label = "Compile all contracts" type = "boolean" option = ["--compile-all"] sources = ["fig"] [[commands.subcommand.field]] id = "show_events" label = "Log contract events" type = "boolean" option = ["--show-events"] sources = ["fig"] [[commands.subcommand.field]] id = "bail" label = "Stop at first failure" type = "boolean" option = ["--bail", "-b"] sources = ["fig"] [[commands.subcommand.field]] id = "stacktrace" label = "Mixed stack traces" type = "boolean" option = ["--stacktrace", "-t"] sources = ["fig"] [[commands.subcommand.task]] id = "test" label = "Run all tests" fields = ["compile_all", "bail"] required = [] [[commands.subcommand.task]] id = "one" label = "Run one file" fields = ["test_file", "bail"] required = ["test_file"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["test_file", "network", "compile_all", "bail", "show_events", "stacktrace"]