npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sat-driver

v1.0.52

Published

sat-driver

Readme

sat-driver

使用示例

const {native, smartapp} = require('sat-driver');

const main = async () => {
    // === 真机类操作 ===
    // 设置我用的手机类型是 android (如果你的安卓手机用录制回放本地工具装了 U2,则填写:androidU2)
    await native.setPlatform('android');

    // 设置我的手机设备号是 37bf1128(通过 adb devices 获取)
    await native.setDevice('37bf1128');

    // 获取设备相关信息
    let deviceInfo = await native.deviceInfo();

    // 反转设备端口到 PC
    await native.reverse(8090, 8090);

    // 获取设备的 native dom
    let nativeDom = await native.source();

    // 设备截屏
    let screenshot = await native.screenshot();

    // 检查设备网络是否联通
    await native.checkNet();

    // 判断设备上是否存在某个文件
    let isFileExist = await native.isFileExist('/data/local/atx-agent');
    console.log(isFileExist);

    // 判断设备上某个进程是否存在
    let isProcessExist = await native.isProcessExist('/data/local/atx-agent');

    // 获取设备上安装的 APP 列表
    let appInstalled = await native.appInstalled();

    // 判断设备上某个 APP 是否安装
    let isInstall = await native.isAppInstall('dd');

    // 通过百度 APP 调起小程序
    await native.launchSmartapp('com.baidu.searchbox', 'eaoFEHVP9V2ZdGQGnSZAOnNqqy3eH9QC');

    // 检查异常弹框
    let exceptPopName = await native.checkExceptPop();

    // 点除弹框
    let clearedPopName = await native.clearPops();

    // === 小程序类操作 ===

    // 初始化句柄,设置 sat-agent 地址
    let handler = await smartapp('127.0.0.1', '8090');

    // 设置要操控的小程序信息
    handler.set({
        deviceType: 'android', // 设备类型(android 就是 android)
        deviceId: '37bf1128', // 设备 ID
        appKey: 'P9V2ZdGQGnSZAOnNqqy3eH9QC' // 小程序 appKey
    });

    // 获取小程序所在系统信息(可以用来判断小程序是否成功连接)
    let systemInfo = await handler.getSystemInfo();
};

main();

能力列表

native 操控能力

  • 获取设备信息 [deviceInfo] android | androidU2
  • 反转设备端口 [reverse] android | androidU2
  • 获取设备 native dom [source] android | androidU2
  • 进行设备截屏 [screenshot] android | androidU2
  • 检查设备网络 [checkNet] android | androidU2
  • 调起小程序
  • 判断文件是否存在
  • 判断进程是否存在
  • APP 安装列表
  • 安装 APP
  • 杀死进程
  • 屏幕点击
  • 获取默认输入法
  • 切换输入法
  • 输入文本
  • 输入事件
  • 滑动
  • 获取 APP 信息
  • 调起 APP
  • 获取设备当前状态信息
  • 判断页面元素是否存在
  • 通过 Xpath 点击元素
  • 通过 Xpath 获取元素位置
  • 点除弹框
  • 检查异常弹框