elewis787 / boa Goto Github PK
View Code? Open in Web Editor NEWA Cobra command styled usage and help component powered by bubbletea
License: MIT License
A Cobra command styled usage and help component powered by bubbletea
License: MIT License
currently boa fails to render errors if no /dev/tty is available.
Right now, if you use the help or usage to check subcommands when you exit you no longer see the help for the command you were just looking at. I think it would be useful to print out the usage of that command on exit so you can copy to execute the given command.
It would be nice to provide an example directory that shows the various capabilities of boa.
Need to add a viewport to the content to force a fixed height and allow for vertical scroll.
When selecting a command from the help or usage TUI it would be nice to be able to execute the command directly.
Error: ../../../go/pkg/mod/github.com/elewis787/[email protected]/cmdlist.go:41:8: cannot use func(s string) string {…} (value of type func(s string) string) as func(strs ...string) string value in assignment
I think you need to release a new release for boa
When a command description is large enough, the command title does not align center.
It's really neat that Boa allows for interactive subcommand selection, but (from the GIF), it looks like it exits after you pick the command. It would be really neat if you could use Boa to execute the selected subcommand with the args/flags you'd like.
I'm writing my own Cobra alternative, so I'm super interested in watching your innovation here - I'll probably port it to mine :D
Cannot use a Long on a sub command. There is a check that if it is not the root that the Long field is never displayed.
The subcommand list uses the Short, but when you enter into a subcommand's help menu the Description is also using the Short so you cannot give further information
Hi @elewis787, Nice project
Can you make the AltScreen
is an option ?
like this format
boa.WithAltScreen(false) // or true
Library is installed as recommended in the readme go get -u github.com/elewis787/boa
but it fails to compile as the newest lipgloss version had a breaking change related commit in lipgloss
# github.com/elewis787/boa
C:\Users\Lilith\go\pkg\mod\github.com\elewis787\[email protected]\cmdlist.go:41:8: cannot use func(s string) string {…} (value of type func(s string) string) as func(strs ...string) string value in assignment
Go: 1.20.5
Lipgloss: 0.7.1
Boa: 0.1.1
Currently when a command syntax error is thrown the usage display pops up and hides the underlying syntax error. Once the TUI is closed, the user can see the cobra command error message.
A possible solution for this is to use cmd.SetErr() and supply a io.Writer to capture the commands error output.
This would be an options that could be set via the withOptions
pattern or through a package level variable.
i.e
rootcmd.SetUsageFunc(boa.UsageFunc)
rootcmd.SetErr(boa.ErrWriter)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.