Commands
embr add
Last updated October 23, 2026
embr add <scope>/<name> [--version <req>] [--index <key>] [--alias <name>]
[--scoped] [--refresh]
embr add <name>
Records a dependency in [dependencies].
Behavior#
- Resolves first, edits after — a typo'd package or impossible version
fails before
ember.tomlis touched. - Without
--indexit prompts for an index key ("press enter to use Ember's index"); empty input means the default index — thedefaultkey under[indices]if defined, Ember's own registry otherwise. Pass--indexto skip the prompt (needed for non-interactive shells). - A name with no scope is a local package.
Ember finds it by its name in every scope of the local registry and adds
it with
index = "local", with no prompt. If two scopes have that name, useembr add <scope>/<name> --index local. --versiondefaults to^(latest).--aliassets the[dependencies]key (defaults to the package's short name); the alias is also the link file's name.--scopedkeys the dependency by its fullscope/name, such as"mayari/core". Install then links it atpackages/<environment>/mayari/core.luau, in a folder named after the scope. It cannot be used with--alias. See scoped keys.- Resolves against an index up to 5 minutes old. If resolution fails on a
stale index, Ember refreshes it and retries once before reporting an error,
so a just-published package is still addable without any flag.
--refreshre-fetches the index up front instead. - Names are lowercased. Edits preserve comments and formatting in
ember.toml. - Prints the resolved version and reminds you to run
embr install.
Examples#
embr add chief/core # latest, Ember registry
embr add evaera/promise --index wally # from the wally index
embr add chief/lifecycles --version "^0.2" --alias Cycles
embr add mayari/core --scoped # key "mayari/core"
embr add my-lib # a local package
Hooks#
A preadd script runs before the index prompt, so it can set up whatever
resolving needs; postadd runs after ember.toml has been written. See
Lifecycle hooks.
See also#
embr indexfor adding wally, pesde, forest, or custom indices.- Dependencies & installing for how resolution works.