id = "twilio" name = "Twilio CLI" homepage = "https://www.twilio.com/docs/twilio-cli" description = "Unleash the power of Twilio from your command prompt." icon = "theSVG:twilio" executables = ["twilio"] [dotfiles] # twilio-cli's bin/run calls `require('@twilio/cli-core').configureEnv()` # before oclif starts, and cli-core's src/services/env.js is: # # const home = process.env.HOME || process.env.USERPROFILE || os.homedir(); # const twilioDir = path.join(home, `.${CLI_NAME}`); // CLI_NAME = 'twilio-cli' # ['TWILIO_CACHE_DIR', 'TWILIO_CONFIG_DIR', 'TWILIO_DATA_DIR'] # .forEach(v => { if (!process.env[v]) process.env[v] = twilioDir; }); # # so oclif's config directory is ~/.twilio-cli, and cli-core's # src/services/config.js puts `config.json` inside it. On Windows that same # join lands under the user profile, which is what "~/" resolves to here. # # ARCHITECTURE.md says where it used to be: "Profile configuration data is # stored in ~/.twilio-cli (moved from the preferred ~/.config/twilio-cli)" — # the oclif default, listed second so an unmigrated machine is still covered. paths = [ "~/.twilio-cli/config.json", "~/.config/twilio-cli/config.json", ] exclude = [] # config.json is not a whole-file secret: the account SIDs, region, edge, the # active profile and the answered prompts are worth syncing. Only the key pair # below comes out. secret = [] # ARCHITECTURE.md: "we prompt them for their Account SID and Auth Token. Using # these, we create an API key for them and save it directly in the config file # instead of the system keychain ... This was done to support platforms # without a keychain". The saved pair is apiKey + apiSecret per profile # (src/services/config.js, ConfigDataProfile). apiSecret is the password half; # apiKey is marked too because the pair is useless apart and over-marking # costs only convenience. Both spellings are named, or the credential is # lifted out on a migrated machine and syncs in the clear from an old one. [[dotfiles.secret_paths]] file = ["~/.twilio-cli/config.json", "~/.config/twilio-cli/config.json"] match = { key_path = ["profiles.*.apiKey", "profiles.*.apiSecret"] } [commands] format = 1 label = "Twilio CLI" description = "Twilio command line. Forms cover phone-numbers:list and email:send." quality = "ai-draft" base = "fig:twilio" 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/twilio.ts" license = "MIT" [[commands.subcommand]] path = ["phone-numbers:list"] label = "List phone numbers" description = "Show the phone numbers on the account." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/twilio.ts" license = "MIT" [[commands.subcommand.field]] id = "output" label = "Output format" type = "enum" option = ["-o"] choices = [{ value = "columns", label = "columns" }, { value = "json", label = "json" }, { value = "tsv", label = "tsv" }, { value = "none", label = "none" }] sources = ["fig"] [[commands.subcommand.field]] id = "silent" label = "Silent" type = "boolean" option = ["--silent"] sources = ["fig"] [[commands.subcommand.field]] id = "no_header" label = "No header" type = "boolean" option = ["--no-header"] sources = ["fig"] [[commands.subcommand.field]] id = "properties" label = "Properties" type = "string" option = ["--properties"] sources = ["fig"] [[commands.subcommand.field]] id = "account_sid" label = "Account SID" type = "string" option = ["--account-sid"] sources = ["fig"] [[commands.subcommand.task]] id = "list" label = "List" fields = ["output", "properties"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["output", "properties"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["silent", "no_header", "account_sid"] [[commands.subcommand]] path = ["email:send"] label = "Send email" description = "Send an email to one or more recipients." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/twilio.ts" license = "MIT" [[commands.subcommand.field]] id = "from" label = "From" type = "string" option = ["--from"] sources = ["fig"] [[commands.subcommand.field]] id = "to" label = "To" description = "Comma-separated recipients." type = "string" option = ["--to"] sources = ["fig"] [[commands.subcommand.field]] id = "subject" label = "Subject" type = "string" option = ["--subject"] sources = ["fig"] [[commands.subcommand.field]] id = "text" label = "Body text" type = "string" option = ["--text"] sources = ["fig"] [[commands.subcommand.field]] id = "attachment" label = "Attachment" type = "path" option = ["--attachment"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "no_attachment" label = "No attachment" type = "boolean" option = ["--no-attachment"] sources = ["fig"] [[commands.subcommand.task]] id = "send" label = "Send" fields = ["from", "to", "subject", "text"] required = ["from", "to"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["from", "to", "subject", "text"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["attachment", "no_attachment"]