acton new
Reference manual for the acton new command
Synopsis
acton new [options] path
Description
Create a new Acton project in the given directory.
The command creates the target directory if it does not exist, copies the
selected template scaffold, writes starter project files such as Acton.toml,
.env.example, .editorconfig, and .gitignore, installs the bundled standard
library, and optionally initializes Git hooks and AGENTS.md guidance.
If _path_ already exists as a directory, acton new fails instead of trying
to merge into that directory, even when it is empty. acton new . is the
explicit exception: it scaffolds into the current directory and may overwrite
existing files whose paths collide with the selected template.
If git is available in PATH, acton new runs git init in the project
directory and then runs git add ., which stages all current-directory
changes, not only files created by the scaffold.
The command does not create an initial commit.
Options
New Options
Directory to create the project in. Use . to create a new project in the
current directory.
Project name. If not provided, interactive mode prompts for it and defaults to the target directory name.
Project description written to Acton.toml. If not provided, Acton uses
A TON blockchain project by default. In interactive mode you can override it
after opting into advanced options.
Project template to use.
empty, counter, jetton, nft
If not provided, interactive mode prompts for the template.
License identifier to place into Acton.toml and use for the generated
LICENSE file when Acton has a built-in template for that license.
If not provided, Acton uses MIT by default. In interactive mode you can
override it after opting into advanced options.
Include the template's TypeScript app scaffold when available.
All built-in templates currently support the app layout: empty, counter,
jetton, and nft. If you pass --app for a template that does not support it,
acton new fails.
If the selected template supports the app layout and --app is not provided,
interactive mode prompts for this choice. Non-interactive mode leaves the app
layout disabled unless --app is passed explicitly.
Create and install the default project-local Git hooks.
If git is available and --hooks is not provided, interactive mode offers
this choice after you opt into advanced options. Non-interactive mode leaves
hooks disabled unless --hooks is passed explicitly.
Include an AGENTS.md file with coding-agent guidance from the selected
template.
If --agents is not provided, interactive mode offers this choice after you
opt into advanced options. Non-interactive mode leaves AGENTS.md disabled
unless --agents is passed explicitly.
Display Options
Control when to use colored output.
auto, always, never
Project Options
Accepted as a global Acton option for CLI consistency.
acton new creates a project and does not require an existing Acton.toml.
The command does not resolve a project manifest before running, and this option
remains mutually exclusive with --project-root.
Accepted as a global Acton option for CLI consistency.
acton new creates a project and does not require an existing project root.
The command does not resolve a project root before running, and this option
remains mutually exclusive with --manifest-path.
Templates
empty
Minimal project skeleton with:
- one starter contract
- generated wrapper and tests
- deployment script
- CI workflow
- optional
AGENTS.md
counter
Counter contract template with:
- one contract, wrapper, and tests
- deployment script
- CI workflow
- optional
AGENTS.md
jetton
Jetton minter and wallet template with:
- multi-contract scaffold
- wrappers and tests
- deployment script
- CI workflow
- optional
AGENTS.md
nft
NFT collection and item template with:
- collection and item contracts
- wrappers and tests
- deployment scripts
- CI workflow
- optional
AGENTS.md
All built-in templates support the optional TypeScript app layout with --app:
empty, counter, jetton, and nft.
With --app, Acton also creates a Vite-based React app and top-level npm
metadata files. App templates with frontend contract flows also include
generated TypeScript wrappers.
Interactive Mode
When enough information is missing and standard input/output are connected to a
terminal, acton new uses a short default flow:
- project name
- template
- whether to include the TypeScript app layout when the template supports it
- whether to configure advanced options
If you opt into advanced options, Acton can then prompt for:
- description
- license
- whether to install the default Git hooks when
gitis available - whether to include
AGENTS.md
If you skip advanced options, Acton keeps the default description A TON blockchain project, the default license MIT, and leaves optional features
disabled unless their flags are passed explicitly.
In non-interactive mode, optional features stay disabled unless their flags are
passed explicitly. For CI or scripts, pass --name, --description,
--template, and --license if you want to avoid prompts entirely.
Files
The generated project always includes:
Acton.toml.acton/.env.example.editorconfig.gitignore
Depending on the selected template and options, Acton may also generate:
- contract sources
- tests
- wrappers
- wrappers that usually include helper shapes such as
fromStorage(...),deploy(...),send{Name}(...),sendAny(...), and typed get-method calls - deployment scripts
[scripts]aliases such asdeploy-emulationanddeploy-testnetinActon.toml- frontend files for
--app .githooks/pre-commitfor--hooksAGENTS.mdfor--agents
TypeScript App Layout
When --app is used with a template that supports the app layout, the project
includes:
contracts/srcfor contract sources and shared Tolk typescontracts/testsfor tests and generated Tolk wrapperscontracts/scriptsfor deployment and utility scriptswrappers-ts/for generated TypeScript wrappers in app templates that call contracts from the frontendapp/for the React + Vite frontend- top-level
package.jsonandpackage-lock.jsonfor the frontend toolchain
Before running frontend commands, install the app dependencies:
npm ciThe generated app scaffold is a real frontend workspace, not just static demo
files. After npm ci, use the usual frontend lifecycle commands from the
generated package.json alongside normal Acton contract commands.
Common commands in that generated app workspace:
npm run devto start the Vite development servernpm run buildto build the frontend bundle; contract-aware app templates runacton buildfirstnpm run typecheckfor TypeScript checkingnpm run fmtandnpm run fmt:checkfor frontend formattingnpm testto run the bundledacton testcommand when the template provides it
Side Effects
acton new writes only inside the chosen target directory. When _path_ is
., that means the current directory itself, and existing files with the same
paths as template files can be overwritten.
It also installs .acton/tolk-stdlib there unless
ACTON_DISABLE_AUTO_STDLIB=1 is set, may create .githooks/ plus an
AGENTS.md file when requested, and, when git is available, initializes the
project repository and runs git add ., which stages all current-directory
contents.
The command does not create a commit and does not modify parent directories.
Exit Status
0: The project scaffold was created successfully.1: Project creation failed because the target path already existed, a prompt could not be completed, or a filesystem/setup step failed.
Examples
-
Create a new project in
my-project:acton new my-project -
Create a non-interactive counter project with explicit metadata:
acton new my-project --name "My Project" --description "Cool description" --template counter --license MIT -
Create a project with the TypeScript app layout:
acton new my-project --template empty --app -
Create a project and include
AGENTS.mdguidance:acton new my-project --template empty --agents -
Create a project in the current directory:
acton new . --template empty --name "My Project" --description "A TON blockchain project" --license MIT
See Also
acton help init- Project initialization guide
- Build system configuration reference
Last updated on