Arturo Cuya

Join the weekly newsletter

Not a subscriber?

Every week I'll send you cutting edge advice and actionable tips about modern Roku development. State-of-the-art knowledge that you won't find anywhere else — For free.

November 12, 2022 | 2 min read

Here's How You Should Start a New Roku Project

By Arturo Cuya

@arturo__cuya

Every developer needs an easy way to spin up a new project.

I was made aware of this problem when I decided to start a blog.

I’d need to be able to create a bunch of small projects if I wanted to showcase isolated features from Roku — or test the libraries that the community puts out.

For Roku developers, this is hard.

Either you remember the correct file structure and manifest configuration, or you download the sample Hello World project from the docs.

The latter option assumes that the sample project meets my expectations of a good initial structure — and assumes that Roku will keep that sample updated and accessible forever.

Don’t get me wrong, I love developing Roku applications. But I wouldn’t put a lot of faith in their maintainability capacities.

So for a long time I went with first option: Remembering the standard structure I like and applying it to each new project.

Being the lazy automation-first programmer that I am, not so long ago I figured:

Huh, it would be nice if the Roku development scene had a tool like create-react-app, to quickly scaffold a new project.

And that’s how I came up with create-roku-app.

How to use create-roku-app

To use my CLI tool, you need to have Node and NPM (>=5.2.0) installed.

It’s also recommended that you have Git installed of course.

Finally, the tool assumes that your preferred code editor is Visual Studio Code — which should be the case if you’re a Roku developer.

Usage

Simply run

npx create-roku-app --name "My Roku App"

There’s also a --recommended configuration, which automatically chooses the options that I like when working with Roku projects:

  1. Use BrighterScript instead of BrightScript
  2. Install bslint and brighterscript-formatter for code styling
  3. Enable the VSCode SceneGraph Inspector (100 times better than RALE)

My personal go-to is:

npx create-roku-app --name "My Roku App" --recommended --pm pnpm

The --pm flag will let you decide which Node package manager to use.

The default is npm, but I like pnpm because it’s faster and consumes less disk space.

There’s also yarn for people trapped still trapped in the last decade :)

Now it’s your turn

  • If you always work with the same device, go ahead and add its credentials to bsconfig.json

  • Remember to set the channel poster images on the manifest file

I hope you enjoy using this tool as much as I enjoyed making it.


Some other ways I can help you:

1. Course: A Modern Introduction to Roku Development (Coming April 2024)

For absolute beginners, this course is meant to set you in the right path to make use of modern tools and best practices from day one. Subscribe to the newsletter to get notified when it's available.

2. Open Source tools to boost your productivity:

Use these tools to 10x your workflows. Free and open source forever.

  • create-roku-app: A CLI tool to quickly scaffold Roku apps using the best practices.
  • SceneGraph Flex: A flexbox component for Roku Scenegraph applications.
  • Roku Animate: Define complex Roku Scenegraph animations in one line of code.