Install Taplo on Ubuntu 26.04

Install Taplo on Ubuntu 26.04

Taplo is a command-line utility for working with TOML configuration files. It provides formatting, validation, querying, and editing capabilities, making it useful for managing TOML documents in development workflows. This tutorial explains how to install Taplo on Ubuntu 26.04.

Install Taplo

Download the compressed binary to the /usr/local/bin directory:

sudo curl -sSLo /usr/local/bin/taplo.gz https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-x86_64.gz

Extract the compressed binary:

sudo gunzip /usr/local/bin/taplo.gz

Grant execute permissions:

sudo chmod a+x /usr/local/bin/taplo

Verify that the installation completed successfully by displaying the Taplo version:

taplo --version

Testing Taplo

Create a sample TOML configuration file:

nano test.toml

Add the following content:

title="My App Config"
version = "1.0.0"

[server]
host= "127.0.0.1"

Use Taplo to retrieve the value of the server.host field:

taplo get -f test.toml 'server.host'

Expected output:

127.0.0.1

Uninstall Taplo

If the Taplo is no longer needed, remove the binary from the system:

sudo rm -rf /usr/local/bin/taplo

Leave a Comment

Cancel reply

Your email address will not be published.