This (very) short guide shows how to set the [starknet_cli](<https://docs.starknet.io/docs/CLI/commands>) to work with a non-standard StarkNet environment.

If you have already installed the StarkNet environment, you can skip step 1 and go straight to step

  1. Update pip and then set up a working Cairo virtual environment.

    After installing cairo-lang package, run starknet —version and make sure you get 0.8.1.

    If you’re on a mac M1 running this command should fix any installation problem

    CFLAGS=-I`brew --prefix gmp`/include LDFLAGS=-L`brew --prefix gmp`/lib pip install ecdsa fastecdsa sympy
    

Docker-based solution in case the above does not work. (Toggle)

  1. Next, we set the network variables to point to our environment. This step depends on your specific environment. You can find the relevant addresses here.

    # E.g., working on `hackathon-0`.
    <https://hackathon-0.voyager.online/>
    export STARKNET_GATEWAY_URL=https://hackathon-0.starknet.io
    export STARKNET_FEEDER_GATEWAY_URL=https://hackathon-0.starknet.io
    export STARKNET_CHAIN_ID=SN_GOERLI
    export STARKNET_NETWORK_ID=hackathon-0
    # If you've set a network environment variable unset it
    unset STARKNET_NETWORK
    
  2. Test that we are live:

    # Make sure the gateway is up.
    curl <https://hackathon-0.starknet.io/feeder_gateway/is_alive>
    
    # Check if the CLI works.
    starknet get_block
    

    Other tools such as the HardHat plugin, Nile, or the various SDKs (js, py, rs) can be modified in the same way to work against a standalone StarkNet. Follow each tool’s documentation to see how to change the relevant configs, or find the actual developers in the hackathon.

    All done? You can now continue to see the environment parameters, or deploy an account and fund it.