pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • PebbleOS
  • Mobile App
  • Examples
  • Index 01
  • Community
  • Blog
  • More
Privacy
Cookies
Publish

SDK

  • Installation
  • CloudPebble
  • Changelog
    • 4.33.1
    • 4.33
    • 4.17
    • 4.9.169
    • 4.9.148
    • 4.9.127
    • 4.3
    • 4.2.2
    • 4.2.1
    • 4.2
    • 4.2-beta5
    • 4.2-beta4
    • 4.1.4
    • 4.1.2
    • 4.1.1
    • 4.1
    • 4.0.1
    • 4.0
    • 4.0-rc20
    • 4.0-beta17
    • 4.0-dp3
    • 3.14
    • 4.0-dp2
    • 4.0-dp1
    • 3.13.1
    • 3.13
    • 3.12
    • 3.11.1
    • 3.11
    • 3.10.1
    • 3.10
    • 3.10-beta6
    • 3.10-beta2
    • 3.10-beta1
    • 3.9.2
    • 3.9.1
    • 3.9
    • 3.9-beta8
    • 3.9-beta7
    • 3.9-beta5
    • 3.8.2
    • 3.8.1
    • 3.8
    • 3.8-beta12
    • 3.8-beta10
    • 3.8-beta8
    • 3.7
    • 3.6.2
    • 3.6
    • 3.6-dp8
    • 3.6-dp7
    • 3.6-dp6
    • 3.6-dp5
    • 3.6-dp2
    • 3.4
    • 3.3
    • 3.2.1
    • 3.2
    • 3.1
    • 3.0
    • 3.0-beta12
    • 3.0-beta11
    • 3.0-beta10
    • 3.0-dp9
    • 3.0-dp8
    • 3.0-dp7
    • 3.0-dp6
    • 3.0-dp5
    • 3.0-dp4
    • 3.0-dp3
    • 3.0-dp2
    • 3.0-dp1
    • 2.9
    • 2.8.1
    • 2.8
    • 2.7
    • 2.6.1
    • 2.6
    • 2.5
    • 2.4.1
    • 2.4
    • 2.3
    • 2.2
    • 2.1.1
    • 2.1
    • 2.0.2
    • 2.0.1
    • 2.0.0
    • 2.0-BETA7
    • 2.0-BETA6
    • 2.0-BETA5
    • 2.0-BETA4
    • 2.0-BETA3
    • 2.0-BETA2
    • 2.0-BETA1
    • 2.0-BETA0
    • 2.0-DP3
    • 2.0-DP2

Use CloudPebble

CloudPebble is the fastest way to get started building Pebble apps and watchfaces - no installation required! It runs entirely in your browser.

Go to CloudPebble

What's included

CloudPebble is a browser-based IDE with the Pebble SDK built in. Write code, compile, and install apps on your watch or the emulator from your browser.

  • Code editor with code completion, syntax error checking, and inline API documentation
  • Built-in compiler - one-click build with errors linked to source lines
  • Emulator - run your app on a virtual Pebble watch in the browser or on a server
  • On-device install - install on your watch through the Pebble mobile app
  • Resource management - manage images, fonts, and data files through a graphical interface
  • GitHub integration - import from, pull from and push to GitHub repositories
  • Package support - add dependencies from the npm package registry
  • Publishing - submit apps to the Pebble appstore from the IDE

Signing in

CloudPebble uses your Pebble account, the same account as the Pebble mobile app. Click Log in with your Pebble account and sign in with Google, GitHub or Apple. The account is also used for the Developer Connection and for publishing, so no further sign-in is needed for those.

Project types

The Create New Project dialog offers three project types:

  • Pebble C SDK - the primary language for Pebble apps and watchfaces. Builds for every platform.
  • JavaScript SDK (beta) - Alloy, a JavaScript framework based on the Moddable SDK, with the Piu UI framework for component-based layouts and the Poco renderer for custom graphics. This is the default type. Alloy projects build for Pebble Time 2 (emery) and Pebble Round 2 (gabbro) only; the other platforms are not offered in the project settings.
  • Pebble Package - a reusable library of C code, JavaScript and resources that other projects can depend on. See the Pebble Packages guides.

The Template list fills a new project with a sample app, an empty project, or one of the SDK demos. JavaScript SDK projects have their own template list.

Project settings such as the app kind, target platforms, UUID, capabilities and message keys are edited in the Settings pane. CloudPebble generates package.json from these settings; the file itself cannot be edited.

Importing a project

Click Import on the project list to bring in an existing project:

  • Upload Zip - a zip file containing a standard Pebble project with its package.json or appinfo.json.
  • Import from GitHub - enter the repository URL and optionally a branch. Public repositories need no GitHub sign-in. Tick Use as Git remote to keep the project linked for pull and push, which does need the GitHub Repo Sync link in your account settings.

A link of the form https://cloudpebble.repebble.com/ide/import/github/<user>/<repo> opens the import dialog prefilled, and https://cloudpebble.repebble.com/ide/gist/<gist id> creates a project from a GitHub gist. Use these to share a project from a README.

Building and running

Build & Run in the sidebar compiles the project. Under Run On, pick Emulator and one of the seven platforms, or Phone to install on a connected watch through the Developer Connection. View app logs streams the app's log output and Screenshot saves an image of the watch display.

The emulator can run in two places. The Emulator option in your account settings chooses between In browser (fast, no server) and Cloud (server QEMU). The in-browser emulator starts faster and supports all platforms, screenshots, app logs and the sensor controls. It always uses your computer's clock, so the time cannot be changed, and audio only plays for emery and flint. The cloud emulator is the default.

Timeline

The Timeline (Preview) pane inserts a timeline pin into the emulator. Paste the pin JSON, which needs id, time and layout, and click Insert pin. Delete pin removes it again. Pins can only be sent to the emulator, not to a watch. See the Pin Structure guide for the format.

Publishing

The Publish pane submits a C or JavaScript SDK project to the Pebble appstore using the most recent successful build. It captures screenshots from the emulator or accepts uploads, and creates either a new listing or a new release of an existing app. Read Publishing an App for the details.

Getting started

  1. Go to cloudpebble.repebble.com and sign in
  2. Create a new project and choose your project type
  3. Write your code and click the compile button to build
  4. Test in the built-in emulator, or install on your watch via the Pebble mobile app

Learn more

  • Build a watchface with JavaScript (Alloy) - step-by-step tutorial
  • Build a watchface with C - step-by-step tutorial
  • Example apps - browse example projects
  • Alloy guides - in-depth guides for JavaScript development with Alloy, including Moddable example apps

Overview

  • What's included
  • Signing in
  • Project types
  • Importing a project
  • Building and running
  • Timeline
  • Publishing
  • Getting started
  • Learn more