News for hackers. Stuff that matters.
Re:Litecli: CLI for SQLite Databases with auto-completion an... by darkteflon on Wednesday September 11, 2024 @09:03AM (#41510943)
prompt_toolkit looks good. Have you tried Textual? Any thoughts on how they compare?
Re:Litecli: CLI for SQLite Databases with auto-completion an... by senkora on Thursday September 12, 2024 @07:58PM (#41526902)
I haven't tried Textual but I just gave it a look and it seems good as well.

My usecase involves embedding a text editor widget inside my TUI app with vim keybindings enabled, and I don't think that Textual yet has a way to do that. But on the other hand it looks like Textual has a way bigger library of pre-built widgets for full-screen applications.

prompt_toolkit started as a tool for REPLs and eventually grew a basic full-screen application mode, so there's excellent support for text editing and the widget stuff is a lot less mature. It looks like Textual started as a tool for full-screen apps and has a great widget library but the text-editing widget is much less mature.

My application started as a CLI and I gradually added TUI elements around the command bar, and prompt_toolkit is definitely the best for something like that. I think that if your plan is something more similar to a webapp and you want to rely on a component library then Textual would probably be better.