# Getting started

This guide covers the prerequisites and tools you need to start building Interface Extensions.

## Prerequisites

Before you can create your first extension make sure you have the following prerequisites.

-   You are familiar with Airtable and Extensions.
-   You are familiar with JavaScript and [React](https://react.dev/). Don't worry, you don't need to be an expert!
    -   If you need some help with the basics, check out
        [Mozilla's guides](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Scripting) for JavaScript and React's
        [Getting Started](https://react.dev/learn) guide.
    -   The core React concepts used in the Blocks SDK are [function components](https://react.dev/learn/describing-the-ui)
        and [hooks](https://react.dev/reference/react/hooks).
-   You have familiarity with the terminal. You should know how to `cd` into a folder and run
    commands. Again, no need to be an expert!
-   You have a Windows, macOS, or Linux computer. Other operating systems may work but are untested.
-   You have Node.js installed. You’ll need Node 22 or higher. You can follow instructions to download and install it on [Node's website](https://nodejs.org/en/download/prebuilt-installer).
-   You have a text editor installed, such as Visual Studio Code, Cursor, Sublime Text, or Vim. If
    you're not sure which editor to use, we recommend
    [Visual Studio Code](https://code.visualstudio.com/).

## Running commands in the terminal

We'll be running a number of commands in the terminal. In this guide, if you see a code snippet that
starts with `$`, that means it should be run in the terminal, but you don't need to type the `$`.

## Install the CLI

Let's install the CLI (command line interface). This will install the relevant code you'll need to create, run, and release extensions.

Open the terminal and paste the following command:

```
$ npm install -g @airtable/blocks-cli
```

Let's confirm the installation worked, by running the help command:

```
$ block -h
```

You should see something like the below printed in  your terminal. This means the installation was successful:

```
Official command line tool for Airtable blocks development

VERSION
  @airtable/blocks-cli/2.0.8 darwin-arm64 node-v22.14.0

USAGE
  $ block [COMMAND]

COMMANDS
  add-remote     [Beta] Add a new remote configuration
  help           display help for block
  init           Initialize an Airtable extension project
  list-remotes   [Beta] List remote configurations
  release        Release a build to an Airtable base
  remove-remote  [Beta] Remove a remote configuration
  run            Run the extension locally
  set-api-key    Set a personal access token (with block:manage
                 scope) for an Airtable account to upload to
  submit         Submit extension for review for listing in the the
                 Airtable Marketplace
```

## Configure the CLI

Open your terminal and register your token with the CLI:

```
$ block set-api-key
```

You'll then be asked for a Personal Access (PAT) token. PATs are a kind of password that can be configured with specific permission (or scopes) in mind for what it can access:

```
What is your Airtable personal access token (with block:manage scope)? You can generate one at https://airtable.com/create/tokens.:
```

Paste your token. If you do not have one, you'll need to create a PAT in the Builder Hub. You can follow the link printed in the terminal, or click this link: [Personal Access Token page in Builder Hub](https://airtable.com/create/tokens).

From there hit `+ Create Token`. First, name your token. This name will be visible to you, so choose something descriptive, like "Extensions Development Token".

Then, under `Scopes`, select `block:manage`. You'll only need this one scope for our purposes. Then, give your token the right access - select `+ Add all resources` to grant access to all current and future bases in all current and future workspaces.

After this, select the `Create Token` button. You'll see an alert pop up with your generated token. Copy it to your clipboard. **Note**: this will be the only time the token displays, so consider saving it to a password mananger for secure storage.

Head back to the terminal and paste in your token:

```
What is your Airtable personal access token (with block:manage scope)?: pat****
Saving personal access token to: /Users/yourname/.config/.airtableblocksrc.json
Personal access token saved.
```
Now you've installed and configured the CLI.  Note that you should only have to do these steps once per machine.

You're ready for the next step!

## [Next: learn how to build a "Hello, world" extension &rarr;](https://airtable.com/developers/interface-extensions/guides/hello-world-tutorial.md)
