Skip to main content

Galaxie Shell is a autonomous shell ready for CI and low tech OS

Project description

https://codecov.io/gl/Tuuux/galaxie-shell/branch/master/graph/badge.svg?token=MK6WWGAL5M Documentation Status

GLXSH - Galaxie Shell

https://galaxie-shell.readthedocs.io/en/latest/_images/logo_galaxie.png

Galaxie Shell is a Reliable Event Logging Protocol (RELP) write with python and based on top cmd2.

Home page: https://gitlab.com/Tuuux/galaxie-shell

The Galaxie Shell use a a builtins plugin and GNU Core Utils command’s set as specs.

All ready implemented features

  • History files respect the Freedesktop requirements

  • All unknown command’s are send to the sub shell system

  • Capability to build a one-file static binary file

  • Can load a script file as argument

  • Can execute command from passing arguments

  • Interactive shell when call without arguments

  • Plugins Manager

  • Builtins Plugin (arch, cat, cd, mkdir, pwd, rmdir, uname, which, etc …)

Application

Installation via pip

pip install galaxie-shell

Installation via pip (test)

pip install -i https://test.pypi.org/simple/ galaxie-shell

Next Step:

Now you can the start the glxsh entry point

$> glxsh
******************************* GLXSHELL V0.1A5 *******************************


GNU GENERAL PUBLIC LICENSE GPL-3.0
LOADER #1 SMP DEBIAN 4.19.146-1 (2020-09-17)
EXEC VENV PYTHON 3.7.3
31.36GB RAM SYSTEM
22.70GB FREE
NO HOLOTAPE FOUND
LOAD ROM(1): DEITRIX 303

>

or use the python package

#!/usr/bin/env python

import os
import sys
import argparse

from GLXShell.libs.shell import GLXShell

def main(argv=None):
    """Run when invoked from the operating system shell"""

    glxsh_parser = argparse.ArgumentParser(description="Commands as arguments")
    glxsh_parser.add_argument(
        "command",
        nargs="?",
        help="optional commands or file to run, if no commands given, enter an interactive shell",
    )
    glxsh_parser.add_argument(
        "command_args",
        nargs=argparse.REMAINDER,
        help="if commands is not a file use optional arguments for commands",
    )

    args = glxsh_parser.parse_args(argv)

    shell = GLXShell()

    sys_exit_code = 0
    if args.command:
        if os.path.isfile(args.command):
            # we have file to execute
            shell.onecmd_plus_hooks("@{command}".format(command=args.command))
        else:
            # we have a commands, run it and then exit
            shell.onecmd_plus_hooks(
                "{command} {args}".format(
                    command=args.command, args=" ".join(args.command_args)
                )
            )

    else:
        # we have no commands, drop into interactive mode
        sys_exit_code = shell.cmdloop()

    return sys_exit_code


if __name__ == "__main__":
    sys.exit(main())

Builtins Plugin implemented implemented command’s

  • arch

  • cat

  • cd

  • mkdir

  • pwd

  • rmdir

  • uname

  • which

Roadmap

  • implement the core util’s

  • plugins installation system based on pip

  • permit && and ||

  • deal with env and ewport

  • deal with exit code

  • better onefile binary distrinution

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

galaxie-shell-0.1.2a2.tar.gz (27.7 kB view hashes)

Uploaded Source

Supported by

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