Skip to content

Getting Updates

Atomic CRM is meant to be copied and customized: there is no npm package to install as a dependency and upgrade. A repository created from the Atomic CRM template doesn’t share any git history with upstream either, so you can’t merge upstream changes or use GitHub’s Sync fork button. Instead, upstream changes reach your project in two ways:

  • The application code (components, hooks, and lib files) is published as a shadcn registry, which you can use to pull upstream changes into your project.
  • The other files (database schema and migrations, edge functions, CI workflows, scripts) are updated by applying the changes upstream made between two releases, with a three-way merge.

Neither of them is meant to bootstrap a new project. If you’re starting a new CRM, follow the Installation instructions instead.

Some releases also change files that neither method updates (components.json, vite.config.ts, index.html…). Before updating your project across a major version, follow the manual steps in the Upgrade Guide.

Commit or stash any pending work first, this command overwrites files, and you’ll want a clean diff to review the changes:

Terminal window
npx shadcn add https://marmelab.com/atomic-crm/r/atomic-crm.json -o -y
  • -o (--overwrite) replaces local files with the upstream version.
  • -y (--yes) skips the interactive confirmation prompt. Prefer this flag over piping yes | into the command: it’s the option the CLI provides for non-interactive use, and it fails loudly if the CLI ever changes its prompts instead of silently answering “yes” to whatever comes up.

Once the command completes, review the diff:

Terminal window
git diff

Resolve any conflict with your own customizations, run the test suite (make test, make test-e2e), then commit.

The registry mirrors the files tracked by scripts/generate-registry.mjs: everything under src/components/atomic-crm, src/components/supabase, most of src/hooks, and most of src/lib. It does not touch your Supabase schema, your docs/project-context.json configuration, or any file you added outside those directories.

To update the files the registry doesn’t ship, apply the changes upstream made between the release your project is based on and the release you want to upgrade to. First, add the Atomic CRM repository as a remote (only once), and fetch its release tags:

Terminal window
git remote add upstream https://github.com/marmelab/atomic-crm.git
git fetch upstream --tags

Then, with no pending work, apply the upstream changes between the two releases:

Terminal window
git diff v2.0.0 v2.1.0 -- supabase .github scripts makefile | git apply -3

Replace v2.0.0 with the release your project is based on (the first entry of CHANGELOG.md when you created your project, or the release of your last update), and v2.1.0 with the target release (see the releases page).

git apply -3 merges the upstream changes with your own: changes to files you didn’t customize apply cleanly, and overlapping changes are left as conflict markers in the files listed by git status. Resolve them, apply the new migrations to your local database (npx supabase migration up --local), run the test suite, then commit. Mention the target release in the commit message (e.g. “Update Atomic CRM to v2.1.0”), so you know where to start from next time.

Forks of Atomic CRM keep working: the registry and the three-way merge described above work the same way. As a fork shares its history with upstream, you can also merge a release directly:

Terminal window
git fetch upstream --tags
git merge v2.1.0

A fork stays attached to the Atomic CRM repository: it can’t be made private, and it appears in the Atomic CRM fork network. To turn your fork into a standalone repository, duplicate it:

  1. Create a new empty repository on GitHub (without README, license, or .gitignore).

  2. Push the whole history of your fork to it:

    Terminal window
    git clone --bare https://github.com/[username]/atomic-crm.git
    cd atomic-crm.git
    git push --mirror https://github.com/[username]/my-crm.git
  3. Clone the new repository, copy your GitHub Actions secrets and variables to it, and archive or delete the fork.

The new repository keeps the upstream history, so you can still merge upstream releases into it.

If you maintain your own project long-term (for example to distribute your customized CRM to several deployments), regenerate and republish the registry the same way Atomic CRM’s CI does:

Terminal window
make registry-gen # regenerates registry.json from the current source tree
make registry-build # builds the distributable registry file
make registry-deploy # publishes it (wraps registry-build)

See the main README for how these targets fit into the CI/CD pipeline.