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.
Breaking Changes
Section titled “Breaking Changes”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.
Refreshing The Application Code
Section titled “Refreshing The Application Code”Commit or stash any pending work first, this command overwrites files, and you’ll want a clean diff to review the changes:
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 pipingyes |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:
git diffResolve any conflict with your own customizations, run the test suite (make test, make test-e2e), then commit.
What Gets Updated
Section titled “What Gets Updated”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.
Updating The Other Files
Section titled “Updating The Other Files”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:
git remote add upstream https://github.com/marmelab/atomic-crm.gitgit fetch upstream --tagsThen, with no pending work, apply the upstream changes between the two releases:
git diff v2.0.0 v2.1.0 -- supabase .github scripts makefile | git apply -3Replace 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.
Updating A Fork
Section titled “Updating A Fork”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:
git fetch upstream --tagsgit merge v2.1.0Moving A Fork To A Standalone Repository
Section titled “Moving A Fork To A Standalone Repository”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:
-
Create a new empty repository on GitHub (without README, license, or
.gitignore). -
Push the whole history of your fork to it:
Terminal window git clone --bare https://github.com/[username]/atomic-crm.gitcd atomic-crm.gitgit push --mirror https://github.com/[username]/my-crm.git -
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.
Keeping Your Own Registry Up To Date
Section titled “Keeping Your Own Registry Up To Date”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:
make registry-gen # regenerates registry.json from the current source treemake registry-build # builds the distributable registry filemake registry-deploy # publishes it (wraps registry-build)See the main README for how these targets fit into the CI/CD pipeline.