Learn how to run shell commands in Replit Apps using the exec API module. Includes methods for spawning processes and executing commands.
exec
api module allows you to execute arbitrary shell commands.
exec.spawn
exec.exec
Property | Type |
---|---|
args | string[] |
env? | Record<string, string> |
splitStderr? | boolean |
Property | Type |
---|---|
args | string[] |
env? | Record<string, string> |
onOutput? | Function |
splitStderr? | false |
Property | Type |
---|---|
exitCode | number |
output | string |
Property | Type |
---|---|
dispose | Function |
resultPromise | Promise<SpawnResult> |
Property | Type |
---|---|
error | null │ string |
exitCode | number |
Property | Type |
---|---|
args | string[] |
env? | Record<string, string> |
onStdErr? | OutputStrCallback |
onStdOut? | OutputStrCallback |
splitStderr | true |