We've shipped a new AI-powered `xrpl ai` command that translates natural language prompts into executable xrpl-cli-ng commands, making complex on-chain operations more accessible.
> impact
This release introduces a new root command, `xrpl ai`, designed to bridge the gap between human intent and precise command-line syntax. By passing a natural language prompt in quotes (e.g., `xrpl ai "send 10 XRP to address r..."`), the CLI now leverages a Large Language Model (LLM) to parse your request and generate the corresponding, fully-formed `xrpl` command. The generated command is then presented to you for confirmation before execution, ensuring you always have the final say.
The core motivation behind this feature is to lower the steep learning curve associated with the XRP Ledger's more complex operations. While `xrpl-cli-ng` is powerful, remembering the exact syntax, flags, and argument structure for tasks like creating nuanced offers, setting up multi-signature accounts, or configuring trust lines can be challenging for both new and experienced developers. This AI layer removes the need to constantly consult documentation, allowing you to focus on your objective rather than the specific command incantation required to achieve it.
The impact is a significant boost in developer productivity and a more inclusive user experience. For newcomers, the CLI is no longer an intimidating tool requiring rote memorization. For power users, it's a faster way to draft complex commands without error. This update truly delivers on the project's goal of being built for 'AI Agents and humans,' transforming the CLI from a simple imperative tool into an intelligent, intent-based interface for interacting with the XRP Ledger.
> Try this now
try this
# Try out the new `xrpl ai` command to generate CLI commands from plain English.
# 1. Start with a simple request, like checking an account's balance.
# You no longer need to remember the `account info` subcommand.
xrpl ai "check the balance of account rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"
# > AI generated command:
# > xrpl account info rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh
# >
# > Run this command? [y/N] y
# 2. Now, let's generate a more complex payment transaction.
# The AI correctly infers the flags and formats the amount in drops.
xrpl ai "send 22 XRP from rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh to rPT1Sjq2YbDd5UiTnm4arv1sJ5P4gcec3m"
# > AI generated command:
# > xrpl transaction payment --from rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh --to rPT1Sjq2YbDd5UiTnm4arv1sJ5P4gcec3m --amount 22000000
# >
# > Run this command? [y/N] y
# 3. Finally, tackle a complex offer creation without looking up the JSON structure.
# The AI handles the structured arguments for TakerPays and TakerGets automatically.
xrpl ai "create an offer to sell 100 of my FOO tokens issued by rFooIssuer for 50 XRP"
# > AI generated command:
# > xrpl transaction offer-create --taker-pays '{"currency":"XRP","value":"50"}' --taker-gets '{"currency":"FOO","issuer":"rFooIssuer","value":"100"}'
# >
# > Run this command? [y/N] y