Galaxie Shell is a autonomous shell ready for CI and low tech OS
Project description
________ __ __
/ _____/_____ | | _____ ___ __|__| ____
/ \ ___\__ \ | | \__ \ \ \/ / |/ __ \
\ \_\ \/ __ \| |__/ __ \_> <| \ ___/_
\________(______/____(______/__/\__\__|\_____/
GLXSH - Galaxie Shell
The Project
The goal of Galaxie-Shell is to provide a POSIX Shell for micro system like pyBoard or MicroPi.
at end it should be possible to execute POSIX Script Shell on MicroPython (Long time target).
The application Galaxie Shell is a Read Eval Print Loop (RELP) write with Python based on Native module call Cmd
The project implement POSIX Standard from the OpenGroup https://pubs.opengroup.org/onlinepubs/9699919799/utilities/
The OpenGroup permit a implementation where all utilities are builtins command, and that is what Galaxie-Shell do. I code it, because i like understand how a system work. Copy the code , use it , that is here for the public community.
The project provide a application class name GLXShell
oriented unix SHELL. and two entry point glxsh
, glxush
.
The goal is to permit everyone to start they own project around a SHELL as UI.
Links
Codeberg: https://codeberg.org/Tuuux/galaxie-shell/
Read the Doc: https://galaxie-shell.readthedocs.io/
PyPI: https://pypi.org/project/galaxie-shell/
PyPI Test: https://test.pypi.org/project/galaxie-shell/
Wokwi: https://wokwi.com/projects/312818372713644610
All ready implemented features
- Totally autonomous All in One shell
- 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
- Builtins POSIX command (basename, cat, cd, mkdir, pwd, rmdir, uname, etc ...)
- Exit status for build in or external command
- POSIX Pipe
- Alias and UnAlias
- PS1 env var can be export
Application
- Use on front of a Unikernel
- Use on front of a minimal Alpine Linux or OpenWrt
- Simplify CI CD
- Use a MicroPython device as a Unix host
Installation
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 On Unix host with MicroPython
$> micropython ./glxshell/glxush.py
******************************* GLXUSH V0.2.6 **********************************
LICENSE WTFPL V2
LOADER MICROPYTHON V1.18.0 MPY 2566
EXEC PYTHON V3.4.0
1.98MB MEMORY SYSTEM
1.91MB FREE
>
On Debian host with Python
$> glxsh
******************************* GLXSH V0.2.6 **********************************
LICENSE WTFPL V2
LOADER CPYTHON 3.9.2.FINAL.0
EXEC PYTHON V3.9.2 (DEFAULT, FEB 28 2021, 17:03:44)
[GCC 10.2.1 20210110]
7.60GB RAM SYSTEM
245.14MB FREE
>
For each command you can get help with man
command line, by exemple for ls
help use man ls
, or call man
without argument for know builtin commands list.
Note: Internal builtins commands have precedence, if a command is not Internal builtins commands then glxshell , call it as subprocess.
> man
Documented commands (type man <topic>):
=======================================
alias cd cp dirname env head mkdir rm tail touch umask
basename chmod date du exit ls mv rmdir tee true unalias
cat clear df echo false man pwd sleep time tty uname
Builtins implemented utilities
- alias
- basename
- cat
- cd
- chmod
- clear
- cp
- date
- df
- dirname
- du
- echo
- env
- exit
- false
- head
- ls
- mkdir
- mv
- pwd
- rm
- rmdir
- sleep
- tail
- tee
- time
- touch
- true
- tty
- umask
- unalias
- uname
Roadmap
- implement the POSIX utility as describe by the OpenGroup
- Background Task
- Implement reserved POSIX environment variable name (HOME, PS1, etc)
- deal with env and export
- better one-file binary distribution
- Load setting from a configuration file
- Have no dependency from outside
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file galaxie-shell-0.2.6.tar.gz
.
File metadata
- Download URL: galaxie-shell-0.2.6.tar.gz
- Upload date:
- Size: 89.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44e3528d8fa03dbcccb6868b368933d885617d54eaee9373fb1afb64b943074a |
|
MD5 | 77daa49f8b76876b658495047b2fcd64 |
|
BLAKE2b-256 | 568443e26b8e1b6a6938221e8a790664df112dfb4972b775fe64c44d96e48584 |