Create and publish packages
Declare package manifests, subagents, MCP servers, storage adapters, convention directories, and dependencies.
Package reference
Look up filter patterns,
autoload: false overrides, resource precedence, deduplication, and cache paths.Package CLI commands
Full reference for
install, remove, update, list, and config flags.SDK extensions
Load local packages and extensions programmatically with
DefaultResourceLoader.Before you begin
Before installing packages, confirm the following:- Atomic is installed and available on your
PATH. npm(or your configurednpmCommand, such aspnpmorbun) is installed for npm packages, andgitis installed for Git repositories.- To install project-local packages (
-l), trust the project first with/trustor pass--approve(-a).
Install, inspect, update, and remove packages
Use the following commands to install packages globally (default) or into the current project (-l / --local):
atomic uninstall is an alias for atomic remove. Confirm that an install or removal succeeded by running atomic list and checking User packages or Project packages.
Update installed packages, the Atomic CLI, or cached model catalogs with atomic update:
atomic update --extensionsupdates all unpinned npm packages and reconciles Git refs.atomic update --allupdates the Atomic CLI, all packages, and Git refs.atomic update <source>(oratomic update --extension <source>) updates one package.atomic update --modelsrefreshes authenticated provider model catalogs (15-second timeout).
atomic update (or atomic update --self / atomic update atomic) updates only the Atomic CLI and reminds you to run atomic update --extensions for packages. Self-update also accepts --force, --version <release>, and --prerelease (for release-archive installs), verifies atomic --version on PATH, and runs atomic intercom upgrade. See Installation for selfUpdateCommand / ATOMIC_SELF_UPDATE_COMMAND overrides and uninstall steps.
Global and project scope
Package installs and removals follow these scope and trust rules:- Global compared with project scope:
installandremoveedit~/.atomic/agent/settings.json(%USERPROFILE%\.atomic\agent\settings.jsonon Windows) by default (see Settings). Pass-l(--local) to edit.atomic/settings.json(Atomic also reads legacy.pi/settings.json). Missing project packages install automatically on startup after the project is trusted. - Project trust gate: In an untrusted project,
atomic install -landatomic remove -lexit with code 1 (Project is not trusted. Use --approve to modify local package config.) unless you trust the project first (see Security) or pass-a(--approve). Both-a(--approve) and-na(--no-approve) work oninstall,remove,update,list, andconfig.
Update packages and work offline
Package updates and offline startups follow these rules:- Flag combinations:
--all,--models, and--extensionare mutually exclusive and can’t be combined with positional sources. Pass--extensionat most once. - Output and partial failures: Atomic prints each updated npm version or Git commit (for example
npm:@acme/review-kit 1.2.0 -> 1.3.0, tagged(project)for project scope) or printsPackages are already up to date. If some packages fail during a batch update, Atomic still prints the packages that succeeded before exiting non-zero. - Offline mode: Pass
--offlineor setATOMIC_OFFLINEto1,true, oryes(case-insensitive; Atomic also reads legacyPI_OFFLINE) to skip automatic startup installs and package updates. - Startup resilience: If an automatic startup install fails (for example offline), Atomic warns with the matching
atomic removecommand, skips that package’s resources, and retries on the next start or/reload(atomic installandatomic update --extensionsstill exit non-zero). Concurrent installs serialize per package, interrupted Git clones re-clone on retry, andatomic removecleans up orphaned directories.
Preview a package with -e
To try a package for one session without editing settings.json, pass it to -e (--extension):
-e installs remote sources into a private user-owned cache (see Temporary package cache for exact paths). Unpinned npm specs and branch or tag Git refs refresh on start and /reload (falling back to cache offline or on error), while exact @1.2.3 npm pins and matching Git commit hashes skip network checks. Local -e <dir> paths can also load <dir>/.atomic, <dir>/.pi, and <dir>/.agents/skills after resolving trust for that directory.
Package sources
Atomic supports three package source types: npm packages, Git repositories, and local paths.npm
Specify npm packages with optional exact versions, semver ranges, or dist-tags:- Install locations: Global npm packages install under
~/.atomic/agent/npm/(managed by Atomic rather than your system globalnpm -groot; Atomic checks system globalnpm,pnpm, orbunroots only for legacy installs already there). Project installs (-l) install under.atomic/npm/(legacy.pi/npm/fallback). - Pinning, ranges, and dist-tags: Exact semver versions (
npm:pkg@1.2.3) stay pinned, soatomic update --extensionsand--allskip them. Semver ranges (^1.2.3,~1.2.3) and dist-tags (@next) update when you runatomic update --extensionsor--all. Dist-tags also check the registry on online startup and reinstall when the tag moves. - Custom package manager (
npmCommand): To usepnpm,bun, or a version manager such asmiseorasdf, setnpmCommandinsettings.json:
npm, pnpm, and bun even inside wrapper commands (include -- if a wrapper mentions more than one manager name, or Atomic fails with Ambiguous npmCommand package managers) and passes manager-specific flags to avoid installing host peer dependencies:
npm:--legacy-peer-deps --no-audit --no-fund(plus--omit=devfor Git package dependencies).pnpm:--config.auto-install-peers=false --config.strict-peer-dependencies=false --config.strict-dep-builds=false(plus--prodfor Git dependencies).bun:--omit=peer(plus--omit=devfor Git dependencies).
Git
Specify Git repositories withgit: shorthand or full protocol URLs, optionally pinned to a branch, tag, or commit hash:
- URL syntax: Bare protocol URLs (
https://,http://,ssh://, andgit://) work directly; shorthand (github.com/acme/review-kit,git@github.com:acme/review-kit) requires thegit:prefix. Hosted URLs accept#refalongside@ref. Repository paths must have at least two segments (owner/repo) and can’t contain traversal (..,.), backslashes, or null bytes. Case-only path collisions on case-insensitive filesystems stop with an error. - SSH and CI: SSH uses your keys and
~/.ssh/config. For non-interactive or CI runs, setGIT_TERMINAL_PROMPT=0andGIT_SSH_COMMAND="ssh -o BatchMode=yes -o ConnectTimeout=5". - Clone locations: Repositories clone to
~/.atomic/agent/git/<host>/<path>(global) or.atomic/git/<host>/<path>(project; legacy.pi/git/fallback). - Refs and updates:
@refand#refaccept a branch, tag, or commit hash. Runningatomic update --extensionsor--allfetches a pinned ref (git fetch origin -- <ref>) and resets hard toFETCH_HEAD, advancing branches and reconciling tags or commits. Unpinned checkouts track@{upstream}(when onorigin/) or refreshorigin/HEAD, and repair missingdependencieseven whenHEADhasn’t changed. WheneverHEADchanges, Atomic runsgit clean -fdxand installs production dependencies ifpackage.jsonexists (on Windows, locked files during cleanup warn and retry on a later update). To switch a pinned repository to another ref, re-runatomic installwith the target ref (for exampleatomic install git:github.com/acme/review-kit@v2).
Local paths
Install a local package file or directory by absolute or relative path:ABSOLUTE_PACKAGE_PATH: the absolute path to a local package directory or extension file, for example/opt/atomic/review-kit.RELATIVE_PACKAGE_PATH: the path relative to your current directory, for examplepackages/review-kit.
atomic install /opt/atomic/review-kit stores the path in settings.json relative to the settings directory (~/.atomic/agent or .atomic). A file loads as a single extension; a directory loads as a package. Running atomic remove <local-path> removes only the settings entry and never deletes local files.
Enable and disable resources
Runatomic config to turn extensions, skills, prompt templates, and themes on or off interactively:
- Running
atomic configopens global settings (~/.atomic/agent/settings.json). Press Tab to switch between global and project scope in trusted projects (Tab is disabled in untrusted projects). - Running
atomic config -l(--local) opens project overrides (.atomic/settings.json) with inherited global entries dimmed. In an untrusted project,atomic config -lexits with code 1 (Project is not trusted. Use --approve to modify local resource config.) unless you pass--approve. - Package subagents, MCP servers, and storage adapters don’t appear in
atomic config. FilteragentsandmcpServersper package insettings.json(see Package filtering), and select storage adapters withstorage.adapter. - Turn built-in extensions (
llama.cpp,codemode, andtool-search) on or off withbuiltin:<name>entries (see Built-in extension resources). - If an interactive session crashes with an uncaught error whose stack crosses a loaded extension, Atomic names the extension in the exit output and suggests
atomic configoratomic -neto isolate the cause.
Troubleshooting
The following table lists common package management errors and how to fix them:Next steps
Continue working with packages in these guides:- Learn how to bundle and publish your own resources in Create and publish packages.
- Fine-tune which files load from each package in Package reference.