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

@aicombinator/bot

v0.4.1

Published

Automate complex online tasks using GPT-4 and puppeteer scripts

Downloads

16

Readme

This tool gives AI the 3 big things it's currently missing: Identity, Memory, and Agency. Essentially, it is a personal assistant bot that runs locally, understands tasks in natural language and with a human-reviewed library of composable tasks, can perform complex online tasks across multiple websites and webapps, by driving a browser on your local machine or call APIs when available.

The tasks are described in natural language. For example:

Register myshop.com on Google Domains. Then setup a Shopify website on it. Then post a tweet about it.

This is somewhat similar to the LangChain agents. But this one operates by controlling a real browser with puppeteer scripts. It has the ability to complete signup or login with OTP (SMS or Email) and 2FA tokens, retain and recall data from persistent storage, and even make payments. The aim for this tool is to become a true personal assistant for everyone. And because it uses the web browser like a human would, it doesn't need API access for the websites and webapps. But it does use APIs for many popular sites.

This tool can be launched against either your primary Chrome instance or puppeteer's sandboxed chromium instance. It can be invoked either as a command-line tool or in your custom JavaScript code.

There are two kinds of bots. LocalBot stores their data in a local .json file. CloudBot uses remote storage, which is useful for sharing bot instances within your org etc. When launched from command-line, both kind of bots operate using the local web browser. No data is sent to any remote servers.

Currently, only the high-level script is generated by AI at run-time. The code for individual tasks can be human-coded and human-reviewed for high robustness and correctness. The API pieces are imported from ActivePieces.

Install

Needs NodeJS version 18 or higher:

npm install -g @aicombinator/bot

Usage

On command-line:

Set OpenAI's API key as environment variable: export OPENAI_API_KEY=<api_key>

See the list of available apps: bot --list-apps

Describe your task in natural language: bot "pair device on google sms. Then post on twitter with username foo and password bar and message hello world from aicombinator. Then fetch the top story from hacker news"

If OPENAI_API_KEY is not available, the command will be parsed with a strict syntax (until open-source LLMs arrive):

bot <task> on|to|at|from <site> with <param1_name> <param1_value> and <param2_name> <param2_value>

Necessary params will also be looked up in environment variables and bot's storage.

Options:

--bot: String ID to identify each unique localbot (default `mybot1`)
--token: APIKEY to access a CloudBot's remote storage. Get yours at [aicombinator.app](https://aicombinator.app)
--data-dir: Path to the directory where data for localbots is stored (default `.aicombinator`)

In your custom script. See sample.js.

  const bot = await aicombinator.LocalBot.init({bot_id: 'mybot1', data_dir: null});
  await aicombinator.site.task(bot, {param1_name: 'param1_value', param2_name: 'param2_value'})
  
  // for example:
  await aicombinator.google_sms.pair_device(bot, {});
  await aicombinator.twitter.post(bot, {username:"foo", password:"bar", message: 'Hello world from aicombinator'});
  // To make the bot pause for 5 seconds for the user to manually intervene (for eg: solving captcha):
  await bot.wait(5);

  let stories = await aicombinator.hackernews.fetch_top_stories(bot, {number_of_stories: 1});
  console.log({stories});

Supported sites and apps

The recipes can be both AI-generated but human-reviewed as well as human-coded.

Puppeteer-based recipes:

The following recipes are imported from activepieces actions and use providers' API, not the browser and therefore require auth tokens:

  • airtable
  • asana
  • bannerbear
  • binance
  • blackbaud
  • clickup
  • discord
  • drip
  • dropbox
  • figma
  • gmail
  • googleCalendar
  • googleContacts
  • googleDrive
  • googleSheets
  • googleTasks
  • hackernews
  • hubspot
  • intercom
  • mailchimp
  • openai
  • pipedrive
  • posthog
  • sendgrid
  • slack
  • square
  • stripe
  • telegramBot
  • todoist
  • trello
  • twilio
  • typeform
  • wordpress
  • youtube
  • zoom

The recipes are all open-source so feel free to raise PRs for your favorite sites.