Using blueprint.config.ts
blueprint.config.ts
is an optional yet convenient file that lives in the project root and pre-defines all network (and other) CLI parameters.
Why bother?
- Run CLI commands non-interactively – perfect for CI pipelines.
- Keep a single source of truth every team member shares.
- Still freely override any option with a CLI flag when you need to.
File skeleton
import { Config } from '@ton/blueprint';
export const config: Config = {
// see the table below
};
After that you can simply call:
npx blueprint run # or build / test / etc.
CLI flags always have higher priority and can temporarily override the settings from the config.
Option reference
Priority: CLI flags (e.g.
--custom …
) always override values from the config.
Full example
import { Config } from '@ton/blueprint';
import { ScaffoldPlugin } from 'blueprint-scaffold';
export const config: Config = {
plugins: [new ScaffoldPlugin()],
network: {
endpoint: 'https://toncenter.com/api/v2/jsonRPC',
version: 'v2',
type: 'mainnet',
key: process.env.TONCENTER_KEY, // keep secrets in env vars
},
separateCompilables: true,
recursiveWrappers: true,
requestTimeout: 15_000, // 15 seconds
manifestUrl: 'https://example.com/my-dapp/manifest.json',
};
When to use
- CI & automation – run
blueprint build
,blueprint test
, etc. without any interactive questions. - Team projects – share the same network parameters and timeouts across all developers.
- Third-party plugins – register them via
plugins
and they become available in every CLI command.