New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable console GUIs with PowerShell #3957

Open
SteveL-MSFT opened this Issue Jun 6, 2017 · 28 comments

Comments

@SteveL-MSFT
Member

SteveL-MSFT commented Jun 6, 2017

As people are going back to the console for management (instead of primarily GUI), we should support curses to enable console based GUIs.

  • out-gridview implementation
  • get-member interactive navigation
  • get-help -showwindow (for this, my suggestion is to not literally implement showwindow, but to improve console rendering of help with interactive navigation)
  • show-command
@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Jun 7, 2017

Show-Command?

@Bartolomeus-649

This comment has been minimized.

Bartolomeus-649 commented Jun 22, 2017

People are not "going back" to consoles for management! They are forced to use it as there is no real alternatives!

@MaximoTrinidad

This comment has been minimized.

MaximoTrinidad commented Jun 22, 2017

In one of the posted issues: #1808

I mention about using Python Tk with PowerShell. I think Python would be a BIG candidate to help overcoming the missing GUI component in PowerShell.

myazuredemo_02_2017-06-11_12-03-51

:)

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Jun 22, 2017

I guess Microsoft love Xamarin 😄

@SteveL-MSFT SteveL-MSFT changed the title from Add curses support to PowerShell to Enable console GUIs with PowerShell Aug 24, 2017

@SteveL-MSFT SteveL-MSFT added this to the 6.1.0 milestone Sep 26, 2017

@SQLDBAWithABeard

This comment has been minimized.

SQLDBAWithABeard commented Oct 6, 2017

Yes to enabling a seperate searchable help window a la -showwindow. That's a useful capability

@megamorf

This comment has been minimized.

Contributor

megamorf commented Jan 11, 2018

Even though I already 👍 this months ago, I wanted to let you guys know that Out-Gridview is a command that lots of people use to quickly preview and filter datasets. It's become a great asset in the typical admin toolbelt :-)

One of my typical use cases is to use Select-FromGridView (which is based on ogv but keeps the objects intact) to manually pick desired items from a collection of VMware Snapshots that I want to delete.

@swngdnz

This comment has been minimized.

swngdnz commented Jan 11, 2018

I view curses as only a stop-gap measure. OGV based on curses is going to be quite weak in comparison to OGV on FullCLR (and yes, I'm another person that uses OGV extensively when developing solutions to examine result data-sets, even though OGV may not end up in my published solution). Whether it's tk or something else, I believe you will need to pick a true xplat gui solution.

@JanMulkens

This comment has been minimized.

JanMulkens commented Jan 11, 2018

Haven't used PS6 yet, but this is going to be missed when i do migrate

@dkateiva

This comment has been minimized.

dkateiva commented Jan 11, 2018

I hope ogv can be implemented in some way. It is really convenient sometimes

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Jan 12, 2018

@swngdnz for "true xplat gui", there's really only two viable solutions: vt100 and html. With vt100, it'll work across SSH, locally, as well as in CloudShell. Html is more limited as it'll only work locally, but it also simpler to implement. I encourage someone from the community to build such a module.

With a curses-type solution, it isn't as limited as you may think. Mouse navigation is supported in addition to keyboard. Yes, the graphics won't be as rich as WPF based, but OGV isn't a graphics intense app.

@Tiberriver256

This comment has been minimized.

Tiberriver256 commented Jan 12, 2018

Possible alternative to curses https://github.com/chjj/blessed

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Jan 12, 2018

Note that @JamesWTruher has already started some work here and we aren't actually using curses but a higher level framework that works on Linux/Mac/Windows. Hopefully we'll have something to show in the next few months.

@Tiberriver256

This comment has been minimized.

Tiberriver256 commented Jan 12, 2018

Cool! Reusable console GUI framework would be awesome! Especially if it supported WPF (XAML) to easily port old GUIs or HTML to make it easy to use.

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Jan 12, 2018

@SteveL-MSFT If "I encourage someone from the community to build such a module." is actual I suggest open new Issue with specifications and "Up-for-Grabs".

@stefanstranger

This comment has been minimized.

stefanstranger commented Jan 12, 2018

Was not the idea that Phosphor would offer something like this?

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Jan 12, 2018

@stefanstranger yes for non-console. Not sure if @daviwil is still working on it, though since it was his side project.

@daviwil

This comment has been minimized.

Contributor

daviwil commented Jan 12, 2018

Nah, unfortunately I haven't had the time. It's possible I could get around to it later this year but maybe someone else will step up and take over before then :)

@fmichaleczek

This comment has been minimized.

fmichaleczek commented Jan 12, 2018

@SteveL-MSFT @JamesWTruher

we aren't actually using curses but a higher level framework that works on Linux/Mac/Windows

Do you develop a new lib or use an old one ?
A lot of existing ncurses library used GPL3.0 licence ( CursesSharp for example )

We need a robust VT100 library for PowerShell project and for community module.

I would like something like this for community :
A sort of ShowUI for Text UI
https://github.com/fmichaleczek/PSClrCli/blob/master/Samples/Sample3.ps1

@JamesWTruher

This comment has been minimized.

Member

JamesWTruher commented Jan 13, 2018

@oising and I started down this path starting with Jexer - https://github.com/klamonte/jexer. Well, @oising did the heavy lifting by converting the java to c#, I got it working on Linux/Mac pretty nicely. I had started with curses but that seemed way, way harder because none of the useful primitives are available and it's all native library interface which just adds more code. I haven't had time to look at it for a couple months.

I pretty much looked at everything (include CursesSharp), jexer is the moral descendant of Borland's tvision (which I remember pretty well). It seemed furthest along

@daviwil

This comment has been minimized.

Contributor

daviwil commented Jan 13, 2018

Sounds exciting Jim, can't wait to see it!

@mattmcnabb

This comment has been minimized.

mattmcnabb commented Jan 14, 2018

@fmichaleczek funny, I was just looking into CLRCLI to implement a POC of Out-Gridview for x-plat. It seems to be pretty well developed already and works in .NET core.

@oising

This comment has been minimized.

Contributor

oising commented Jan 15, 2018

@mattmcnabb It's not a bad looking library. Sadly it won't work over stream oriented connections such as ssh, raw sockets, telnet, x11/xterm etc. And the console APIs are dog slow :( Jexer (now Nexer) generates everything with ansi x3.64/ecma48 sequences, and does it with native C# - no external libraries. It's looking pretty promising so far.

@it-praktyk

This comment has been minimized.

Contributor

it-praktyk commented Jan 15, 2018

CRCLI looks good.

@gulshan

This comment has been minimized.

gulshan commented Oct 19, 2018

@migueldeicaza has gui.cs targeting .net core.

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Oct 19, 2018

@gulshan yes, we've explicitly been looking at gui.cs, but it doesn't currently have all the controls needed to port out-gridview (for example), but as a general library, I don't see any reason why someone wouldn't start using it today in their module

@MaximoTrinidad

This comment has been minimized.

MaximoTrinidad commented Oct 19, 2018

Hum!! @SteveL-MSFT ... does this count as a "Experimental Flag" feature.
I'm up for it!

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Oct 20, 2018

@MaximoTrinidad in this case, you can write a module that uses gui.cs for rendering and it would not need to be behind an Experimental Flag because it should be a new cmdlet (call it something other than Out-GridView, maybe Show-GridView?) without any PowerShell engine changes.

@iSazonov

This comment has been minimized.

Collaborator

iSazonov commented Oct 20, 2018

New name will difficult to discover. Perhaps it should be proxy to add new parameter -gui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment