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 init adds Acton support to the current working directory without creating a new project folder. It is the right command when you already have a repository and want to layer in Acton.toml, the bundled standard library, standard ignore patterns, and symlinks to global wallet and library overlays. The command is safe to re-run at any time — it never overwrites an existing Acton.toml and only appends missing entries to .gitignore.

Synopsis

acton init [OPTIONS]

Options

FlagTypeDefaultDescription
--create-dapp [PATH]pathappSkip project initialization and only create a Vite-based TypeScript app scaffold at PATH. The target directory must not exist. Conflicts with --stdlib-only.
--stdlib-onlyflagfalseRe-extract the bundled standard library into .acton/ without touching Acton.toml, .gitignore, or symlinks. Always refreshes even if the stored version already matches. Conflicts with --create-dapp.
--color <WHEN>auto | always | neverautoControl coloured output.
--manifest-path <PATH>pathAccepted for CLI consistency; acton init does not require an existing manifest. Conflicts with --project-root.
--project-root <PATH>pathAccepted for CLI consistency; acton init does not require an existing project root. Conflicts with --manifest-path.

Use cases

Run acton init inside any directory that contains .tolk files. Acton scans the tree for files that define onInternalMessage, registers them as contracts in a freshly created Acton.toml, and installs the standard library.
cd my-existing-repo
acton init
If Acton.toml already exists, it is left completely untouched.

What the default flow creates or patches

PathBehaviour
Acton.tomlCreated with discovered contracts if absent; left untouched if present.
.gitignoreMissing Acton-related patterns are appended; existing patterns are never removed.
.acton/tolk-stdlibInstalled or refreshed.
global.wallets.toml symlinkCreated when the global file exists and the local path does not yet resolve.
global.libraries.toml symlinkCreated when the global file exists and the local path does not yet resolve.
With --create-dapp, Acton only writes inside the new app directory.
With --stdlib-only, Acton only writes inside .acton/.

Contract auto-discovery

When Acton.toml is created from scratch, Acton walks the current directory tree and:
  • skips hidden directories and node_modules, target, .git, .acton
  • considers only .tolk files
  • treats any file that defines onInternalMessage as a contract entry file
  • derives the contract key from the file stem with -_
  • derives the display name by splitting on _ / - and capitalising each word

Idempotency

acton init is safe to run repeatedly:
  • never overwrites an existing Acton.toml
  • only appends missing .gitignore patterns
  • refreshes .acton/tolk-stdlib on every run
  • re-attempts symlink creation without breaking existing symlinks
--stdlib-only always re-extracts the standard library, even when the stored version marker matches the current Acton version.

Examples

acton init

Build docs developers (and LLMs) love