Skip to main content

WinUse CLI to control the WinUse Windows agent API.

Project description

WinUse CLI

The WinUse CLI (winuse) is a simple, scriptable wrapper around the WinUse Windows API. It can target a local Windows host or a remote Windows machine over LAN.

Project homepage: github.com/nedos/winuse

Install

pip install winuse-cli

Configure

By default it talks to http://127.0.0.1:8080. Override with:

export WINUSE_HOST="http://192.168.1.100:8080"

Or pass --host per command.

If you are on WSL or behind a proxy, bypass proxies:

export NO_PROXY='*'
export no_proxy='*'

Commands

  • health — check server status
  • windows — list windows
  • active — get active window
  • focus <hwnd>
  • minimize <hwnd>
  • maximize <hwnd>
  • restore <hwnd>
  • screenshot [--hwnd <hwnd>]
  • mouse-move <x> <y> [--duration <seconds>]
  • mouse-click [--x <x>] [--y <y>] [--button left|right|middle] [--clicks N]
  • type <text> [--mode paste|type] [--interval <sec>]
  • paste <text>
  • press <key> [key ...]

Examples

winuse health
winuse windows
winuse active
winuse focus 2293790
winuse screenshot
winuse screenshot --hwnd 2293790
winuse type "Hello from WinUse" --mode paste
winuse paste "Привет, Сам"
winuse press ctrl v
winuse mouse-move 10 10 --duration 0.2
winuse mouse-click --x 10 --y 10 --button left --clicks 1

Integration test helper

From repo root:

scripts/integration_test_cmd_window.sh

That script will:

  • Open Notepad via Win+R
  • Paste a timestamped message
  • Refocus the window
  • Type a suffix character-by-character
  • Capture before/after screenshots

Tips

  • For UTF-8 text, prefer paste or type --mode paste.
  • If a window loses focus, call focus <hwnd> before typing.
  • The CLI prints JSON responses for scripting.

License

MIT. See ../LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

winuse-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

winuse-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file winuse-0.1.0.tar.gz.

File metadata

  • Download URL: winuse-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for winuse-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a8a28c034c1e18c15042f9077562082558d30641692afaadf5d1e5cd5ab65eca
MD5 84729347ea86b329144455d1abcc0255
BLAKE2b-256 d0c0bda33b6b62cd04859384a51ad6252fb1aab3ea6798169209b42e03629df0

See more details on using hashes here.

File details

Details for the file winuse-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: winuse-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for winuse-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3f7ab9f62191fc138d0be603a2b10f1c496a5e600a592c76cf24ab60742da176
MD5 57201b28260ca69dd86121d1c0e25873
BLAKE2b-256 64b500fe9298b2d2d33a964ea33cd9e67e7430521278076bc2f4d07cfe7df870

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page