Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @coda/packs
* @superhuman/plugins-sdk
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Coda Packs Examples
# Superhuman Plugins Examples

This repository contains some example code and templates for Coda Packs built with [Coda's Packs SDK][docs_home]. These sample Packs assume you are developing locally using the Pack CLI, as they include multiple source files and tests.
This repository contains some example code and templates for Superhuman Plugins built with the [Superhuman Plugins SDK][sdk_repo]. These sample Plugins assume you are developing locally using the `packs` CLI, as they include multiple source files and tests.

A more complete set of examples, including those which are compatible with the Pack Studio web editor, are available in the [Samples page][docs_samples] of the documentation.
A more complete set of examples, including those which are compatible with the Plugin Studio web editor, are available in the [Samples page][docs_samples] of the documentation.

## Prerequisites

Expand All @@ -14,10 +14,10 @@ To be able to work with the examples in this repo, simply run `yarn` to install

## Running Examples

Use the `coda` command line tool to execute formulas directly. For example:
Use the `packs` command line tool to execute formulas directly. For example:

```bash
npx coda execute examples/trigonometry/pack.ts Cosine 0
npx packs execute examples/trigonometry/pack.ts Cosine 0
```

See the guide [Using the command line interface][docs_cli] for more information on how to use the command line tool.
Expand All @@ -28,39 +28,39 @@ Each of the accompanying examples include sample unit tests. You can run them al
Each example's readme explains how to run those tests individually.

There is also an integration test suite that runs tests that actually connect to the
APIs used in the example Packs. You can run this with `yarn run integration`. For this
to run successfully, you must have set up credentials for each Pack. See the readme
APIs used in the example Plugins. You can run this with `yarn run integration`. For this
to run successfully, you must have set up credentials for each Plugin. See the readme
for each example for instructions on how to set up credentials, and how to
run that example's integration test individually.

## Example Walkthroughs

Several example Packs are provided in the `examples` directory. Each example has its
Several example Plugins are provided in the `examples` directory. Each example has its
own readme with more details.

The `template` Pack is minimal boilerplate for creating
a new Pack from scratch. The contents of this example are automatically copied to your
working directory if you run the `coda init` command, which is our recommended way to get
The `template` Plugin is minimal boilerplate for creating
a new Plugin from scratch. The contents of this example are automatically copied to your
working directory if you run the `packs init` command, which is our recommended way to get
started, rather than manually copying this example.

The [`trigonometry`](examples/trigonometry/README.md) Pack is one of the simplest meaningful
Packs. It exposes formulas for common trigonometric functions like sine and cosine by wrapping
The [`trigonometry`](examples/trigonometry/README.md) Plugin is one of the simplest meaningful
Plugins. It exposes formulas for common trigonometric functions like sine and cosine by wrapping
the existing JavaScript implementations of these functions. It's a good way to ease into
understanding the structure and execution of a Pack.
understanding the structure and execution of a Plugin.

The [`dictionary`](examples/dictionary/README.md) Pack is a simple example that uses authentication
The [`dictionary`](examples/dictionary/README.md) Plugin is a simple example that uses authentication
(an API key in this case) and make http requests to a third-party API service. It's a good
starting point for understanding how Packs make http requests and use authentication,
and to try out the `coda auth` command for setting up authentication locally for development.
starting point for understanding how Plugins make http requests and use authentication,
and to try out the `packs auth` command for setting up authentication locally for development.

The [`github`](examples/github/README.md) Pack is a relatively full-featured Pack that uses
The [`github`](examples/github/README.md) Plugin is a relatively full-featured Plugin that uses
OAuth authentication to get user-specific data, and implements both an action formula
(a formula that can be connected to Coda button that updates a third-party service)
as well as a sync table.

The [`box`](examples/box/README.md) Pack is a small example that demonstrates how to create an action formula that uploads a file to Box. The primary purpose of this example is to demonstrate how to use the `form-data` NPM library to send `multipart/form-data` payloads with the Fetcher.
The [`box`](examples/box/README.md) Plugin is a small example that demonstrates how to create an action formula that uploads a file to Box. The primary purpose of this example is to demonstrate how to use the `form-data` NPM library to send `multipart/form-data` payloads with the Fetcher.


[docs_home]: https://coda.io/packs/build/latest/
[docs_samples]: https://coda.io/packs/build/latest/samples/
[docs_cli]: https://coda.io/packs/build/latest/guides/development/cli/
[sdk_repo]: https://github.com/superhuman/plugins-sdk
[docs_samples]: https://docs.superhuman.com/packs/build/latest/samples/
[docs_cli]: https://docs.superhuman.com/packs/build/latest/guides/development/cli/
Loading