Yakari: an interactive command building tool

Yakari: an interactive command building tool

Visit Site

Here's a rewritten version of the provided text in a Markdown format with proper headings and sections:

Yakari

Overview

Yakari is an interactive command-line interface (CLI) tool that helps users communicate more naturally with command-line programs. It provides a guided menu approach to executing commands, making it easier for users to navigate complex command structures.

Installation


To install Yakari, you can use pip:

pip install yakari

Alternatively, you can use uv:

uv add yakari

Menus

A menu is a TOML configuration file that defines a hierarchical interface for executing commands. It allows you to:

  • Organize related commands into menus
  • Define reusable arguments
  • Create interactive prompts for command values

To install new menus, copy the corresponding TOML file into $HOME/.config/yakari/menus. For more information on creating your own menus, check out the dedicated readme from yakari-menus.

Features

Yakari comes with several features that make it a powerful tool for interacting with command-line programs:

  • Interactive command building
  • Contextual help and descriptions
  • Works alongside existing CLI tools
  • Command history across executions
  • Static and dynamic suggestions
  • In-place command execution with streamed output and support for interactive commands
  • Supported argument types:
    • Flag argument
    • Single-value argument
    • Multi-choice argument
    • Password argument
    • Multi-value argument

Roadmap

Yakari is constantly evolving. Here are some upcoming features:

  • Add argument types:
    • File argument
  • Support environment variables

Why Yakari?


The name "Yakari" comes from a Swiss comic book character who can talk to animals. Similarly, this tool helps users communicate more naturally with command-line programs by turning intimidating command structures into guided menus.

References

Yakari is heavily inspired by transient. It is powered by:

Menus

Normal Mode

In normal mode, selecting an argument toggles it on/off. This is great for quick switches like --verbose.

Edit Mode

To switch to edit mode, press ctrl+e. In edit mode, selecting an argument lets you edit its value. This is perfect for editing named arguments with existing values.

Tips and Tricks

  • Yakari comes with a few pre-defined menus that you can use directly via ykr <command-name> (e.g., ykr git).
  • To work with menus, copy the corresponding TOML file into $HOME/.config/yakari/menus.

By using Yakari, you can streamline your workflow and make interacting with command-line programs more efficient.