{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Flute CLI","siteUrl":"https://developer.flute.com","description":"Documentation and API reference for integrating Flute payment processing.","lang":"en-US"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"flute-cli","__idx":0},"children":["Flute CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Flute CLI is a cross-platform command-line interface for the Flute payments platform."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It covers the full transaction lifecycle for both card and ACH payments, including the customer vault, POS transactions, terminals and devices, settlement batches, subscriptions, and ISV API key management."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It ships as one self-contained executable, and every command can be scripted."," ","Each one supports a structured JSON output mode with consistent exit codes and error envelopes, making Flute CLI well-suited to a shell script, CI pipeline, or AI agent rather than manual, interactive use."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"common-use-cases","__idx":1},"children":["Common Use Cases"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Flute CLI is best suited to workflows where payments logic needs to run outside a browser session."," ","The following are representative use cases."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Automation and CI/CD pipelines"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Because every invocation is single-shot and non-interactive, flute commands integrate directly into shell scripts, deployment pipelines, and scheduled jobs."," ","Combined with structured JSON output and semantic exit codes, this allows payment operations to be embedded in existing automation without a custom API integration."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Pre-production testing"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"During development, flute transactions sale and related commands let a developer validate card behavior, error handling, and webhook delivery against the sandbox environment directly from a terminal, ahead of writing SDK-based integration code."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Operational diagnostics"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Support and operations engineers can inspect individual transactions, settlement batches, or terminal and device status without navigating a dashboard UI."," ","The --debug flag surfaces the underlying HTTP request and response for cases requiring lower-level troubleshooting."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Reconciliation and reporting"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"Finance and operations teams can incorporate settlement batch data into scheduled reconciliation scripts, piping --output json results into downstream tooling such as jq for further processing."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Bulk account administration"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For ISVs managing multiple merchants, the CLI supports scripted API key issuance and rotation, customer vault maintenance, and subscription lifecycle management at scale, in place of manual, one-at-a-time dashboard operations."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Agent and automation integration"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The structured output envelope and semantic exit codes are designed to be consumed programmatically, allowing AI agents and other automated systems to invoke flute directly for tasks such as transaction lookups or refund issuance."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In general, flute is the appropriate tool where payments functionality must be driven by automation or scripting rather than interactive use; the dashboard remains the more direct path for one-off, manual operations."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"installing-flute-cli","__idx":2},"children":["Installing Flute CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Download and install the application for your platform. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"The latest installer can always be found at:"," ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://github.com/getflute/flute-cli/releases/latest","target":"_blank","rel":"noopener noreferrer","style":{"fontWeight":"normal"}},"children":["https://github.com/getflute/flute-cli/releases/latest"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"installing-for-macos-or-linux-homebrew","__idx":3},"children":["Installing for macOS or Linux (Homebrew)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"brew install getflute/flute-cli/flute\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"installing-for-macos-or-linux-shell-script-maps-to-github-releases","__idx":4},"children":["Installing for macOS or Linux (Shell Script, Maps to GitHub Releases)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --proto '=https' --tlsv1.2 -LsSf https://github.com/getflute/flute-cli/releases/latest/download/flute-installer.sh | sh\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"installing-for-windows","__idx":5},"children":["Installing for Windows"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the following command from any location with either a Windows terminal window or a PowerShell window."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"powershell -ExecutionPolicy Bypass -c \"irm https://github.com/getflute/flute-cli/releases/download/v1.1.3/flute-installer.ps1 | iex\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Close the terminal window and open a new one to verify the installation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"verifying-flute-cli-installation","__idx":6},"children":["Verifying Flute CLI Installation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To verify that the installation was successful, run either:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute version"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute --version"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checking-the-application-version","__idx":7},"children":["Checking the Application Version"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To check the installed version, at any time, run:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["`flute version'"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This displays Flute CLI version and active profile."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"seeing-help-for-flute-cli","__idx":8},"children":["Seeing Help for Flute CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To get a list of general help commands, run:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute --help"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To get a list of help commands for any command group, run:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute <group> --help"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For help with specific command groups, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#displaying-available-commands"},"children":["Displaying available commands"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"updating-flute-cli","__idx":9},"children":["Updating Flute CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When launched, the application automatically checks for a newer version."," ","If a newer version exists, a non-blocking notice displays."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To explicitly update the application, run:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute update"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This downloads and installs the latest GitHub Release binary in place."," ","If the CLI was built from source, this command prints a no-op message instead."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"checking-the-application-health-and-version","__idx":10},"children":["Checking the Application Health and Version"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before checking the status, you must be logged in. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"To log in, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#authenticating-the-user"},"children":["Authenticating the User"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To check the status and functioning condition of the application, run:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute ping"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"configuring-flute-cli-settings","__idx":11},"children":["Configuring Flute CLI Settings"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For configuration options and saving them, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#configuring-flute-cli"},"children":["Configuring Flute CLI"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authenticating-the-user","__idx":12},"children":["Authenticating the User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before using this application, you must be logged in using authentication."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To authenticate interactively, use:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute auth login"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You will be prompted for your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]},"."," ","The secret prompt is hidden."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["We recommend immediately checking the login status."," ","Run: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute auth status"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once entered, the credentials are stored in the OS keychain, keyed for each profile."," ","There is no need to run this command again unless the credentials have changed or you logout."," ","For example, this may be because of routine API key rotation or because the API key was compromised."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auth"]}," command group also includes:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute auth login"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authenticates interactively and stores credentials in the OS keychain"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute auth logout"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Removes stored credentials for the active profile"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute auth status"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Displays the active profile and authentication status"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute auth switch"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Switches the active profile"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute auth token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prints the current bearer token"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"running-flute-cli","__idx":13},"children":["Running Flute CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Flute CLI runs in a single, non-interactive mode."," ","Each invocation is a single command with arguments and flags that runs once, displays output, and exits."," ","This is intended for scripting, automation, and one-off lookups."," ","Use a terminal window for all commands."," ","Elevated permissions are not required."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example","__idx":14},"children":["Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following example demonstrates charging a card."," ","This example call uses the endpoint ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /pay-api/v1/transactions/sale"]},"."," ","Use the following command. Of course, the card information must be valid. ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute transactions sale --amount 10.00 --card 4111111111111111 --exp 12/27 --cvv 123 --lineAddress1 \"35 S. North Street\" --zipCode \"12345\""]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"displaying-available-commands","__idx":15},"children":["Displaying Available Commands"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Flute CLI groups its functionality into command groups."," ","Each covers one area of the payments platform, such as API endpoint groups."," ","These range from authentication and card transactions to ACH, subscriptions, and API key management."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The table below lists each group alongside the subcommands it supports and a brief description of what it does."," ","A complete, current list of groups and their available flags can be seen using: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute --help"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Groups that touch cardholder or bank data, such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactions"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customers"]},", also accept AVS ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--billing-*"]}," flags for address verification."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following is a list of available groups."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Group"},"children":["Group"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Available commands"},"children":["Available commands"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ach"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["debit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund"]}," — ACH bank-transfer payments"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["auth"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["login"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["logout"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["switch"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["token"]}," — credential and profile management"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["completion"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prints shell completion script"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["customers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["update"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["delete"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["add-card"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["add-ach"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["methods"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["remove-method"]}," — customer vault. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["update"]}," accept AVS ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--billing-*"]}," flags"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["devices"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["register"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ttp-jwt"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ttp-activate"]}," — mobile payment device management"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["keys"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["revoke"]}," — ISV API key management (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tokens"]}," is a deprecated alias)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ping"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Displays the API health check"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["pos"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]}," (with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--wait"]}," long-poll), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cancel"]}," — POS transactions"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["settlements"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]}," — settlement batch queries"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["subscriptions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["create"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payments"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["terminate"]}," — recurring billing"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["terminals"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," — POS terminal management"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["transactions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sale"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auth"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["capture"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["refund"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["settle"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tip-adjust"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["get"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["inspect"]}," — card payment lifecycle. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sale"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auth"]}," accept AVS ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--billing-*"]}," flags"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["update"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Self-updates to the latest GitHub release"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["version"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prints CLI version and active profile"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"displaying-commands-help","__idx":16},"children":["Displaying Commands Help"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every command group and subcommand in Flute CLI ships with its own contextual help."," ","To see help for a specific command, run: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute <group> --help"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For example: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute customers --help"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"This lists the subcommands available under that group, along with a short description of each."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["More detailed help is also available for those subcommands."," ","To see help for a specific subcommand, run: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute <group> <subcommand> --help"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"For example: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute customers create --help"]}," ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},"This shows the exact flags, defaults, and examples for that specific action."," ","This holds for every group in the command overview above, including any newly added to the API suite."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"displaying-output","__idx":17},"children":["Displaying Output"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Output modes may be specified."," ","They are controlled by:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The command flag ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output table|json|quiet"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLUTE_OUTPUT"]}," environment variable"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["output"]}," key in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.flute/config.toml"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The format of the output is specified with:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mode"},"children":["Mode"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["This is an abbreviated table intende as a quick reivew. This is the default."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Structured envelope, suitable for scripts and agents. This displays the complete response body as returned by the API call. It is in JSON format."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["quiet"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Resource ID only, one per line. This is ideal for shell capture. For example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TXN=$(flute --output quiet transactions sale --amount 10.00 …)"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example: ",{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute transactions sale --amount 10.00 --card 4111111111111111 --exp 12/27 --cvv 123 --output json"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output json"]}," wraps every success response in a consistent envelope."," ","The following is a snippet of the response."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"object\": \"transaction_list\",\n  \"data\": {\n    \"filtered_count\": 4,\n    \"items\": [\n      {\n        \"amount\": {\n          \"baseAmount\": 10.00,\n          \"cashDiscountAmount\": 0,\n          \"cashDiscountRate\": 0,\n          \"percentageOffAmount\": 0.00,\n  ...\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Errors (non-zero exit codes) are also written to stdout as structured JSON when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output json"]}," is active."," ","One of the response fields, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kind"]},", is any of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["api"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transport"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auth"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["decode"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]},"."," ","The example below shows a typical response line:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{ \"kind\": \"api\", \"message\": \"<error message>\", \"status\": 422, \"correlation_id\": \"<uuid>\" }\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Data always goes to stdout."," ","Tracing, the production banner, and update notices always go to stderr. Parse one stream, never both."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"semantic-exit-codes","__idx":18},"children":["Semantic Exit Codes"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every flute invocation exits with one of five status codes."," ","A script or CI pipeline can branch on the outcome without parsing the rest of the output."," ","The code distinguishes a clean success from:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An unexpected failure"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An authentication problem"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A validation or input error"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A not-found result"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Each is mapped consistently regardless of which command produced it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output json"]},", that same code also matches the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kind"]}," reported in the error envelope."," ","This allows callers reading structured output and callers checking ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$?"]}," to reach the same conclusion."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following is a list of the exit codes."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"center","data-label":"Code"},"children":["Code"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Meaning"},"children":["Meaning"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"center"},"children":["0"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Success"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"center"},"children":["1"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["General / unexpected (transport, decode, server 5xx)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"center"},"children":["2"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Auth failure (401/403 or missing credentials)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"center"},"children":["3"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Validation / bad input — server 400/422, client-side validation, or CLI usage/parse errors"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"center"},"children":["4"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Not found (404)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output json"]},", CLI usage/parse errors are also written to stdout as a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"kind\": \"client\", \"message\": … }"]}," envelope (exit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["3"]},")."," ","A machine consumer never gets an empty stdout on a bad invocation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"logging-and-debugging","__idx":19},"children":["Logging and Debugging"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Flute CLI writes all logs to stderr."," ","Command output goes to stdout."," ","That split holds even with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]},"."," ","This means a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute --debug --output json …"]}," still emits a clean, parseable JSON document on stdout."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["By default, only warnings and a few brief notices are logged."," ","For example, a one-line note appears when a stale token triggers the automatic single 401 retry."," ","Successful commands are otherwise quiet on stderr apart from the production banner."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"understanding-the---debug-flag","__idx":20},"children":["Understanding the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]}," Flag"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The global ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]}," flag displays the full HTTP request/response traces (method, URL, status, and body) to stderr:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"flute --debug ping\nflute --debug transactions get <txn-id>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Sensitive fields are masked before anything is logged:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"How it appears in logs"},"children":["How it appears in logs"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Card / bank account numbers (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cardNumber"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountNumber"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["routingNumber"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pan"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Masked to the last four digits. For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["************1111"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CVV / security code (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["securityCode"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cvv"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cvc"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Removed entirely. For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["***"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bearer token"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Never logged. It is sent as a header, never part of the body trace."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Masking lowers the risk but does not eliminate it: a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]}," trace still reveals amounts, the last 4 digits, and request metadata. Avoid capturing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]}," output into shared or long-lived logs when operating on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["production"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"rust_log","__idx":21},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RUST_LOG"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Setting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RUST_LOG"]}," overrides the built-in filters entirely and accepts the standard ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EnvFilter"]}," syntax. The same field masking is applied to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute"]},"'s own traces no matter how the level is set."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Only flute's own HTTP traces, nothing from dependency crates\nRUST_LOG=flute_cli=debug flute ping\n\n# Add connection / TLS / DNS detail from the HTTP stack\nRUST_LOG=flute_cli=debug,reqwest=debug,hyper=debug flute ping\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"filter-presets","__idx":22},"children":["Filter Presets"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mode"},"children":["Mode"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Effective filter"},"children":["Effective filter"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Default"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["warn,flute_cli=info"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["debug,flute_cli=debug,reqwest=debug,hyper=info"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RUST_LOG"]}," set"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Your value (overrides both of the above)"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"quick-reference","__idx":23},"children":["Quick Reference"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Goal"},"children":["Goal"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Command"},"children":["Command"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["See the API's response when a command fails"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute --debug <cmd>"]}," — read the HTTP response line on stderr"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Get a structured error for a script"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output json"]}," — error envelope (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["kind"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["message"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["correlation_id"]},") on stdout"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Diagnose TLS / DNS / connection problems"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RUST_LOG=flute_cli=debug,reqwest=debug,hyper=debug flute ping"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Confirm which environment/URL is being hit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["flute --debug ping"]}," (the request URL is in the trace)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Command errors are always printed to stderr (and to stdout as JSON under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output json"]},") regardless of the log level."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"shell-completions","__idx":24},"children":["Shell Completions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Flute CLI's logging verbosity follows one of three presets, depending on how it's invoked."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A plain command uses the quiet default"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Warnings only. Adding ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--debug"]}," switches to a much noisier preset that includes HTTP traces from flute itself and its underlying connection libraries;"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Setting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RUST_LOG"]}," directly overrides both, giving full control over exactly which modules log at which level."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The table below shows the effective filter string each of these resolves to."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Shell"},"children":["Shell"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Notes"},"children":["Notes"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["bash"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sourced from a directory such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/etc/bash_completion.d/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["zsh"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sourced from a directory on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$fpath"]},". For example, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/usr/local/share/zsh/site-functions"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["fish"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sourced from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.config/fish/completions/"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["powershell"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Appended to your PowerShell ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$PROFILE"]}," script"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["elvish"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Appended to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.config/elvish/rc.elv"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Generate and install a completion script:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# Bash\nflute completion bash > /etc/bash_completion.d/flute\n\n# Zsh (add to a directory on $fpath; for example, /usr/local/share/zsh/site-functions)\nflute completion zsh > /usr/local/share/zsh/site-functions/_flute\n\n# Fish\nflute completion fish > ~/.config/fish/completions/flute.fish\n\n# PowerShell\nflute completion powershell >> $PROFILE\n\n# Elvish\nflute completion elvish >> ~/.config/elvish/rc.elv\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuring-flute-cli","__idx":25},"children":["Configuring Flute CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An optional configuration file may be manually created at: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.flute/config.toml"]},"."," ","It stores non-secret settings such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["default_profile"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["output"]},"; credentials are always kept in the OS keychain, keyed per profile, never in the config file."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Precedence for all settings: flag > environment variable > profile config > global ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["config.toml"]}," default."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"profiles-for-flute-cli","__idx":26},"children":["Profiles for Flute CLI"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Profile"},"children":["Profile"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Alias"},"children":["Alias"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API Base URL"},"children":["API Base URL"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sandbox"]}," (default)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://sandbox.api.flute.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["production"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["prod"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://api.flute.com"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Running any command against ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["production"]}," prints a red warning banner to stderr."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To select a profile, in order of highest precedence first:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Flag: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--profile production"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Environment variable: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FLUTE_PROFILE=production"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Config file default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.flute/config.toml"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["default_profile = \"production\""]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"for-ai-agents-and-mcp","__idx":27},"children":["For AI Agents and MCP"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every non-interactive command supports the structured ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--output json"]}," envelope described above, which makes Flute CLI straightforward to drive from scripts and agents."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For the full machine-readable contract, that is, structured output format, error JSON schema, exit codes, an idempotency table, and copy-pasteable command recipes for common agent intents."," ","See ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["agents.md"]}," in the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/getflute/flute-cli"},"children":["flute-cli repository"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"license","__idx":28},"children":["License"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["MIT."]}]},"headings":[{"value":"Flute CLI","id":"flute-cli","depth":1},{"value":"Common Use Cases","id":"common-use-cases","depth":2},{"value":"Installing Flute CLI","id":"installing-flute-cli","depth":2},{"value":"Installing for macOS or Linux (Homebrew)","id":"installing-for-macos-or-linux-homebrew","depth":3},{"value":"Installing for macOS or Linux (Shell Script, Maps to GitHub Releases)","id":"installing-for-macos-or-linux-shell-script-maps-to-github-releases","depth":3},{"value":"Installing for Windows","id":"installing-for-windows","depth":3},{"value":"Verifying Flute CLI Installation","id":"verifying-flute-cli-installation","depth":3},{"value":"Checking the Application Version","id":"checking-the-application-version","depth":3},{"value":"Seeing Help for Flute CLI","id":"seeing-help-for-flute-cli","depth":3},{"value":"Updating Flute CLI","id":"updating-flute-cli","depth":3},{"value":"Checking the Application Health and Version","id":"checking-the-application-health-and-version","depth":3},{"value":"Configuring Flute CLI Settings","id":"configuring-flute-cli-settings","depth":3},{"value":"Authenticating the User","id":"authenticating-the-user","depth":2},{"value":"Running Flute CLI","id":"running-flute-cli","depth":2},{"value":"Example","id":"example","depth":3},{"value":"Displaying Available Commands","id":"displaying-available-commands","depth":3},{"value":"Displaying Commands Help","id":"displaying-commands-help","depth":3},{"value":"Displaying Output","id":"displaying-output","depth":2},{"value":"Semantic Exit Codes","id":"semantic-exit-codes","depth":3},{"value":"Logging and Debugging","id":"logging-and-debugging","depth":2},{"value":"Understanding the --debug Flag","id":"understanding-the---debug-flag","depth":3},{"value":"RUST_LOG","id":"rust_log","depth":3},{"value":"Filter Presets","id":"filter-presets","depth":4},{"value":"Quick Reference","id":"quick-reference","depth":4},{"value":"Shell Completions","id":"shell-completions","depth":2},{"value":"Configuring Flute CLI","id":"configuring-flute-cli","depth":2},{"value":"Profiles for Flute CLI","id":"profiles-for-flute-cli","depth":3},{"value":"For AI Agents and MCP","id":"for-ai-agents-and-mcp","depth":2},{"value":"License","id":"license","depth":2}],"frontmatter":{"title":"Flute CLI","description":"A cross-platform CLI for the Flute payments platform","seo":{"title":"Flute CLI"}},"lastModified":"2026-09-21T17:24:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/sdk/flute-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}