Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ton-blockchain/acton/llms.txt

Use this file to discover all available pages before exploring further.

acton new creates a fully-initialized TON smart contract project in a new directory. It copies the selected template scaffold, writes starter files such as Acton.toml, .env.example, .editorconfig, and .gitignore, installs the bundled standard library, and optionally sets up Git hooks and an AGENTS.md coding-agent guidance file. When git is available in PATH the command also runs git init and git add . inside the new directory — no initial commit is created.

Synopsis

acton new [OPTIONS] <PATH>
acton new --templates        # list available templates as JSON

Arguments & options

Positional

ArgumentDescription
<PATH>Directory to create the project in. Use . to scaffold into the current directory. Required unless --templates is passed.

Project options

FlagTypeDefaultDescription
--name <NAME>stringdirectory nameProject name written to Acton.toml. Interactive mode prompts when omitted.
--description <DESC>stringA TON blockchain projectProject description written to Acton.toml.
--template <TEMPLATE>enumpromptedTemplate to use. See Templates below.
--license <LICENSE>stringMITSPDX license identifier. Acton writes a LICENSE file for built-in templates.
--appflagfalseInclude the TypeScript app scaffold when the template supports it.
--hooksflagfalseCreate and install the default project-local Git hooks.
--agentsflagfalseInclude an AGENTS.md file with coding-agent guidance.
--overwriteflagfalseOverwrite existing files that collide with template paths.

Global flags

FlagTypeDefaultDescription
--color <WHEN>auto | always | neverautoControl coloured output.
--manifest-path <PATH>pathAccepted for CLI consistency; acton new does not load an existing manifest. Conflicts with --project-root.
--project-root <PATH>pathAccepted for CLI consistency; acton new does not require an existing project root. Conflicts with --manifest-path.

Templates

A minimal project skeleton with an empty contract, no tests or scripts. Use this as a blank canvas when none of the other templates fit your use case.
All built-in templates support --app. With --app, Acton adds a Vite-based React app under app/, generated TypeScript wrappers under wrappers-ts/, and top-level package.json / package-lock.json files. Run npm ci before using frontend commands. There are no separate counter-app, jetton-app, or nft-app template names — use --template counter --app (etc.) instead.

TypeScript app layout

When --app is used the project gets:
  • contracts/src/ — contract sources and shared Tolk types
  • contracts/tests/ — tests
  • contracts/wrappers/ — generated Tolk wrappers
  • contracts/scripts/ — deployment and utility scripts
  • wrappers-ts/ — generated TypeScript wrappers
  • app/ — React + Vite frontend
Common commands in the generated app workspace:
npm run dev          # start the Vite dev server
npm run build        # build the frontend bundle (runs acton build first)
npm run typecheck    # TypeScript type checking
npm run fmt          # format frontend sources
npm run test         # run acton test (when the template provides it)

Interactive mode

When standard input and output are both connected to a terminal, acton new uses a short interactive flow asking for:
  1. Project name
  2. Template
  3. Whether to include the TypeScript app layout
  4. Whether to configure advanced options (description, license, Git hooks, AGENTS.md)
For CI or scripting, pass --name, --template, and any other flags to avoid prompts entirely.

Examples

acton new my-project
If <PATH> already exists as a non-empty directory, acton new refuses to continue. Pass --overwrite to allow overwriting files that collide with template paths, or use . to scaffold into the current directory.

Build docs developers (and LLMs) love