Skip to content
This repository was archived by the owner on May 4, 2026. It is now read-only.

Commit 00ec6f7

Browse files
Merge pull request #586 from ProvableHQ/mohammadfawaz/docs_for_with_flag
Document --with for `execute` and `deploy`
2 parents 8fc7e1e + 3f0e9ee commit 00ec6f7

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

documentation/cli/08_execute.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,25 @@ Specifies the priority fee for the deployment transaction(s) delimited by `|` an
149149

150150
Specifies the record(s) to pay for fees privately, delimited by `|` and used in order. The fees must either be valid plaintext, ciphertext, or `default`. If not specified, then transaction fees will be public.
151151

152+
#### `--with <WITH>...`
153+
154+
Specifies one or more additional programs to load into the VM at runtime. Each entry can be:
155+
- A path to a local `.aleo` bytecode file (e.g. `./extra_prog.aleo`)
156+
- The name of a remote program to fetch from the network endpoint (along with its transitive dependencies)
157+
158+
Multiple programs can be provided as a comma-separated list. When specifying local `.aleo` files, they must be listed in topological order — i.e. a dependency must appear before any program that depends on it.
159+
160+
This is useful when a program has dynamic dependencies that are not declared in `program.json` and therefore cannot be resolved at build time.
161+
162+
```bash
163+
leo execute <FUNCTION_NAME> <INPUTS> --with ./extra_prog.aleo
164+
leo execute <FUNCTION_NAME> <INPUTS> --with program1.aleo,program2.aleo
165+
```
166+
167+
:::note
168+
When loading remote programs, an `--endpoint` must be set.
169+
:::
170+
152171
#### `--consensus-heights <CONSENSUS_HEIGHTS>`
153172

154173
Specifies the consensus heights to use, delimited by `,`. This should only be set if you are using a custom devnet.

documentation/cli/12_run.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ leo run <FUNCTION_NAME> -- <INPUT_0> -- <INPUT_1> ...
5050
### Flags:
5151

5252
```
53+
--with <WITH>...
54+
Comma-separated list of additional programs to load into the VM at runtime.
55+
Each entry can be a path to a local `.aleo` bytecode file or the name of a
56+
remote program to fetch (with its transitive dependencies) from the network
57+
endpoint. Local files must be listed in topological order (dependencies
58+
before the programs that depend on them).
5359
--offline
5460
Enables offline mode.
5561
--enable-ast-spans

0 commit comments

Comments
 (0)