Configuration
Use configuration to set sane defaults for package manager, TypeScript, and default category.
Quick start
Section titled “Quick start”Initialize global config:
tinkerise config initList active values:
tinkerise config listSupported keys
Section titled “Supported keys”tinkerise config manages three keys:
packageManager:npm | pnpm | yarn | buntypescript:true | falsedefaultCategory:web | backend | mobile
Config scopes
Section titled “Config scopes”Global scope (default)
Section titled “Global scope (default)”Global config is stored in your user config directory and applies everywhere unless overridden.
Common commands:
tinkerise config listtinkerise config get packageManagertinkerise config set packageManager pnpmProject scope
Section titled “Project scope”Project config lives in tinkerise.config.ts inside your current project and overrides global values.
Use --project with config commands:
tinkerise config init --projecttinkerise config list --projecttinkerise config set typescript true --projectThe generated file shape is:
import { defineConfig } from '@tinkerise/shared'
export default defineConfig({ packageManager: 'pnpm', typescript: true, defaultCategory: 'web',})Exact merge precedence
Section titled “Exact merge precedence”Final config is resolved with this order:
preset(lowest priority)globalprojectCLI 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.
Precedence examples
Section titled “Precedence examples”Example A: project overrides global
Section titled “Example A: project overrides global”- Global:
packageManager = npm - Project:
packageManager = pnpm - CLI: not provided
Final value: pnpm
Example B: CLI overrides project
Section titled “Example B: CLI overrides project”- Preset:
defaultCategory = web - Global:
defaultCategory = backend - Project:
defaultCategory = mobile - CLI run:
tinkerise --category web
Final value: web
Example C: only preset present
Section titled “Example C: only preset present”- Preset provides
typescript = true - No global/project/CLI value
Final value: true
Practical workflow
Section titled “Practical workflow”- Set personal defaults globally (
config set ...) - Set team or repo defaults in
tinkerise.config.ts - Use presets for reusable stack bundles
- Use CLI flags for one-off overrides
Troubleshooting
Section titled “Troubleshooting”- If a value is not what you expect, check all four layers in precedence order.
config list --projectonly shows project values, not merged output.- CLI flags always win for that single command invocation.