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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@webwisp/lib

v1.4.7

Published

A web agent for automatic end-to-end testing of websites.

Downloads

6

Readme

@webwisp/lib

The full library for the WebWisp agent, which can be used to navigate websites, perform tasks, and test features.

Installation

[!NOTE] The repository mainly uses Bun to manage the project, but any other package manager can be used.

Library

A public library is available for the agent, for integrating it into other projects. It can be installed with the following:

npm install @webwisp/lib

It currently only exposes the Agent class, which can be used to manage the services and spawn runners.

CLI

First, clone the repository and install the dependencies:

git clone [email protected]:brewcoua/webwisp-lib.git
cd webwisp-lib
bun install # Or any other package manager

Then, you can run WebWisp with the following command, depending on your runtime:

npm run start:node
bun run start:bun

This will prioritize running with bun, but if it is not installed, it will default to npm and node.

It can also be built by itself using:

bun run build

and found at ./dist/webwisp.js. Since playwright, openai and winston are kept external, they need to be accessible when running the agent.

[!IMPORTANT] Make sure to install browsers for Playwright to use. This can be done with the following:

npx playwright install # Or 'bunx playwright install'

[!WARNING] The voice flag requires sox to be installed on your system. You can install it with the following:

sudo apt-get install sox libsox-fmt-all # For Linux // Derive it from your package manager
brew install sox # For MacOS

If you are using Windows, you can download the binaries here.

Configuration

The agent can be configured through environment variables. The following environment variables can be set:

  • OPENAI_API_KEY: The OpenAI API key to use for the agent. Required
  • OPENAI_ORG : The OpenAI organization to use for the agent.
  • OPENAI_PROJECT: The OpenAI project to use for the agent.

It also has flags that can be set when using the CLI:

  • --target, -t: The target website to navigate. Will otherwise be prompted.
  • --task, -k: The task to perform on the website. Will otherwise be prompted.
  • --voice, -v: Use voice recognition to get the task to perform. Off by default and overriden by target and task flags.
  • --help: Display the help message.
  • --version, -V: Display the version of the agent.
  • --verbose: Display more information about the agent's actions.

License

This project is licensed under either of the following, at your option:

  • Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.