Skip to main content

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

PathType / ValuesDefaultDescription
pluginsPlugin[][]Connect external Blueprint extensions. A plugin must implement the Plugin interface and return a set of CLI runners.
network'mainnet' | 'testnet' or CustomNetworkundefinedDefault network environment. If omitted, Blueprint will ask at runtime.
network.endpointstringRPC node URL. Required for custom; for the rest the built-in TON Center endpoint is used.
network.version'v2' | 'v4' | 'tonapi' | 'liteclient''v2'API version of the target node.
network.keystringAPI key if required (e.g., TON Center v2 / TonAPI).
network.type'mainnet' | 'testnet' | 'custom''custom'Logical network type that will be reflected in explorer links, etc.
separateCompilablesbooleanfalseWhen true, *.compile.ts files are placed into compilables folder (otherwise into wrappers).
requestTimeoutnumber (ms)undefinedOverrides the global HTTP timeout for API requests.
recursiveWrappersbooleanfalseRecursively walk through sub-folders of wrappers / compilables when searching for contracts.
manifestUrlstring'https://raw.githubusercontent.com/ton-org/blueprint/main/tonconnect/manifest.json'URL of the manifest.json file that a TON Connect wallet shows to the user.

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

  1. CI & automation – run blueprint build, blueprint test, etc. without any interactive questions.
  2. Team projects – share the same network parameters and timeouts across all developers.
  3. Third-party plugins – register them via plugins and they become available in every CLI command.