Skip to main content
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

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.tar.gz (23.9 kB view details)

Uploaded Source

File details

Details for the file galaxie-shell-0.1.tar.gz.

File metadata

  • Download URL: galaxie-shell-0.1.tar.gz
  • Upload date:
  • Size: 23.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for galaxie-shell-0.1.tar.gz
Algorithm Hash digest
SHA256 c993e975905265b3dd4beffe1c15de973b419e4088664e5079ae1c3b07c1821a
MD5 7206c4a5fd16b9f0a83b46345c413c09
BLAKE2b-256 58f70a30d0194cc246070f270e3a6828b09c07e3d94ad2c2a324a1e28853323e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.6

1 file

0.2.5

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2

1 file

0.1.2

1 file

0.1.1

1 file

This release

0.1 This release

1 file

Supported by

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