
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
editprompt
Advanced tools
A CLI tool that lets you write prompts for CLI tools using your favorite text editor
A CLI tool that lets you write prompts for CLI tools using your favorite text editor. Works seamlessly with Claude Code, Codex CLI, Gemini CLI, and any other CLI process.
[!IMPORTANT] 📢 Migrating from v0.8.1 or earlier? Please see the Migration Guide for upgrading to v1.0.0's subcommand-based interface.
# Install globally via npm
npm install -g editprompt
# Or use with npx
npx editprompt
For Neovim users, editprompt.nvim provides easy integration. For manual configuration, see docs/neovim.md.
editprompt supports three main workflows to fit different use cases:
The simplest way to use editprompt:
editprompt open to open your editorPerfect for one-off prompts when you need more space than a terminal input line.
For iterating on prompts without constantly reopening the editor:
resume subcommandIdeal for trial-and-error workflows with AI assistants.
> Some AI agents include leading spaces in their output,which can make the copied text look a bit awkward.
<!-- Write your reply here -->
> Using editprompt’s quote mode or capture mode makes it easy to reply while quoting the AI agent’s output.
<!-- Write your reply here -->
For replying to specific parts of AI responses:
editprompt dump to retrieve all collected quotesPerfect for addressing multiple points in long AI responses.
# Use with your default editor (from $EDITOR)
editprompt open
# Specify a different editor
editprompt open --editor nvim
editprompt open -e nvim
# Always copy to clipboard
editprompt open --always-copy
# Show help
editprompt --help
editprompt open --help
bind -n M-q run-shell '\
editprompt resume --target-pane #{pane_id} || \
tmux split-window -v -l 10 -c "#{pane_current_path}" \
"editprompt open --editor nvim --always-copy --target-pane #{pane_id}"'
{
key = "q",
mods = "OPT",
action = wezterm.action_callback(function(window, pane)
local target_pane_id = tostring(pane:pane_id())
-- Try to resume existing editor pane
local success, stdout, stderr = wezterm.run_child_process({
"/bin/zsh",
"-lc",
string.format(
"editprompt resume --mux wezterm --target-pane %s",
target_pane_id
),
})
-- If resume failed, create new editor pane
if not success then
window:perform_action(
act.SplitPane({
direction = "Down",
size = { Cells = 10 },
command = {
args = {
"/bin/zsh",
"-lc",
string.format(
"editprompt open --editor nvim --always-copy --mux wezterm --target-pane %s",
target_pane_id
),
},
},
}),
pane
)
end
end),
},
Note: The -lc flag ensures your shell loads the full login environment, making editprompt available in your PATH.
While editprompt is running, you can send content to the target pane or clipboard without closing the editor. This allows you to iterate quickly on your prompts.
# Run this command from within your editor session
editprompt input -- "your content here"
# Sends content to target pane and moves focus there
editprompt input --auto-send -- "your content here"
# Sends content, automatically submits it (presses Enter), and returns focus to editor pane
# Perfect for iterating on prompts without leaving your editor
editprompt input --auto-send --send-key "C-m" -- "your content here"
# Customize the key to send after content (tmux format example)
# WezTerm example: --send-key "\r" (default for WezTerm is \r, tmux default is Enter)
This sends the content to the target pane (or clipboard) while keeping your editor open, so you can continue editing and send multiple times.
Options:
--auto-send: Automatically sends the content and returns focus to your editor pane (requires multiplexer)--send-key <key>: Customize the key to send after content (requires --auto-send)
Enter (default), C-a, etc.\r (default), \x01, etc.For Neovim users, we recommend using editprompt.nvim for easy setup. For manual configuration, see docs/neovim.md.
Send individual key inputs to the target pane without leaving your editor. Useful for responding to AI agent selection prompts (e.g., choosing option 1, 2, 3, 4) without switching panes.
# Send a character key
editprompt press -- 1
# Send special keys (tmux format)
editprompt press -- Tab
editprompt press -- Up
editprompt press -- C-m # Enter
editprompt press -- C-c # Ctrl+C
# Send with delay
editprompt press --delay 500 -- Tab
Key differences from input:
Key notation depends on your multiplexer:
| Key | tmux | WezTerm |
|---|---|---|
| Enter | C-m | \r |
| Tab | Tab | \t |
| Escape | Escape | \x1b |
| Arrow Up/Down | Up / Down | \x1b[A / \x1b[B |
Add this keybinding to your .tmux.conf to collect selected text as quotes:
bind-key -T copy-mode-vi C-e { send-keys -X pipe "editprompt collect --target-pane #{pane_id}" }
Usage:
prefix + [)Ctrl-e to add the selection as a quoteAdd this event handler and keybinding to your wezterm.lua to collect selected text as quotes:
local wezterm = require("wezterm")
wezterm.on("editprompt-collect", function(window, pane)
local text = window:get_selection_text_for_pane(pane)
local target_pane_id = tostring(pane:pane_id())
wezterm.run_child_process({
"/bin/zsh",
"-lc",
string.format(
"editprompt collect --mux wezterm --target-pane %s -- %s",
target_pane_id,
wezterm.shell_quote_arg(text)
),
})
end)
return {
keys = {
{
key = "e",
mods = "CTRL",
action = wezterm.action.EmitEvent("editprompt-collect"),
},
},
}
Usage:
Ctrl-e to add the selection as a quoteRun this command from within your editor pane to retrieve all collected quotes:
editprompt dump
This copies all collected quotes to the clipboard and clears the buffer, ready for your reply.
Complete workflow:
Ctrl-eeditprompt dumpHow quote buffering works:
> in markdown quote formatYou can send content to multiple target panes simultaneously by specifying --target-pane multiple times:
# Send to multiple panes with open subcommand
editprompt open --target-pane %1 --target-pane %2 --target-pane %3
# Register multiple target panes for use with resume and input modes
editprompt register --target-pane %1 --target-pane %2
The content will be sent sequentially to all specified panes. This is useful when you want to send the same prompt to multiple CLI sessions.
Store prompts temporarily for later use, similar to git stash. This is useful when you want to save a prompt idea and use it later.
# Save a prompt to stash (must be run from editor pane)
editprompt stash push -- "your prompt here"
# List all stashed prompts (JSON output)
editprompt stash list
# Get the latest stashed prompt (outputs to stdout)
editprompt stash apply
# Get a specific stashed prompt by key
editprompt stash apply --key "2025-01-07T12:34:56.789Z"
# Remove the latest stashed prompt
editprompt stash drop
# Get and remove the latest stashed prompt (apply + drop)
editprompt stash pop
Note: The stash commands must be run from within an editprompt editor session (where EDITPROMPT=1 is set). Stash data is associated with the target pane and persisted using the Conf library.
editprompt respects the following editor priority:
--editor/-e command line option$EDITOR environment variablevimeditprompt automatically sets EDITPROMPT=1 when launching your editor. This allows you to detect when your editor is launched by editprompt and enable specific configurations or plugins. For Neovim integration examples, see docs/neovim.md.
You can also pass custom environment variables to your editor:
# Single environment variable
editprompt open --env THEME=dark
# Multiple environment variables
editprompt open --env THEME=dark --env FOO=fooooo
# Useful for editor-specific configurations
editprompt open --env NVIM_CONFIG=minimal
When using the send-without-closing feature or dump, editprompt sets EDITPROMPT_TARGET_PANE to the target pane ID. This is automatically used by editprompt input and editprompt dump commands.
editprompt uses structured logging via LogTape. The following flags are available on all subcommands:
| Flag | Description |
|---|---|
--quiet / -q | Suppress all log output |
--verbose / -v | Enable debug-level log output |
--log-file <path> | Write logs to the specified file (appends) |
You can also configure logging via environment variables:
| Environment Variable | Description |
|---|---|
EDITPROMPT_LOG_FILE | Path to log file (same as --log-file) |
EDITPROMPT_LOG_LEVEL | Log level (e.g. debug, info, warning, error) |
Log level resolution priority:
--quiet → suppresses all logs--verbose → sets level to debugEDITPROMPT_LOG_LEVEL → uses the specified levelinfoWhen using --auto-send with editprompt input, a delay is inserted before sending the key to allow the target process to finish processing the content.
| Environment Variable | Description | Default |
|---|---|---|
EDITPROMPT_SEND_KEY_DELAY | Delay in milliseconds before sending the key | 1000 |
Auto-detection: editprompt automatically adjusts the delay based on content:
EDITPROMPT_SEND_KEY_DELAY (default: 1000 ms)200 msSupported image extensions: .png, .webp, .avif, .jpg/.jpeg, .gif (case-insensitive)
FAQs
A CLI tool that lets you write prompts for CLI tools using your favorite text editor
The npm package editprompt receives a total of 138 weekly downloads. As such, editprompt popularity was classified as not popular.
We found that editprompt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.