Skip to main content

Interactive command building tool.

Project description

Yakari

pytest

Transform complex command-line interfaces into guided, interactive experiences. Yakari helps users build commands step by step, making CLI tools more accessible and user-friendly.

Getting started

Usage

usage: ykr [-h] [-d] [-n] command_name

positional arguments:
  command_name   Name of the command to execute

options:
  -h, --help     show this help message and exit
  -d, --dry-run  If toggled, Yakari only prints the command rather than running it.
  -n, --native   When toggled, run the command in the original shell instead of
                 within the Yakari TUI.

Try it out!

With uv:

uvx --from yakari ykr demo

will start a demo that showcases the different types or arguments and commands supported by Yakari. This demo only run echo commands so it's safe to use anywhere.

uvx --from yakari ykr git

will start a Terminal User Interface (TUI) with basic git features. The video below shows how to use this TUI to:

  • list branches
  • create and checkout a new demo branch
  • add a file and create a commit
  • check the git log to validate that the commit has been created
  • delete the demo branch

https://github.com/user-attachments/assets/5e1a5f59-d0e0-4e43-9737-302b99e62cfa

Play around with this in a git repo!

Basic Navigation

Yakari is an interactive command menu that makes it easy to run complex commands. Think of it as a command launcher where you type shortcuts instead of remembering full commands.

Start Typing

When you launch Yakari, you'll see a menu of available options. Every menu item has a shortcut (shown on the left). Type the shortcut to select it:

  • Commands (things you can run)
  • Arguments (options you can set)
  • Submenus (more options inside)

Other important keyboard shortcuts let you interact with the TUI:

Key Action
ctrl+q Cancel/Exit
backspace Erase/Go back
tab Auto-complete
ctrl+r Toggle results
ctrl+l Clear results
ctrl+e Toggle edit mode

screenshot illustrating how yakari highlights compatible commands based on user's input Example: In the git branch menu, typing - highlights the -f and -t arguments, and dims other entries.

Working with Arguments

Arguments are options you can set. There are two modes for handling them:

Normal Mode (default):

  • Selecting an argument toggles it on/off
  • Great for quick switches like --verbose

Edit Mode (press ctrl+e to switch):

  • Selecting an argument lets you edit its value
  • Perfect for editing named argument with an existing value

(Optional) Installation

Yakari is published to PyPI:

# Using pip
pip install yakari

# Using uv
uv tool install yakari

Menus

A command 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

Install new menus by copying the corresponding TOML file into $HOME/.config/yakari/menus. If you're interested in creating your own menus, take a look at dedicated readme from yakari-menus.

[!TIP] Yakari comes with a few pre-defined menus that you can use directly via ykr <command-name> (e.g. ykr git).

Features

  • 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

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

References

Why Yakari?

The name 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yakari-0.1.1.tar.gz (385.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yakari-0.1.1-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

Details for the file yakari-0.1.1.tar.gz.

File metadata

  • Download URL: yakari-0.1.1.tar.gz
  • Upload date:
  • Size: 385.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.10

File hashes

Hashes for yakari-0.1.1.tar.gz
Algorithm Hash digest
SHA256 116f9f532570ade9693f91cdb09ebc359a310f4fcba0c6758dd84e544a026001
MD5 b11670454a483757b8acb29ab42e06ba
BLAKE2b-256 76a3a0e9189c99f3362fce4c57a797c9386dea79d2fcc9c1d140f4fa03a931c9

See more details on using hashes here.

File details

Details for the file yakari-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: yakari-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.10

File hashes

Hashes for yakari-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ecf316d9f5d086660cb0ecafa6b4687fed73a59624581997354d9c14c3b86985
MD5 dab39adb44edfec3b30b7c283d7385c3
BLAKE2b-256 aaa4c52332361425798c69dd33942de88b2e4e7d07b09155eba3ddbad26df448

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page