diff --git a/.changeset/light-bananas-deny.md b/.changeset/light-bananas-deny.md new file mode 100644 index 0000000000..eb5a52e83f --- /dev/null +++ b/.changeset/light-bananas-deny.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/cli": patch +--- + +Added `--worldAddress` argument to `dev-contracts` CLI command so that you can develop against an existing world. diff --git a/next-docs/pages/cli/deploy.mdx b/next-docs/pages/cli/deploy.mdx index c3390ff24d..7fbd94656e 100644 --- a/next-docs/pages/cli/deploy.mdx +++ b/next-docs/pages/cli/deploy.mdx @@ -35,16 +35,16 @@ Again, there are several ways to do this: These are the command line options you can specify on `mud deploy`: -| Option | Meaning | Type | Default value | -| ----------------------- | ------------------------------------------------ | ------- | -------------------------------------------------------- | +| Option | Meaning | Type | Default value | +| ----------------------- | ------------------------------------------------ | ------- | ---------------------------------------------------------- | | `--version` | Show version number | boolean | `false` | -| `--configPath` | Path to the config file | string | `foundry.toml` | +| `--configPath` | Path to the config file | string | `foundry.toml` | | `--printConfig` | Print the resolved config | boolean | `false` | | `--saveDeployment | Save the deployment info to a file | boolean | `true` | -| `--profile` | The foundry profile to use | string | `local` | -| `--rpc`1 | The RPC URL to use | string | RPC url from `foundry.toml` | -| `--worldAddress` | Deploy to an existing World at the given address | string | Empty, deploy new `World` | -| `--srcDir` | Source directory | string | Foundry `src` directory | +| `--profile` | The foundry profile to use | string | `local` | +| `--rpc`1 | The RPC URL to use | string | RPC url from `foundry.toml` | +| `--worldAddress` | Deploy to an existing World at the given address | string | Empty, deploy new `World` | +| `--srcDir` | Source directory | string | Foundry `src` directory | | `--skipBuild` | Skip rebuilding the contracts before deploying | boolean | `false` | | `--alwaysRunPostDeploy` | Run `PostDeploy.s.sol` after each deploy | boolean | `false` (run the script only when deploying a new `World`) | | `--help` | Show help | boolean | `false` | diff --git a/next-docs/pages/cli/set-version.mdx b/next-docs/pages/cli/set-version.mdx index 6f30fe92e3..a4a5ea5611 100644 --- a/next-docs/pages/cli/set-version.mdx +++ b/next-docs/pages/cli/set-version.mdx @@ -15,10 +15,10 @@ pnpm install These are the command line options you can specify on `mud set-version`: -| Option | Meaning | Type | Default value | -| -------------- | ------------------------------------------------------------ | ------- | ------------- | -| `--version` | Show version number | boolean | false | -| `--mudVersion` | Set MUD to the given version | string | true | -| `--tag` | Set MUD to the latest version with the given tag from npm | string | | -| `--commit` | Set MUD to the version based on a given git commit hash | string | -| `--help` | Show help | boolean | false | +| Option | Meaning | Type | Default value | +| -------------- | --------------------------------------------------------- | ------- | ------------- | +| `--version` | Show version number | boolean | false | +| `--mudVersion` | Set MUD to the given version | string | true | +| `--tag` | Set MUD to the latest version with the given tag from npm | string | | +| `--commit` | Set MUD to the version based on a given git commit hash | string | +| `--help` | Show help | boolean | false | diff --git a/packages/cli/src/commands/dev-contracts.ts b/packages/cli/src/commands/dev-contracts.ts index 3e0ee29ce4..44e25634c3 100644 --- a/packages/cli/src/commands/dev-contracts.ts +++ b/packages/cli/src/commands/dev-contracts.ts @@ -17,6 +17,7 @@ const devOptions = { rpc: deployOptions.rpc, configPath: deployOptions.configPath, alwaysRunPostDeploy: deployOptions.alwaysRunPostDeploy, + worldAddress: deployOptions.worldAddress, }; const commandModule: CommandModule> = { @@ -67,7 +68,7 @@ const commandModule: CommandModule