{"_id":"@aweray/awesun-cli","_rev":"6-06190e6cb1f127a5a0429a842dfaa7f5","name":"@aweray/awesun-cli","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@aweray/awesun-cli","version":"1.0.0","license":"UNLICENSED","_id":"@aweray/awesun-cli@1.0.0","maintainers":[{"name":"liuchanghuang","email":"liuchanghuang1@oray.com"},{"name":"ordev-npm","email":"dev@oray.com"}],"os":["win32","darwin","linux"],"bin":{"awesun-cli":"run.js"},"cpu":["x64","arm64","ia32"],"dist":{"shasum":"26f09bdeec0325d508d7fd0e82defc83638ca29a","tarball":"https://registry.npmjs.org/@aweray/awesun-cli/-/awesun-cli-1.0.0.tgz","fileCount":6,"integrity":"sha512-w1V71fLwbFR8kbvxy4a+QNSMzXG5pmYI3E7MD63iNcUMQBtZBoScd6I8AHnx3L+CT2LJ6Ts4W/aBz1VKOfVX2w==","signatures":[{"sig":"MEQCIFC0NStmwD67XH6LJQ6qpUOoPCTMRNQSDjoVv96kQAiJAiBp0IbcLfoKMVWji8ajEAfSQUsaC65xqVLjx1cgu6lzZQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19714},"gitHead":"76f82dfb681a064daef00d124a038a9d65bb735d","private":false,"scripts":{"preinstall":"node preinstall.js","postinstall":"node install.js","preuninstall":"node uninstall.js"},"_npmUser":{"name":"liuchanghuang","email":"liuchanghuang1@oray.com"},"_npmVersion":"11.6.4","description":"Awesun remote control CLI tool","directories":{},"_nodeVersion":"24.9.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/awesun-cli_1.0.0_1781000227064_0.8640856937814712","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aweray/awesun-cli","version":"1.0.1","license":"UNLICENSED","_id":"@aweray/awesun-cli@1.0.1","maintainers":[{"name":"zhuozhibin","email":"zhuozhibin_8315@oray.com"},{"name":"wenzewoo","email":"wenzewoo@gmail.com"},{"name":"liuchanghuang","email":"liuchanghuang1@oray.com"},{"name":"ordev-npm","email":"dev@oray.com"}],"os":["win32","darwin","linux"],"bin":{"awesun-cli":"run.js"},"cpu":["x64","arm64","ia32"],"dist":{"shasum":"33cbac926e8f7b101862eb40b281ac5819ee080f","tarball":"https://registry.npmjs.org/@aweray/awesun-cli/-/awesun-cli-1.0.1.tgz","fileCount":6,"integrity":"sha512-W1Ba+wBL/DSDJC+Dco+7MyfaFI6OPvihmqCP1iMe+FhOsae5GIF+OkqV7C3yXX8aF9LJ2bvKyWwlgYbruY5Xvw==","signatures":[{"sig":"MEUCIQD47oNyuAk7Y3dJYB1B7uoX79A7pOZmpY6+8mbjPkDmbwIgEiVhC5LAjxfEjH+cYYUaL9OZexRv4ABER2p3EX0wmD0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19576},"gitHead":"05f37a4b4504947997f00787a7592b1c844ca5af","private":false,"scripts":{"preinstall":"node preinstall.js","postinstall":"node install.js","preuninstall":"node uninstall.js"},"_npmUser":{"name":"wenzewoo","email":"wenzewoo@gmail.com"},"_npmVersion":"11.9.0","description":"Awesun remote control CLI tool","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/awesun-cli_1.0.1_1783567023757_0.15347311101811645","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aweray/awesun-cli","version":"1.0.2","license":"UNLICENSED","_id":"@aweray/awesun-cli@1.0.2","maintainers":[{"name":"zhuozhibin","email":"zhuozhibin_8315@oray.com"},{"name":"wenzewoo","email":"wenzewoo@gmail.com"},{"name":"liuchanghuang","email":"liuchanghuang1@oray.com"},{"name":"ordev-npm","email":"dev@oray.com"}],"os":["win32","darwin","linux"],"bin":{"awesun-cli":"run.js"},"cpu":["x64","arm64","ia32"],"dist":{"shasum":"5c5039375527f52e013160cfcc2e38c639920b53","tarball":"https://registry.npmjs.org/@aweray/awesun-cli/-/awesun-cli-1.0.2.tgz","fileCount":6,"integrity":"sha512-tQhVsisoJGbcIdKFRvRMVSh8h53QUqaiaMX8lP11SHcqUp6GKje6+cNzxFDGbVbP7+zF1hi6l8bfgGPPYbXh8Q==","signatures":[{"sig":"MEUCIG9WYsPHdGbEscjSDbxEWcg5wLp1jEB+A992l3Qiw7rjAiEA6Cq+X76G7hehMfL2gdqIJNcA/6cyMP6fNvso8NW8LHg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20537},"gitHead":"bbdab38526a715128b0536b5f30708e451ff8e5d","private":false,"scripts":{"preinstall":"node preinstall.js","postinstall":"node install.js","preuninstall":"node uninstall.js"},"_npmUser":{"name":"wenzewoo","email":"wenzewoo@gmail.com"},"_npmVersion":"11.9.0","description":"AweSun (向日葵) 远程控制命令行工具，支持设备管理、远程桌面控制、文件传输、端口转发、SSH 等功能的跨平台 CLI，支持Windows/macOS/Linux多平台","directories":{},"_nodeVersion":"24.14.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/awesun-cli_1.0.2_1785406499446_0.6851914703474433","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@aweray/awesun-cli","version":"1.0.3","description":"AweSun (向日葵) 远程控制命令行工具，支持设备管理、远程桌面控制、文件传输、端口转发、SSH 等功能的跨平台 CLI，支持Windows/macOS/Linux多平台","bin":{"awesun-cli":"run.js"},"scripts":{"postinstall":"node install.js","preinstall":"node preinstall.js","preuninstall":"node uninstall.js"},"os":["win32","darwin","linux"],"cpu":["x64","arm64","ia32"],"license":"UNLICENSED","private":false,"gitHead":"c45a450c5dcf18960e31e2ea30521b79b54fbeca","_id":"@aweray/awesun-cli@1.0.3","_nodeVersion":"24.9.0","_npmVersion":"11.6.4","dist":{"integrity":"sha512-dy52lvnYxKQnp5TMehH/t6dRWjH1kF6HjePIA7TmlXYl3+WK+j1JYn+iGFKDNFtFeI7YgknVnaOY6FNWwB/iog==","shasum":"817c52b1830672e317fd81188036db4464ab6b72","tarball":"https://registry.npmjs.org/@aweray/awesun-cli/-/awesun-cli-1.0.3.tgz","fileCount":6,"unpackedSize":22935,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHYsNSSEPdTKRMho9JUtCyqql0RWBhSB8L9tumJEsyp6AiEA+fVVrjc1vKAFpOku6qmvdx/57zowvbxGrOrLBhljDXI="}]},"_npmUser":{"name":"liuchanghuang","email":"liuchanghuang1@oray.com"},"directories":{},"maintainers":[{"name":"zhuozhibin","email":"zhuozhibin_8315@oray.com"},{"name":"wenzewoo","email":"wenzewoo@gmail.com"},{"name":"liuchanghuang","email":"liuchanghuang1@oray.com"},{"name":"ordev-npm","email":"dev@oray.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/awesun-cli_1.0.3_1788144022074_0.7500361772668247"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-09T10:17:06.839Z","modified":"2026-08-31T02:40:22.625Z","1.0.0":"2026-06-09T10:17:07.199Z","1.0.1":"2026-07-09T03:17:03.888Z","1.0.2":"2026-07-30T10:14:59.590Z","1.0.3":"2026-08-31T02:40:22.467Z"},"license":"UNLICENSED","description":"AweSun (向日葵) 远程控制命令行工具，支持设备管理、远程桌面控制、文件传输、端口转发、SSH 等功能的跨平台 CLI，支持Windows/macOS/Linux多平台","maintainers":[{"name":"zhuozhibin","email":"zhuozhibin_8315@oray.com"},{"name":"wenzewoo","email":"wenzewoo@gmail.com"},{"name":"liuchanghuang","email":"liuchanghuang1@oray.com"},{"name":"ordev-npm","email":"dev@oray.com"}],"readme":"# AweSun CLI\r\n\r\nAweSun CLI is the official command-line tool for managing and accessing devices through AweSun remote desktop services.\r\n\r\n## Features\r\n\r\n- Account login and logout\r\n- Device management (list, search, add, update, delete, grant permissions)\r\n- Remote session management (desktop, file, command line, SSH, port forwarding)\r\n- Desktop control (mouse, keyboard, text input)\r\n- File transfer (upload/download, directory listing)\r\n- Port forwarding configuration\r\n- Wake-on-LAN\r\n- Background daemon service management\r\n- Cross-platform support\r\n\r\n## Installation\r\n\r\nInstall globally using npm:\r\n\r\n```bash\r\nnpm install -g @aweray/awesun-cli\r\n```\r\n\r\n## Supported Platforms\r\n\r\n| Platform | Architectures |\r\n|----------|---------------|\r\n| macOS    | Intel (x86_64), Apple Silicon (arm64) |\r\n| Linux    | x86_64, arm64 |\r\n| Windows  | x64, x86, arm64 |\r\n\r\n## Quick Start\r\n\r\n### Login\r\n\r\n```bash\r\n# QR code login (opens a browser for QR authentication)\r\nawesun-cli login --qrcode\r\n\r\n# QR code login (print URL instead of opening browser)\r\nawesun-cli login --qrcode --url\r\n\r\n# Username/password login\r\nawesun-cli login --user <username>\r\n```\r\n\r\n### List Devices\r\n\r\n```bash\r\nawesun-cli device ls\r\n```\r\n\r\n### Connect to a Remote Device\r\n\r\n```bash\r\nawesun-cli session connect --remote-id <remote-id> --type desktop\r\n```\r\n\r\n### Logout\r\n\r\n```bash\r\nawesun-cli logout\r\n```\r\n\r\n### Stop Background Service\r\n\r\n```bash\r\nawesun-cli stop-daemon\r\n```\r\n\r\n## Command Reference\r\n\r\n### Global Options\r\n\r\n| Option | Short | Description |\r\n|--------|-------|-------------|\r\n| `--output` | `-o` | Output format: `table`, `json`, `yaml`, `wide` |\r\n| `--verbose` | `-v` | Verbose mode (enable debug logging) |\r\n| `--help` | `-h` | Show help |\r\n\r\n### Account Management\r\n\r\n```bash\r\n# Login\r\nawesun-cli login --user <username>\r\nawesun-cli login --qrcode\r\n\r\n# Login (print URL instead of opening browser)\r\nawesun-cli login --qrcode --url\r\n\r\n# Check login status\r\nawesun-cli login status\r\n\r\n# Logout (use --clean to clear all credentials)\r\nawesun-cli logout [--clean]\r\n```\r\n\r\n### Device Management\r\n\r\n```bash\r\n# List devices\r\nawesun-cli device ls [--limit N] [--page P]\r\n\r\n# Search devices\r\nawesun-cli device search <keyword> [--limit N] [--page P]\r\n\r\n# Get device info\r\nawesun-cli device info <remote-id>\r\n\r\n# Add a device\r\nawesun-cli device add --name <name> --desc <desc>\r\n\r\n# Update a device\r\nawesun-cli device update <remote-id> --name <name> --desc <desc>\r\n\r\n# Remove a device\r\nawesun-cli device rm <remote-id>\r\n\r\n# Manage device access permissions\r\nawesun-cli device grant \\\r\n  [--remote-id ID] \\\r\n  [--password|-p pwd] \\\r\n  [--username|-u user] \\\r\n  [--remove] \\\r\n  [--remove-all] \\\r\n  [--file PATH]\r\n\r\n# Shutdown remote device\r\nawesun-cli device shutdown <remote-id> [--password|-p pwd] [--username|-u user]\r\n\r\n# Restart remote device\r\nawesun-cli device restart <remote-id> [--password|-p pwd] [--username|-u user]\r\n\r\n# Wake-on-LAN\r\nawesun-cli device wakeup <remote-id>\r\n```\r\n\r\n> **Note**: `shutdown`/`restart` without password will prompt for access password; with `--username` will prompt for system password.\r\n\r\n### Session Management\r\n\r\n```bash\r\n# List sessions\r\nawesun-cli session ls [--type TYPE]\r\n\r\n# Connect to a remote device\r\nawesun-cli session connect \\\r\n  --type <desktop|file|ssh|cmd|forward> \\\r\n  (--remote-id ID | --fastcode CODE) \\\r\n  [--username USER] \\\r\n  [--interactive]\r\n\r\n#   --fastcode: prompts for access password\r\n#   --remote-id: prompts for access password by default\r\n#   --remote-id + --username: prompts for system password\r\n#   --fastcode + --interactive: no password; wait for the controlled\r\n#       device to confirm, 60s timeout\r\n\r\n# Check session status\r\nawesun-cli session status <session-id>\r\n\r\n# Disconnect a session\r\nawesun-cli session disconnect <session-id>\r\n\r\n# Execute a command in a session\r\nawesun-cli session exec <session-id> <command> [args...]\r\n\r\n# Take a screenshot\r\nawesun-cli session screenshot <session-id> [--output PATH]\r\n```\r\n\r\n### Desktop Control\r\n\r\n```bash\r\n# Mouse click\r\nawesun-cli desktop mouse click <session-id> \\\r\n  --x X --y Y \\\r\n  [--button left|right|middle] \\\r\n  [--clicks N]\r\n\r\n# Mouse move\r\nawesun-cli desktop mouse move <session-id> --x X --y Y\r\n\r\n# Mouse scroll\r\nawesun-cli desktop mouse scroll <session-id> \\\r\n  --x X --y Y \\\r\n  --direction up|down \\\r\n  --count N\r\n\r\n# Mouse drag\r\nawesun-cli desktop mouse drag <session-id> \\\r\n  --path \"x1,y1,x2,y2,...\" \\\r\n  --button B \\\r\n  [--hold-keys KEYS]\r\n\r\n# Type text\r\nawesun-cli desktop type <session-id> <text> [--delay MS]\r\n\r\n# Paste text\r\nawesun-cli desktop paste <session-id> <text>\r\n\r\n# Key combo (e.g. Ctrl+Alt+Del)\r\nawesun-cli desktop key combo <session-id> --keys K1,K2,... [--delay MS]\r\n\r\n# Key press/release\r\nawesun-cli desktop key press <session-id> --keys K1,K2,... [--press down|up]\r\n```\r\n\r\n### File Management\r\n\r\n```bash\r\n# List directory contents\r\nawesun-cli file ls <session-id> [--path PATH] [--limit N] [--keyword KEY]\r\n\r\n# Create directory\r\nawesun-cli file mkdir <session-id> --path PATH --name NAME\r\n\r\n# Remove file or directory (-r for recursive)\r\nawesun-cli file rm <session-id> --path PATH [-r]\r\n\r\n# Rename/move file\r\nawesun-cli file mv <session-id> --path PATH --new-name NAME\r\n\r\n# Transfer files (upload/download)\r\nawesun-cli file transfer <session-id> \\\r\n  --type up|down \\\r\n  --local PATH \\\r\n  --remote PATH \\\r\n  [--override]\r\n\r\n# Check transfer status\r\nawesun-cli file transfer status <session-id> [--transfer-id ID]\r\n\r\n# Cancel a transfer\r\nawesun-cli file transfer cancel <session-id> [--transfer-id ID]\r\n```\r\n\r\n### Port Forwarding\r\n\r\n```bash\r\n# Configure port forwarding channels\r\nawesun-cli forward config <session-id> --channels JSON\r\n```\r\n\r\n### SSH\r\n\r\n```bash\r\n# Get SSH connection address\r\nawesun-cli ssh address <session-id>\r\n```\r\n\r\n### Remote Command Line (cmd)\r\n\r\nOpen a command-line session to a remote device, then run commands in it.\r\n\r\n```bash\r\n# Connect a command-line session (prompts for access password)\r\nawesun-cli session connect --remote-id <remote-id> --type cmd\r\n\r\n#   --type cmd opens a command-line session (cmd2 is also accepted)\r\n#   --fastcode CODE can be used instead of --remote-id\r\n\r\n# Run a command in the session (the session-id is shown by `session connect`)\r\nawesun-cli session exec <session-id> <command> [args...]\r\n\r\n# Run a command with arguments\r\nawesun-cli session exec <session-id> dir C:\\Users\r\n\r\n# Disconnect the command-line session\r\nawesun-cli session disconnect <session-id>\r\n```\r\n\r\nExample:\r\n\r\n```text\r\n$ awesun-cli session connect --remote-id 1 --type cmd\r\nAccess password for remote 1:\r\nSESSION_ID  STATUS      TYPE\r\n1           connected\r\n\r\n$ awesun-cli session exec 1 whoami\r\nSTATUS  MESSAGE\r\nOK      example-pc\\administrator\r\n```\r\n\r\n> **Note**: `session exec` only works on `cmd`/`cmd2` sessions. The `STATUS` column reports `OK` on success or `FAIL` on error, and the command output is shown under `MESSAGE`.\r\n\r\n### Utility\r\n\r\n```bash\r\n# Stop the background daemon service\r\nawesun-cli stop-daemon\r\n\r\n# Clear configuration cache\r\nawesun-cli config clean-cache\r\n```\r\n\r\n### Interactive Mode\r\n\r\n```bash\r\nawesun-cli --interact\r\n# or\r\nawesun-cli -i\r\n```\r\n\r\n## Examples\r\n\r\n### Login and Connect to a Device\r\n\r\n```bash\r\n# Login\r\nawesun-cli login --user myaccount\r\n\r\n# List devices\r\nawesun-cli device ls\r\n\r\n# Connect to desktop\r\nawesun-cli session connect --remote-id 12345 --type desktop\r\n\r\n# Take a screenshot\r\nawesun-cli session screenshot <session-id> --output ~/Desktop/screenshot.png\r\n```\r\n\r\n### File Transfer\r\n\r\n```bash\r\n# Connect file session\r\nawesun-cli session connect --remote-id 12345 --type file\r\n\r\n# List remote files\r\nawesun-cli file ls <session-id> --path /home/user/documents\r\n\r\n# Download a file\r\nawesun-cli file transfer <session-id> \\\r\n  --type down \\\r\n  --remote /home/user/documents/report.pdf \\\r\n  --local ./report.pdf\r\n\r\n# Upload a file\r\nawesun-cli file transfer <session-id> \\\r\n  --type up \\\r\n  --local ./photo.jpg \\\r\n  --remote /home/user/Pictures/photo.jpg\r\n```\r\n\r\n### Remote Desktop Control\r\n\r\n```bash\r\n# Connect desktop session\r\nawesun-cli session connect --remote-id 12345 --type desktop\r\n\r\n# Move mouse to position (100, 200)\r\nawesun-cli desktop mouse move <session-id> --x 100 --y 200\r\n\r\n# Left click at (100, 200)\r\nawesun-cli desktop mouse click <session-id> --x 100 --y 200\r\n\r\n# Type text\r\nawesun-cli desktop type <session-id> \"Hello, World!\"\r\n\r\n# Send Ctrl+Alt+Del\r\nawesun-cli desktop key combo <session-id> --keys 17,18,46\r\n```\r\n\r\n### SSH Access\r\n\r\n```bash\r\n# Connect SSH session\r\nawesun-cli session connect --remote-id 12345 --type ssh\r\n\r\n# Get SSH address\r\nawesun-cli ssh address <session-id>\r\n```\r\n\r\n### Remote Command Line\r\n\r\n```bash\r\n# Connect a command-line session\r\nawesun-cli session connect --remote-id 12345 --type cmd\r\n\r\n# Run a command remotely\r\nawesun-cli session exec <session-id> whoami\r\n\r\n# Run a command with arguments\r\nawesun-cli session exec <session-id> ipconfig /all\r\n```\r\n\r\n## Logs\r\n\r\nLog files are stored in:\r\n\r\n### macOS / Linux\r\n\r\n```text\r\n~/awesun-cli/log/\r\n```\r\n\r\n### Windows\r\n\r\n```text\r\n%USERPROFILE%\\awesun-cli\\log\\\r\n```\r\n\r\n## Notes\r\n\r\n- During installation, the package automatically downloads the appropriate native binary for your operating system and architecture.\r\n- The CLI runs a background daemon service for session management. The service starts automatically on demand and can be stopped with `awesun-cli stop-daemon`.\r\n- No manual setup is required after installation.\r\n- Enable verbose mode (`-v` or `--verbose`) for debug-level logging to diagnose issues.\r\n\r\n## License\r\n\r\nCopyright (c) 2026 Oray Inc. All rights reserved.","readmeFilename":"README.md"}