# Zeplin on boxd

> Zeplin is a design delivery platform that connects designers and developers, enabling access to design resources like projects, screens, components, and assets.

- Page: https://boxd.sh/integrations/zeplin/
- CLI: `run zeplin` (24 commands, 23 marked common)
- SDK: `import { zeplin } from "@boxd/run"`; every parameter and response type is at `@boxd/run/zeplin`
- Triggers: none
- Connect: `run auth zeplin` (Sign in with Zeplin), or https://app.boxd.sh/integrations/detail/zeplin
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth zeplin      # once: prints a link to connect your account
run zeplin           # list its commands
run zeplin users-get-personal-projects --help
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, zeplin } from "@boxd/run";

every("1 hour", async () => {
  const result = await zeplin.usersGetPersonalProjects({});
  console.log(result);
});
```

Run it with `run zeplin.run.ts`. Zeplin has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run zeplin <command> --help` lists the optional ones. "common" marks what `run zeplin` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `auth-o-auth-authorize` ·common | `zeplin.authOAuthAuthorize()` | `--client-id` `--redirect-uri` | 4 | Start OAuth 2.0 authorization code flow for Zeplin apps |
| `connected-components-project-list` | `zeplin.connectedComponentsProjectList()` | `--project-id` | 2 | List connected components in a Zeplin project |
| `project-color-update` ·common | `zeplin.projectColorUpdate()` | `--color-id` `--project-id` | 5 | Update a color in a Zeplin project |
| `project-colors-list` ·common | `zeplin.projectColorsList()` | `--project-id` | 3 | List colors in a Zeplin project |
| `project-text-style-update` ·common | `zeplin.projectTextStyleUpdate()` | `--data` `--project-id` `--text-style-id` | 3 | Update a text style in a Zeplin project |
| `project-text-styles-list` ·common | `zeplin.projectTextStylesList()` | `--project-id` | 5 | List text styles in a Zeplin project |
| `projects-get` ·common | `zeplin.projectsGet()` | `--project-id` | 0 | Get a Zeplin project by ID |
| `projects-members-invite` ·common | `zeplin.projectsMembersInvite()` | `--handle` `--project-id` | 1 | Invite a user to a Zeplin project |
| `screen-annotation-delete` ·common | `zeplin.screenAnnotationDelete()` | `--annotation-id` `--screen-id` | 0 | Delete a screen annotation in Zeplin |
| `screen-annotation-get` ·common | `zeplin.screenAnnotationGet()` | `--annotation-id` `--screen-id` | 0 | Fetch a single screen annotation |
| `screen-annotations-list` ·common | `zeplin.screenAnnotationsList()` | `--screen-id` | 2 | List annotations for a Zeplin screen |
| `screen-annotations-update` ·common | `zeplin.screenAnnotationsUpdate()` | `--annotation-id` `--screen-id` | 3 | Update a screen annotation's content, position, or type |
| `screen-components-list` ·common | `zeplin.screenComponentsList()` | `--screen-id` | 3 | List components in a Zeplin screen |
| `screen-section-get` ·common | `zeplin.screenSectionGet()` | `--project-id` `--section-id` | 0 | Get a single screen section |
| `screen-sections-list` ·common | `zeplin.screenSectionsList()` | `--project-id` | 2 | List screen sections in a Zeplin project |
| `screen-version-get` ·common | `zeplin.screenVersionGet()` | `--screen-id` `--version-id` | 0 | Retrieve a specific screen version |
| `screen-versions-create` ·common | `zeplin.screenVersionsCreate()` | `--image` `--project-id` `--screen-id` | 1 | Create a new version of a screen |
| `screen-versions-list` ·common | `zeplin.screenVersionsList()` | `--screen-id` | 2 | List all versions of a screen |
| `styleguide-color-create` ·common | `zeplin.styleguideColorCreate()` | `--a` `--b` `--g` `--name` `--r` `--styleguide-id` | 3 | Create a new styleguide color |
| `styleguide-color-update` ·common | `zeplin.styleguideColorUpdate()` | `--color-id` `--styleguide-id` | 9 | Update a color in a Zeplin styleguide |
| `styleguide-colors-list` ·common | `zeplin.styleguideColorsList()` | `--styleguide-id` | 4 | List colors in a Zeplin styleguide |
| `styleguide-text-style-update` ·common | `zeplin.styleguideTextStyleUpdate()` | `--data` `--styleguide-id` `--text-style-id` | 3 | Update a text style in a Zeplin styleguide |
| `styleguide-text-styles-list` ·common | `zeplin.styleguideTextStylesList()` | `--styleguide-id` | 6 | List text styles in a Zeplin styleguide |
| `users-get-personal-projects` ·common | `zeplin.usersGetPersonalProjects()` | — | 2 | List personal projects |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
