inp
inp is a tiny cross-platform CLI for basic input automation (mouse + keyboard), built on top of robotgo.
It’s designed to be simple, scriptable, and OS-agnostic for common actions like moving the mouse, clicking, typing, and triggering copy/paste/select-all.
Install
Go install (recommended)
go install github.com/phillip-england/inp@latest
Make sure your GOBIN (or $(go env GOPATH)/bin) is on your PATH.
Verify
inp pos
You should see output like:
123 456
macOS permissions (important)
On macOS, input automation requires Accessibility permissions.
- Open System Settings → Privacy & Security → Accessibility
- Enable access for the terminal app you’re using (Terminal, iTerm2, etc.)
- If you run
inpfrom an IDE or another launcher, that app may also need permission.
If inp appears to do nothing on macOS, it’s almost always permissions.
Usage
General shape:
inp [--delay:N] <command> [args...]
Global flags
--delay:N
Adds a post-command delay of N milliseconds after the command finishes.
Useful when chaining commands in scripts and the OS needs a moment to catch up.
Example:
inp --delay:150 click
Commands
pos
Print the current mouse position as X Y.
inp pos
wait <ms>
Sleep for <ms> milliseconds.
inp wait 500
mov <x> <y>
Move the mouse to (x, y).
inp move 120 800
click
Left click.
inp click
double
Double click (two clicks with a short delay).
inp double
type "text" [MODIFIER ...]
Type a string.
- With no modifiers: uses fast text entry.
- With one or more modifiers: holds the modifier(s) and taps each character.
inp type "hello world"
inp type "v" command # e.g. cmd+v on macOS (acts like pasting 'v' with cmd held)
inp type "a" ctrl # ctrl+a on Windows/Linux (select all in many apps)
Modifiers recognized:
cmd,commandctrl,controlshiftalt,opt,option
press <KEY>
Press (tap) a single key.
inp press enter
inp press tab
inp press escape
inp press backspace
copy
OS-aware copy shortcut:
- macOS:
Command + C - others:
Ctrl + C
inp copy
paste
OS-aware paste shortcut:
- macOS:
Command + V - others:
Ctrl + V
inp paste
selectall
OS-aware select-all shortcut:
- macOS:
Command + A - others:
Ctrl + A
inp selectall
Examples
Click a point after moving there
inp mov 500 300
inp --delay:100 click
Paste into the currently focused app
inp paste
Quick “select all → copy” (OS-agnostic)
inp selectall
inp --delay:75 copy
Basic scripted flow
# Move → click → wait → type
inp move 800 650
inp click
inp wait 150
inp type "hello"
Notes
- Coordinates are screen coordinates as reported by
robotgo. - The
typecommand with modifiers is intentionally more “key-tap” oriented for shortcut reliability (especially on macOS). - If you want higher-level scripting (loops, branching), wrap
inpin your shell scripts or task runner.
License
Add your preferred license here (MIT, Apache-2.0, etc.).