Æsh is a Java library for handling console input.
Clone or download
Latest commit 4c32726 Jan 15, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
aesh version 1.11 Jan 15, 2019
config added checkstyle to maven Oct 14, 2015
examples version 1.11 Jan 15, 2019
.gitattributes saving files before refreshing line endings Dec 16, 2016
.gitignore Adds Checkstyle files to .gitignore Oct 15, 2015
.travis.yml removed gradle build files Jul 24, 2018
LICENSE [AESH-279] Aug 28, 2014
README.asciidoc updated readme Jul 24, 2018
pom.xml version 1.11 Jan 15, 2019


Æsh (Another Extendable SHell)

Build Status

Æsh is a Java library to easily create commands through a well defined API. Æsh will take care of all the parsing and injection for your commands. Æsh uses the project 'aesh-readline' for it’s terminal/readline integration.


We’re now heading into the final stages before we’ll tag an 1.0-alpha release. The master branch is fairly stable atm and the plan is to not change anything big in the upcoming weeks. We have released a snapshot version of 1.0 if you are eager to test. Just add this to your 'pom.xml':


'build.gradle' file.

dependencies {
    compile group: 'org.aesh', name: 'aesh', version: '1.0-SNAPSHOT'


Æsh is a library to easily create commands. We recommend using annotations as the default way of adding metadata for your commands, but we also have a builder API if that is preferred. Some of our features:

  • Easy to use API to create everything from simple to advanced commands

  • Supports different types of options (list, group, single) and arguments

  • Builtin completors for default values, booleans and files

  • Supports multiple hierarcy of sub commands eg: git rebase/pull/++

  • All option values and arguments are automatically injected during execution

  • Possible to add custom validators, activators, completors, converters, renderers and parsers

  • Automatically generates help/info text based on the metadata provided

  • Can add and remove commands during runtime

All the readline functionality included in 'aesh-readline', eg:

  • Line editing

  • History (search, persistence)

  • Completion

  • Masking

  • Undo and Redo

  • Paste buffer

  • Emacs and Vi editing mode

  • Supports POSIX OS’s and Windows

  • Easy to configure (history file & buffer size, edit mode, streams, possible to override terminal implementations, etc)

  • Support standard out and standard error

  • Redirect

  • Alias

  • Pipeline

How to build:

To get going:

import org.aesh.command.Command;
import org.aesh.command.CommandDefinition;
import org.aesh.command.CommandException;
import org.aesh.command.CommandResult;
import org.aesh.command.impl.registry.AeshCommandRegistryBuilder;
import org.aesh.command.invocation.CommandInvocation;
import org.aesh.command.parser.CommandLineParserException;
import org.aesh.command.registry.CommandRegistry;
import org.aesh.console.settings.Settings;
import org.aesh.console.settings.SettingsBuilder;
import org.aesh.readline.ReadlineConsole;

import java.io.IOException;

public class SimpleExample {
    public static void main(String[] args) throws CommandLineParserException, IOException {
        CommandRegistry registry = new AeshCommandRegistryBuilder()
        Settings settings = SettingsBuilder
        ReadlineConsole console = new ReadlineConsole(settings);
        console.setPrompt("[simple@aesh]$ ");

    @CommandDefinition(name = "exit", description = "exit the program", aliases = {"quit"})
    public static class ExitCommand implements Command {
        public CommandResult execute(CommandInvocation commandInvocation) throws CommandException, InterruptedException {
            return CommandResult.SUCCESS;