prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Is it possible to use prompt-toolkit to implement these modern CLI tools ??
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Prompt-toolkit supports prompt ui and fullscreen ui. But there is another partial fullscreen ui, I don't know how to implement it with prompt-toolkit.
FZF:
When I input:
cd `find . -type d | fzf --height 30% --reverse`
fzf will use stderr to render it's ui and write the result to stdout:

As you see, with --height 30% parameter, fzf will not occupy the fullscreen and will resue only a region of current screen to display it's ui widget. When I press enter and accept a path. fzf will clear the region it used, and restore the cursor position for me:

Then cd command get the output from fzf and take it as an argument.
Deer
Deer is a ranger like zsh plugin, it can be used as a file picker:
When I input cd <alt+k>, deer will display it's widgets under current line:

After picking a path, deer will close (clear it's ui) and restore cursor position and paste it's result:

Question
Both fzf and deer are widely used command line tools today, they are not traditional prompt program and still not traditional fullscreen application.
I really want to know is it possible to use prompt_toolkit to implement sth like fzf or deer ??
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing prompt-toolkit's existing prompt UI and fullscreen UI capabilities, then compare them with the fzf and deer behaviors described here. Determine whether partial-screen rendering, stderr/stdout interaction, clearing the used region, cursor restoration, and result insertion are supported; completion would require a documented implementation path or a clearly scoped feature.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100