acton run
Reference manual for the acton run command
Synopsis
acton run [options] script [args...]
Description
Run a command from the [scripts] section of Acton.toml.
This is similar to npm run: it lets you define short aliases for common
commands, multi-step workflows, or shell snippets and then execute them through
Acton.
Options
Run Options
Name of the script entry in [scripts].
Arguments appended to the configured script command.
Display Options
Control when to use colored output.
auto, always, never
Project Options
Path to the Acton.toml file to use for this invocation.
Use this when running the command outside the project directory or when the manifest lives at a non-default location.
Path to the project root to use for configuration discovery and relative defaults.
This conflicts with --manifest-path.
Configuration
Scripts are defined in Acton.toml:
[scripts]
deploy = "acton script scripts/deploy.tolk --net testnet"
test-unit = "acton test tests/unit"
custom-task = "echo 'Running custom task...'"Behavior
- extra arguments passed after the script name are appended to the configured command
- if the script exits non-zero,
acton runexits non-zero and includes the nested exit code in the error message - on Unix-like systems scripts are executed via
sh -c - on Windows scripts are executed via
cmd /C - scripts run with the resolved project root as the working directory
- stdin, stdout, stderr, and environment variables are inherited
- arguments after
_script_are forwarded even when they start with-; use--only as an optional visual separator if you prefer - forwarded arguments are appended literally, so avoid passing the same single-use flag twice if the configured command already includes it
- Acton does not guard against recursive script aliases; avoid scripts that
call themselves through
acton run
Exit Status
0: The configured script finished successfully.1: The script was missing, the shell could not start it, or the nested command exited non-zero. The nested command's exit code is reported in the error message.
Examples
-
Run a configured script:
acton run deploy -
Append extra arguments:
acton run deploy --explorer tonscan -
Run a custom shell task:
acton run custom-task -
Use
--as an explicit separator if you prefer:acton run deploy -- --show-bodies
See Also
acton help script- Run command guide
Last updated on