Acton
Command reference

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

<script>

Name of the script entry in [scripts].

<args>...

Arguments appended to the configured script command.

Display Options

--color<when>

Control when to use colored output.

Possible values:

auto, always, never

Project Options

--manifest-path<path>

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.

--project-root<path>

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 run exits 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

  1. Run a configured script:

    acton run deploy
  2. Append extra arguments:

    acton run deploy --explorer tonscan
  3. Run a custom shell task:

    acton run custom-task
  4. Use -- as an explicit separator if you prefer:

    acton run deploy -- --show-bodies

See Also

Last updated on

On this page