--- description: Run one command or one script in a service's directory with its exact environment, using stackctl exec and stackctl run. --- # One-off commands Sometimes you don't want the whole stack, only one command with a service's environment: a migration, a seed script, a REPL, a test run. ```bash sctl exec api -- node src/migrate.ts # a command, in api's directory with api's env sctl run api seed -- --rows=100 # api's `seed` script, with arguments cd apps/api && sctl run seed # no target: the current directory ``` - **`sctl exec [target] -- `** runs a literal command. The `--` is required. - **`sctl run [target]