Skip to content

Clone and install

If you are coming from 01-prerequisites.md, this step usually takes between five and ten minutes.

There are two ways to grab the base. If git is new to you, the GitHub Template route is friendlier.

  1. Open this base’s GitHub page.
  2. Click the green Use this template button in the top-right corner and pick Create a new repository.
  3. Pick a name for your new repo under your own GitHub account, e.g. my-extension.
  4. Click Create repository.

That gives you a fresh copy of the base under your own account. Now pull that copy onto your local machine. Open a terminal and run:

Terminal window
cd ~/Desktop # or any working folder you prefer
git clone https://github.com/<your-id>/my-extension.git
cd my-extension

Replace <your-id> with your own GitHub username.

B. Plain git clone (if you are already comfortable with git)

Section titled “B. Plain git clone (if you are already comfortable with git)”
Terminal window
git clone https://github.com/<owner>/chrome-ext-base.git my-extension
cd my-extension
git remote remove origin # disconnect the base's remote
# Create an empty repo on your GitHub account, then point this clone at it:
# git remote add origin https://github.com/<your-id>/my-extension.git

2) Confirm your GitHub repo is the one wired up

Section titled “2) Confirm your GitHub repo is the one wired up”

From this point on, every commit you make flows into your own GitHub repo. Check the wiring once and move on.

Terminal window
git remote -v

If you came through route A, two lines should appear:

origin https://github.com/<your-id>/my-extension.git (fetch)
origin https://github.com/<your-id>/my-extension.git (push)

If your own repo URL sits in the origin slot, you are done. From here a single git push lifts your changes to your repo.

If you came through route B and either origin is missing or still points at the base, create an empty repo on your GitHub account first, then attach it with these two lines:

Terminal window
git remote add origin https://github.com/<your-id>/my-extension.git
git push -u origin main

The -u flag pins this destination so later pushes only need git push. You only need it this once.

The base repo gets re-attached as a second remote named base in 10-staying-up-to-date.md. origin for your repo and base for the ddakit update channel end up living side by side.

Terminal window
bash init.sh

This single line walks through three things in order.

  1. It checks that your Node.js is version 20 or newer.
  2. It runs pnpm install to pull dependencies.
  3. It runs the build once to confirm your environment is in good shape.

If something in the middle goes red, follow whatever the script tells you on screen first. If that does not clear it, the “init.sh failed” section of 06-troubleshooting.md is the next stop.

Terminal window
ls node_modules | head -5

Folders like react, vite, and @crxjs should appear in the output. That confirms the install worked. If nothing shows up, or if it says node_modules does not exist, step 2 did not complete.

If a previous attempt left files behind, clear node_modules/ and pnpm-lock.yaml (if it exists) and start over.

Terminal window
rm -rf node_modules pnpm-lock.yaml
bash init.sh

Leftovers from a previous build sometimes collide with the fresh install.

At this point the base is sitting on your machine, ready to be turned into your extension. If you want to convert it into your own project right now, the post-clone checklist walks through swapping out package.json and a few other files with your own information. The base’s LICENSE stays as-is; it states that your right to use the template is governed by your commercial license agreement with goldtagworks.

Doing all of that immediately is not required. It is also fine to confirm the first run works before you customize anything.

If init.sh finished cleanly, move on to 03-first-run.md.