Skip to content

Configuration

Use configuration to set sane defaults for package manager, TypeScript, and default category.

Initialize global config:

Terminal window
tinkerise config init

List active values:

Terminal window
tinkerise config list

tinkerise config manages three keys:

  • packageManager: npm | pnpm | yarn | bun
  • typescript: true | false
  • defaultCategory: web | backend | mobile

Global config is stored in your user config directory and applies everywhere unless overridden.

Common commands:

Terminal window
tinkerise config list
tinkerise config get packageManager
tinkerise config set packageManager pnpm

Project config lives in tinkerise.config.ts inside your current project and overrides global values.

Use --project with config commands:

Terminal window
tinkerise config init --project
tinkerise config list --project
tinkerise config set typescript true --project

The generated file shape is:

import { defineConfig } from '@tinkerise/shared'
export default defineConfig({
packageManager: 'pnpm',
typescript: true,
defaultCategory: 'web',
})

Final config is resolved with this order:

  1. preset (lowest priority)
  2. global
  3. project
  4. CLI flags (highest priority)

In source, resolveConfig() loads layers then calls:

mergeConfigChain(presetConfig, globalConfig, projectConfig, cliFlags)

mergeConfigChain() merges left to right, so later layers override earlier layers.

  • Global: packageManager = npm
  • Project: packageManager = pnpm
  • CLI: not provided

Final value: pnpm

  • Preset: defaultCategory = web
  • Global: defaultCategory = backend
  • Project: defaultCategory = mobile
  • CLI run: tinkerise --category web

Final value: web

  • Preset provides typescript = true
  • No global/project/CLI value

Final value: true

  1. Set personal defaults globally (config set ...)
  2. Set team or repo defaults in tinkerise.config.ts
  3. Use presets for reusable stack bundles
  4. Use CLI flags for one-off overrides
  • If a value is not what you expect, check all four layers in precedence order.
  • config list --project only shows project values, not merged output.
  • CLI flags always win for that single command invocation.