An open API service indexing awesome lists of open source software.

https://github.com/orbitalshell/orbital-shell

Orbital Shell is a command shell based inspired by bash and POSIX recommendations, coded in C# NET 5.0
https://github.com/orbitalshell/orbital-shell

ansi bash cli command-line-interface command-line-parser command-line-tool command-line-tools csharp engine history interactive linux netcore31 netcore5 netstandard21 orbital posix posix-recommendations shell streams

Last synced: 5 months ago
JSON representation

Orbital Shell is a command shell based inspired by bash and POSIX recommendations, coded in C# NET 5.0

Awesome Lists containing this project

README

          

## Orbital Shell

Orbital Shell is a multi-platform (**windows, linux, macos, arm**) command shell (according to .Net Core supported platforms and APIs compatibilities), inspired by bash and **POSIX** recommendations.

It provides any usual bash shell feature (even if modernized) and 'user friendly' syntaxes allowing to access (get/set/call) C# objects.

Developed using **C# 8 .NET 5.0 - compatible with modules and libraries targeting .NET Core 3.1 and .NET Standard 2.1**



![.NET](https://github.com/OrbitalShell/Orbital-Shell/workflows/.NET/badge.svg?branch=master)
![last commit](https://img.shields.io/github/last-commit/orbitalshell/Orbital-Shell?style=plastic)
![releasever](https://img.shields.io/github/v/release/orbitalshell/Orbital-Shell?style=plastic)
![releasedate](https://img.shields.io/github/release-date/orbitalshell/Orbital-Shell?style=plastic)


![openi](https://img.shields.io/github/issues/orbitalshell/Orbital-Shell)
![closei](https://img.shields.io/github/issues-closed/orbitalshell/Orbital-Shell)
![closei](https://img.shields.io/github/issues-pr/orbitalshell/Orbital-Shell)
![closei](https://img.shields.io/github/issues-pr-closed/orbitalshell/Orbital-Shell)


![toplanguage](https://img.shields.io/github/languages/top/orbitalshell/Orbital-Shell)
![lngcount](https://img.shields.io/github/languages/count/orbitalshell/Orbital-Shell)


![codesize](https://img.shields.io/github/languages/code-size/orbitalshell/Orbital-Shell)
![reposize](https://img.shields.io/github/repo-size/orbitalshell/Orbital-Shell)


[![licence mit](https://img.shields.io/badge/licence-MIT-blue.svg)](license)

**NuGet packages**

package ID
type
NuGet verion ID

libraries

OrbitalShell-ConsoleApp

OrbitalShell-Kernel

OrbitalShell-Kernel-Commands

net5.0 classlib

net5.0 classlib

net5.0 classlib

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-ConsoleApp.svg)](https://www.nuget.org/packages/OrbitalShell-ConsoleApp) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-ConsoleApp.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-Kernel.svg)](https://www.nuget.org/packages/OrbitalShell-Kernel) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-Kernel.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-Kernel-Commands.svg)](https://www.nuget.org/packages/OrbitalShell-Kernel-Commands) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-Kernel-Commands.svg)

modules

OrbitalShell-PromptGitInfo

OrbitalShell-DoomFireAlgo

shell module (net5.0)

shell module (net5.0)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-Module-PromptGitInfo.svg)](https://www.nuget.org/packages/OrbitalShell-Module-PromptGitInfo) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-Module-PromptGitInfo.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-Module-DoomFireAlgo.svg)](https://www.nuget.org/packages/OrbitalShell-Module-DoomFireAlgo) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-Module-DoomFireAlgo.svg)

binaries

OrbitalShell

OrbitalShell-win-x64

OrbitalShell-linux-musl-x64

OrbitalShell-linux-x64

OrbitalShell-linux-arm

OrbitalShell-linux-arm64

OrbitalShell-osx-x64

CLI any dotnet platform*

CLI WIN x86

CLI linux MUSL x64

CLI linux x64

CLI linux ARM

CLI linux ARM x64

CLI OSX x64

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell.svg)](https://www.nuget.org/packages/OrbitalShell) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-win-x64.svg)](https://www.nuget.org/packages/OrbitalShell-win-x64) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-win-x64.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-linux-musl-x64.svg)](https://www.nuget.org/packages/OrbitalShell-linux-musl-x64) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-linux-musl-x64.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-linux-x64.svg)](https://www.nuget.org/packages/OrbitalShell-linux-x64) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-linux-x64.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-linux-arm.svg)](https://www.nuget.org/packages/OrbitalShell-linux-arm) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-linux-arm.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-linux-arm64.svg)](https://www.nuget.org/packages/OrbitalShell-linux-arm64) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-linux-arm64.svg)

[![NuGetVersion](https://img.shields.io/nuget/v/OrbitalShell-osx-x64.svg)](https://www.nuget.org/packages/OrbitalShell-osx-x64) ![NuGetDownloads](https://img.shields.io/nuget/dt/OrbitalShell-osx-x64.svg)

**Docker images**

image ID
description
link

orbitalshell/orbital-shell

Linux Ubuntu amd64

https://hub.docker.com/r/orbitalshell/orbital-shell


## About the project

This shell integrates the most usefull shell commands, and is intented to be extended by coding new commands or downloading new commands modules within a repository of modules. Of course it can be entirely customized by using the features integrated to the shell (scripts, functions, commands, aliases, settings, parametrization,...). Having a strong ANSI/VT-100-220-300-500 support, it provides structured and colorized display of data and information (support of ASCII, Unicode and 24 bits colors).

Find any information and documentation about this project on the project's Web Site @ [Orbital SHell Git-Pages](https://orbitalshell.github.io/OrbitalShell/)

                     

Developers and users manuals are available in the project web site @ [Orbital SHell Git-Pages (documentation)](https://orbitalshell.github.io/OrbitalShell/documentation)


## Contribute !

😄 We are looking for **collaborators** 👯 to help for evolving this tool ! If you **like** the **command line**, the **bash** syntax, programming **cli tools**, **parsers**, **data streams**, ANSI, C# 8, batch, and so on... you may like to develop orbital shell! Any idea, suggest, code, feedback is welcomed ! You can directly **FORK** the project @ [https://github.com/OrbitalShell/Orbital-Shell.git](https://github.com/OrbitalShell/Orbital-Shell.git) and start developing to prepare your first pull request, it will be well received. You can also peek **an issue** and start working on. Join the **orbital shell team** and get advantages of the team tools on github. We can contact 💬 by mail, skype and so on...

You can directly **FORK** the project @ [https://github.com/OrbitalShell/Orbital-Shell.git](https://github.com/OrbitalShell/Orbital-Shell.git) and start developing to prepare your first pull request, it will be well received. You can also peek **an issue** and start working on.

Join the **orbital shell team** and get advantages of the team tools on github. We can contact 💬 by mail, skype and so on...

- read the [contribution guide lines](https://github.com/OrbitalShell/Orbital-Shell/blob/master/CONTRIBUTING.md) and the [code of conduct of the project](https://github.com/OrbitalShell/Orbital-Shell/blob/master/CODE_OF_CONDUCT.md)
- read the project README @ [https://github.com/OrbitalShell/Orbital-Shell/blob/master/README.md](https://github.com/OrbitalShell/Orbital-Shell/blob/master/README.md)
- visit the project's web site @ [https://orbitalshell.github.io/Orbital-Shell/](https://orbitalshell.github.io/OrbitalShell/)
- visit the project repository @ [https://github.com/OrbitalShell/Orbital-Shell/](https://github.com/OrbitalShell/Orbital-Shell/)

**Join the project**:

## :fast_forward: :fast_forward: Join the project. You can send a mail to the project team @ [mailto://orbital-shell@outlook.fr](mailto://orbital-shell@outlook.fr) or to the maintener [me](mailto://franck.gaspoz@gmail.com)
- Curious / beginner / intermediate / expert are all welcomed!
- A simple **hello** from you part and you will be welcomed and invited to join the project 👍 !
- A simple **star** on the project main repo and you will also be invited 👋 !
## :fast_forward: :fast_forward: This project is a collaborative work, any one can participate and do anything he wishes 😎 !

There are a various subjects that can be treated:
- .NET 5.0 (C# 8) programming
- develop command line parser
- develop shell commands (find,ls,grep,sed,..: add/improve any command you want!)
- develop shell scripts (.orbsh/.sh)
- Technical documentation
- Automated Tests
- Code review / validation of pull requests
- Design any new feature
- CI/CD (powered by GitHub workflows)
- build binaries / distribs / .nupkg / setups / ...
- Web site development (design, content update, ...)
- Internationalization
- Translates

**The project team like to meet people and wish to share pleasure of programming and technology enthusiasm, with fun and good spirit**



## Features

*a view of the shell running in Windows Terminal*


- Is a '**bash** style' POSIX command shell
![done](https://img.shields.io/badge/done-green?style=plastic)
- The **modules** that are integrated into the shell provide **the most usefull shell commands** (ls/dir,rm,mv,cp,find,echo,clear,more,env,set,export,history,alias,...), tests commands, **text editor command**, and so on... , covering the fields of file system,text files,console output, data management, user input
- modules can contains any item that the shell is intended to handle: commands, **hooks**, scripts/functions, settings, help, doc, assets, ...
![done](https://img.shields.io/badge/done-green?style=plastic)
- dedicated repositories are used to get known modules list
![done](https://img.shields.io/badge/done-green?style=plastic)
- modules are versioned and delivered throught **nupkg** packets, currently hosted at **NuGet**
![done](https://img.shields.io/badge/done-green?style=plastic)
- modules are installed into the binaries of the shell
![done](https://img.shields.io/badge/done-green?style=plastic) ![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/5)
- modules to be loaded are loaded by the shell kernel on user session startup
![done](https://img.shields.io/badge/done-green?style=plastic) ![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/6)
- _The shell command engine implements:_
- A **command line reader** with:
- usual input keyboard shortcuts
![done](https://img.shields.io/badge/done-green?style=plastic) ![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/4)
- auto completion
![todo](https://img.shields.io/badge/todo-orange?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/7)
- input feedback (colorization)
![todo](https://img.shields.io/badge/todo-orange?style=plastic) ![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/8)
- **Streams** standard input (*stdIn*), standard output (*stdOut*), and standard error (*StdErr*)
![done](https://img.shields.io/badge/done-green?style=plastic)
- **Streams redirections** ( **<** **>** )
![uncomplete](https://img.shields.io/badge/uncomplete-darkred?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/9)
- **pipelines** of commands:
- sequences of commands ( **|** ) and conditional sequences of commands ( **&&**, **||** )
![uncomplete](https://img.shields.io/badge/uncomplete-darkred?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/10)
- groups of commands **(** .. **;** .. **)**
![todo](https://img.shields.io/badge/todo-orange?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/11)
- background execution ( **&** )
![todo](https://img.shields.io/badge/todo-orange?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/12)
- commands return a **result code** and can returns **values**
![done](https://img.shields.io/badge/done-green?style=plastic)
- When returning values and when specified, a pipe ( **|** ) between commands can **pass objects instead of streams**
![uncomplete](https://img.shields.io/badge/uncomplete-darkred?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/13)
- **Cancellation** of commands execution **Task** (Ctrl-Z)
![done](https://img.shields.io/badge/done-green?style=plastic)
- **Batches of commands** (scripts)
- traditional batch of shell commands (.sh,.orbsh)
![uncomplete](https://img.shields.io/badge/uncomplete-darkred?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/14)
- C# language scripts (.cssh)
![todo](https://img.shields.io/badge/todo-orange?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/15)
- **Variables**
- Variables can store any data of **any C# object type**
- The command line syntax has been extended to **support an object notation to indicate accessing an object member or invoking an object method**
![uncomplete](https://img.shields.io/badge/uncomplete-darkred?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/16)
- Integrates the os shell **environment variables** (with type **String**)
![done](https://img.shields.io/badge/done-green?style=plastic)
- Are getted and setted with **$** (in any command arg), **set** and **=**
![uncomplete](https://img.shields.io/badge/uncomplete-darkred?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/17)
- **Functions** can be defined by a **shell script** or by a **C# compiled source**
![todo](https://img.shields.io/badge/todo-orange?style=plastic)![issue](https://img.shields.io/github/issues/detail/state/orbitalshell/Orbital-Shell/18)
- **Aliases** for command names
![done](https://img.shields.io/badge/done-green?style=plastic)
- **Shell environment** : the shell initialization feature deploy and setup a shell environment for the current user (profile folder and initialization scripts: *.profile*,*.alias*,*.history*,*.orbsh*)
![done](https://img.shields.io/badge/done-green?style=plastic)
- **Extensibility**:
- The default command line grammar can be changed to get other syntaxes (***zsh***, ***DOS***,...) or a new one
![done](https://img.shields.io/badge/done-green?style=plastic)
- The command line engine can be overriden and extended to enhance the existing features (auto complete inputs,parsing inputs,running commands,...)
![done](https://img.shields.io/badge/done-green?style=plastic)
- **A simple way to define shell commands** using C# method and parameters attributes, avoiding the developer to handle syntax analyzing and shell integration (command help, pipelines, standard stream redirections) councerns, allowing to support either simple values types (int,float,string,date time,..) and object types (even generic collection), and that can interacts together and with the shell throught data objects
![done](https://img.shields.io/badge/done-green?style=plastic)

``` csharp
// a Unix rm command implementation:
[Command("remove file(s) and/or the directory(ies)")]
public
CommandResult<(List items, FindCounts counts)>
Rm(
CommandEvaluationContext context,
[Parameter("file or folder path")] WildcardFilePath path,
[Option("r", "recurse", "also remove files and folders in sub directories")] bool recurse,
[Option("i", "interactive", "prompt before any removal")] bool interactive,
[Option("v", "verbose", "explain what is being done")] bool verbose,
[Option("e", "delete-empty", "remove empty directories")] bool rmEmptyDirs,
[Option("s", "short", "short display: do not print file system attributes when verbose")] bool noattributes,
[Option("m", "simulate", "don't remove any file/or folder, just simulate the operation (enable verbose)")] bool simulate
)
{
var r = new List();
var counts = new FindCounts();
if (path.CheckExists(context))
{
var items = FindItems(context, path.FullName, path.WildCardFileName ?? "*", !recurse, true, false, !noattributes, !recurse, null, false, counts, false, false);

/* ... */

return new CommandResult<(List, FindCounts)>((r, counts), ReturnCode.OK);
}
else
return new CommandResult<(List, FindCounts)>((r, counts), ReturnCode.Error);
}
```

- such a command will be auto documented like this by the shell **help command**:


## Orbital shell uses these libraries:

- Microsoft.CodeAnalysis.CSharp.Scripting
- Microsoft.Extensions.ObjectPool
- Microsoft.Extensions.Hosting
- NewtonSoft.Json


## notice / caveat

> The project orbital shell was dependent of the project **DotNetConsoleAppToolkit**. Now the library *DotNetConsoleAppToolkit* project repository is **ARCHIVED** since it has been integrated into the **orbital-shell** project repository as project **OrbitalShell-ConsoleApp**, so it is still under development but code has been moved to this repository
![dot-net-console-app-toolkit](https://img.shields.io/badge/dotnet--console--app--toolkit-repository-lightgrey?style=plastic)
![last commit](https://img.shields.io/github/last-commit/franck-gaspoz/dotnet-console-app-toolkit?style=plastic)
![version](https://img.shields.io/github/v/tag/franck-gaspoz/dotnet-console-app-toolkit?style=plastic)

| :warning: this project might be considered as a toy for old developer




-- | --

*Warning: due to the average age of our main contributors, this project might contains **vintage** architecture,design and code. Nevertheless the source code is intensively based on young devs preferred patterns, C# 8 language usage (intellisense agrees), and it pretends to fit to good practices and architecture guidelines.*