08-23-2018 06:06 - edited 08-23-2018 06:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-23-2018 06:06 - edited 08-23-2018 06:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Today is another exciting landmark in the evolution of the Fitbit OS Software Development Kit (SDK). We’re proud to announce a major enhancement: an entirely new way to build apps and clock faces for Fitbit OS. We have created a command-line interface that is compatible with macOS, Windows, and Linux, and allows developers to build and install Fitbit OS projects while using their favorite code editors, and their preferred version control system. This update takes Fitbit OS app development beyond Fitbit Studio for the very first time.
https://dev.fitbit.com/blog/2018-08-23-cli-tools/
08-23-2018 11:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-23-2018 11:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Finally! Congratulations! Now it's the real SDK.

08-23-2018 11:30 - edited 08-23-2018 11:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-23-2018 11:30 - edited 08-23-2018 11:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi Jon,
Eager to get this running, but I can't get past the login step. The video shows the user already logged in, but the video says a browser will pop up with login. My browser does not launch so I can't log in and run the app on the sim.
sfo-m-vg0qvh:~$ npx fitbit
npx: installed 3 in 2.362s
command not found: fitbit
If I create a new project everything works perfectly as described. This only happened on a project that I downloaded from Studio.

08-23-2018 11:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-23-2018 11:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Existing projects need the dependencies added. Check the CLI guide.

08-23-2018 13:26
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-23-2018 13:26
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Found the isssue:
npm add --dev @Fitbit/sdk-cli
Missed the second step. Assumed the section on updating existing projects was all I needed to know. I got the sdk installed but not the cli.
Thanks! This is awesome !

08-23-2018 18:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-23-2018 18:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
Does anyone know why I am getting:
Fetch of https://api.fitbit.com/1/user/-/developer-relay/hosts/undefined returned status 404 Not Found
When I issue "$fitbit install"
I built and connected the Ionic.
Thanks!
Itamar

08-24-2018 01:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-24-2018 01:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Re the prerequsites, git also seems to be mandatory.
npx create-fitbit-app
...doesn't work for me without it.
If this is the case, could I suggest that the documentation be updated?
Gondwana Software
08-24-2018 03:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-24-2018 03:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@ihassin please run the following command from your project folder, and paste the output.
FITBIT_QA_COMMANDS=1 npx fitbit hosts
08-24-2018 03:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-24-2018 03:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@Gondwana sorry about that, it seems it was added as a last minute dependency due to an known issue with one of the other dependencies (source-map). We'll drop that requirement once they publish their fix.
08-24-2018 10:53 - edited 08-24-2018 10:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-24-2018 10:53 - edited 08-24-2018 10:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Can I make a request for a command that builds and loads the app in one step?
> npx fitbit-run
08-24-2018 13:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-24-2018 13:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JonFitbitThanks for the info re git.
Gondwana Software

08-24-2018 18:06 - edited 08-24-2018 18:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-24-2018 18:06 - edited 08-24-2018 18:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JonFitbit wrote:@ihassin please run the following command from your project folder, and paste the output.
FITBIT_QA_COMMANDS=1 npx fitbit hosts

08-24-2018 18:14 - edited 08-24-2018 18:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-24-2018 18:14 - edited 08-24-2018 18:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@JasonShort wrote:Can I make a request for a command that builds and loads the app in one step?
> npx fitbit-run
Hey Jason,
I too don't want to have the REPL dialog within fitbit$... Until Fitbit fixes this, I came up with an expect script:
#!/usr/bin/expect -f
#set timeout -1
spawn ./fitbit-cli.sh
expect "fitbit"
send -- "install\n"
expect "fitbit"
send -- "exit\r"
expect eof
fitbit-cli.sh:
#!/usr/bin/env bash
npx fitbit-build
npx fitbit
Check out in the demo app.
08-30-2018 10:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-30-2018 10:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Initial experience with the CLI and Visual Studio Code is great, but why oh why no real time debugging/breakpoint support? Can you work on this next please!
Also, do I have to use GitHub, or can I use Git with Visual Studio Online?
08-30-2018 10:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-30-2018 10:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
> Also, do I have to use GitHub, or can I use Git with Visual Studio Online?
You can use any version control system and git hosting service you like. It has nothing to do with CLI tools.

09-03-2018 10:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-03-2018 10:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@ihassin Fix is coming this week! Short term workaround: disconnect all devices but one
09-03-2018 13:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-03-2018 13:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@JonFitbit wrote:@ihassin please run the following command from your project folder, and paste the output.
FITBIT_QA_COMMANDS=1 npx fitbit hosts
I tried doing this to see if I could get any clues about why my runtime output was in terms of build files/lines rather than source-mapped. Unfortunately, I couldn't find FITBIT_QA_COMMANDS anywhere. Is this a linux-specific thing?
Gondwana Software

09-03-2018 13:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-03-2018 13:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I tried doing this to see if I could get any clues about why my runtime output was in terms of build files/lines rather than source-mapped. Unfortunately, I couldn't find FITBIT_QA_COMMANDS anywhere. Is this a linux-specific thing?
It's not linux specific.
We're aware of some issues with source-mapping line numbers, hopefully it should be fixed in a upcoming update.
09-03-2018 13:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-03-2018 13:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
We're aware of some issues with source-mapping line numbers, hopefully it should be fixed in a upcoming update.
Thanks Jon; that would make be very happy!
I'm mystified about why I can't find FITBIT_QA_COMMANDS; makes me wonder whether there's something wrong with my installation.
Gondwana Software

09-03-2018 14:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-03-2018 14:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
FWIW, sussed it on Windows:
set FITBIT_QA_COMMANDS=1 npx fitbit
Gondwana Software

