> ## Documentation Index
> Fetch the complete documentation index at: https://base-a060aa97-docs-use-case-ia-overhaul.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# base-anvil CLI

> Base's Foundry build: install base-forge, base-cast, and base-anvil, which teach Foundry about Base's native precompiles.

[base-anvil](https://github.com/base/base-anvil) is a fork of Foundry that teaches `forge`, `cast`, `anvil`, and `chisel` about Base's native precompiles — the [B20 token factory](/base-chain/network-information/b20-token-standard), B20 tokens, the PolicyRegistry, and the ActivationRegistry. Stock Foundry can't reach these precompile addresses and aborts with `call to non-contract address`; base-anvil registers them into its EVM so you can build and test Base apps locally.

## Install

It installs alongside your existing Foundry without overwriting stock `foundryup` or your `forge`/`cast`/`anvil`/`chisel`:

```bash theme={null}
curl -L https://raw.githubusercontent.com/base/base-anvil/HEAD/foundryup/install | bash
base-foundryup
```

This adds `base-foundryup` and the namespaced `base-forge`, `base-cast`, `base-anvil`, and `base-chisel` commands, which enable Base precompiles by default.

## Pick a Base version

base-anvil's versioned releases are named after the Base chain release they target. Pin a release with:

```bash theme={null}
base-foundryup --install <version>
```

## Commands

| Command       | Stands in for | Purpose                                                           |
| ------------- | ------------- | ----------------------------------------------------------------- |
| `base-forge`  | `forge`       | Build, test, and deploy contracts against Base precompiles        |
| `base-cast`   | `cast`        | Send transactions and read chain data, including precompile calls |
| `base-anvil`  | `anvil`       | Run a local Base node with precompiles enabled                    |
| `base-chisel` | `chisel`      | Solidity REPL with Base precompiles                               |

Everything else is inherited from upstream [Foundry](https://book.getfoundry.sh/) and works unchanged; only the Base additions above are specific to this fork.

## Next steps

<CardGroup cols={2}>
  <Card title="Smart Contracts" icon="file-contract" href="/base-chain/network-information/smart-contracts">
    Deploy a contract to Base Sepolia with base-anvil, end to end.
  </Card>

  <Card title="B20 Token Standard" icon="coins" href="/base-chain/network-information/b20-token-standard">
    Launch Base's native token standard from the command line.
  </Card>
</CardGroup>
