Skip to content

Commit

Permalink
📝 Add docs for commands
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Apr 15, 2020
1 parent 34fcb75 commit 093061a
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Natural-language web automation using [Puppeteer](https://github.com/puppeteer/p

[![npm](https://nodei.co/npm/puppet.png)](https://www.npmjs.com/package/puppet)

## ⭐️ How it works

Write in natural language (following the [Commands](#-commands))

## 💡 Usage

Install the package from [npm](https://www.npmjs.com/package/puppet):
Expand All @@ -25,14 +29,29 @@ Install the package from [npm](https://www.npmjs.com/package/puppet):
npm install puppet
```

Import and use;
Install and use the CLI:

```bash
npm install --save-global puppet
puppet "path/to/commands.puppet"
```

Import and use the API:

```ts
import { nodeTs } from "@anandchowdhary/node-ts";
const { puppet } = require("puppet"); // Node.js
import { puppet } from "puppet"; // TypeScript/ES6

nodeTs();
const { url } = await puppet("path/to/commands.puppet");
```

## 🔫 Commands

| Command example | Description |
| -------------------- | ------------------------ |
| `Go to example.com` | Navigate to a URL |
| `Wait for 5 seconds` | Wait for a specific time |

## 👩‍💻 Development

Build TypeScript:
Expand Down

0 comments on commit 093061a

Please sign in to comment.