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

Commit ab45f85

Browse files
author
Alex Kim
committed
Adding new cli flags
1 parent 413852a commit ab45f85

2 files changed

Lines changed: 27 additions & 2 deletions

File tree

documentation/cli/execute.mdx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,13 @@ The endpoint to deploy to. Overrides any `ENDPOINT` environment variable set man
9595

9696
**Common Endpoints:**
9797

98-
<!-- markdown-link-check-disable -->
9998

10099
| Network | Endpoint |
101100
| :------------: | :----------------------------------: |
102101
| Devnet (local) | https://localhost:3030 |
103102
| Testnet | https://api.explorer.provable.com/v1 |
104103
| Mainnet | https://api.explorer.provable.com/v1 |
105104

106-
<!-- markdown-link-check-enable -->
107105

108106
#### `--devnet`
109107

@@ -149,6 +147,27 @@ Specifies the priority fee for the deployment transaction(s) delimited by `|` an
149147

150148
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.
151149

150+
151+
#### `--with <WITH>...`
152+
153+
Specifies one or more additional programs to load into the VM at runtime. Each entry can be:
154+
- A path to a local `.aleo` bytecode file (e.g. `./extra_prog.aleo`)
155+
- The name of a remote program to fetch from the network endpoint (along with its transitive dependencies)
156+
157+
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.
158+
159+
This is useful when a program has dynamic dependencies that are not declared in `program.json` and therefore cannot be resolved at build time.
160+
161+
```bash
162+
leo execute <FUNCTION_NAME> <INPUTS> --with ./extra_prog.aleo
163+
leo execute <FUNCTION_NAME> <INPUTS> --with program1.aleo,program2.aleo
164+
```
165+
166+
:::note
167+
When loading remote programs, an `--endpoint` must be set.
168+
:::
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/run.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,10 @@ leo run <FUNCTION_NAME> -- <INPUT_0> -- <INPUT_1> ...
8282
Whether the network is a devnet. If not set, defaults to the `DEVNET` environment variable.
8383
--consensus-heights <CONSENSUS_HEIGHTS>
8484
Optional consensus heights to use. This should only be set if you are using a custom devnet.
85+
--with <WITH>...
86+
Comma-separated list of additional programs to load into the VM at runtime.
87+
Each entry can be a path to a local `.aleo` bytecode file or the name of a
88+
remote program to fetch (with its transitive dependencies) from the network
89+
endpoint. Local files must be listed in topological order (dependencies
90+
before the programs that depend on them).
8591
```

0 commit comments

Comments
 (0)