Skip to content
atarashi
Documentation menu

Configuration

Atarashi reads settings from four places. Anything you can set in a config file you can override for one run with a flag, and anything you can set with a flag you can make the default in the config file.

Precedence

Highest wins:

  1. CLI flags: --pm npm, --no-git, --license Apache-2.0
  2. Environment variables: ATARASHI_*
  3. User config: config.json (see below)
  4. Built-in defaults: including package-manager detection

When you generate from an existing project (--from atarashi.json, or atarashi add inside a generated project), that project's own recorded options are merged in first and then the chain above applies on top.

Where the user config lives

PlatformPath
Linux$XDG_CONFIG_HOME/atarashi/config.json, else ~/.config/atarashi/config.json
macOS~/Library/Application Support/atarashi/config.json
Windows%APPDATA%\atarashi\config.json

ATARASHI_CONFIG_DIR overrides all three. atarashi config path prints the one in effect, and atarashi config list prints the current values.

Managing it

atarashi config list                       # everything currently set
atarashi config get packageManager
atarashi config set packageManager pnpm
atarashi config set author.name "Your Name"
atarashi config unset license
atarashi config path

Every write is validated against the schema before it lands, so a typo is an error rather than a setting that silently does nothing. Add --dry-run to any of them to see the change without making it.

Every setting

KeyTypeWhat it does
packageManagerpnpm | npm | yarn | bunWhich package manager generated projects use. Default: detected from npm_config_user_agent, then a lockfile, then pnpm.
gitbooleanRun git init in a new project.
installbooleanInstall dependencies after generating.
formatbooleanRun the project's formatter after generating.
initialCommitbooleanMake the first commit. Requires git.
licensestring | nullSPDX id used by meta/license and package.json. null means no license file.
author.namestringWritten into package.json and the license.
author.emailstringAs above. Validated as an email address.
author.urlstringAs above. Validated as a URL.
registry.sourcesarrayExtra blueprint sources. See Authoring blueprints.
registry.pinsemver | nullPin the registry index to one version, so a team generates identically.
registry.offlinebooleanNever reach the network; use the cache and the bundled blueprints.
telemetrybooleanOff unless you turn it on. See below.
updateNotifierbooleanThe once-a-day "a newer version exists" line.

Environment variables

Useful in CI, where you want the settings without a config file on disk.

VariableEquivalent
ATARASHI_PACKAGE_MANAGERpackageManager
ATARASHI_GITgit (true / false)
ATARASHI_INSTALLinstall (true / false)
ATARASHI_LICENSElicense
ATARASHI_AUTHOR_NAMEauthor.name
ATARASHI_AUTHOR_EMAILauthor.email
ATARASHI_AUTHOR_URLauthor.url
ATARASHI_OFFLINEregistry.offline (1 / true)
ATARASHI_CONFIG_DIRDirectory holding config.json
DO_NOT_TRACKDisables telemetry regardless of any other setting

A project's own config

Every generated project gets an atarashi.json recording the spec it came from: the blueprints, the answers, and the options. It is what makes atarashi add possible later, and regenerating from it reproduces the project byte for byte.

Commit it. The one thing it does not contain is anything secret: values that belong in .env stay in .env.

atarashi new my-api --from ./atarashi.json    # rebuild the same project
atarashi preset save my-stack                 # turn it into a reusable preset

The single exception to byte-for-byte reproduction is an env entry that mints a value, such as a JWT signing key. Those land in .env, which is gitignored and per-machine, and they are deliberately different every time.

Telemetry

Off by default, and there is nothing to opt out of unless you opt in first. DO_NOT_TRACK is honoured. When enabled, events are written to a local file you can read; nothing leaves your machine.

atarashi config set telemetry true
atarashi config unset telemetry

Registry pinning

By default Atarashi refreshes its registry index once a day. To make a team's output identical, pin it:

atarashi registry pin 1.0.0
atarashi registry list           # what the pinned index contains
atarashi registry unpin
atarashi registry pin 1.1.0 --dry-run   # what would change, without changing it

When a pin is in effect the generated atarashi.json records it, so --from reproduces against the same blueprint versions rather than whatever is newest today.

Part of the atarashi documentation, written and maintained by Gautam Suthar.