diff --git a/docs/HyperIndex/Advanced/generated-files.md b/docs/HyperIndex/Advanced/generated-files.md
index a2be9937..4f482e63 100644
--- a/docs/HyperIndex/Advanced/generated-files.md
+++ b/docs/HyperIndex/Advanced/generated-files.md
@@ -7,15 +7,15 @@ slug: /generated-files
# Generated files
-The `/generated` directory contains essential files required for performing the indexing process in Envio. These files are automatically generated using the `envio codegen` CLI command and they should NOT be modified by the end user.
+The `/generated` directory contains essential files required for performing the indexing process in Envio. These files are automatically generated using the `pnpm envio codegen` CLI command and they should NOT be modified by the end user.
If indexing errors occur, they are likely a result of issues in the generated files, which may point to an incorrect specification in the setup files (`config.yaml`, `schema.graphql` and `EventHandlers.*`)
-Once all setup file errors have been resolved, you can rerun the `envio codegen` command to re-generate the necessary indexing files.
+Once all setup file errors have been resolved, you can rerun the `pnpm envio codegen` command to re-generate the necessary indexing files.
The variables used in the generated files adhere to the names specified in the configuration and schema files during the initial setup. This ensures consistency between the generated files and the contracts, events, and entities defined in the configuration and schema.
The generated files are initially created in ReScript and then compiled to JavaScript (`.bs.js` extension) for runtime execution.
----
\ No newline at end of file
+---
diff --git a/docs/HyperIndex/Advanced/performance/benchmarking.md b/docs/HyperIndex/Advanced/performance/benchmarking.md
index 7a51e77c..cc776d52 100644
--- a/docs/HyperIndex/Advanced/performance/benchmarking.md
+++ b/docs/HyperIndex/Advanced/performance/benchmarking.md
@@ -9,7 +9,7 @@ slug: /benchmarking
### Capturing the benchmark
-You can run `envio start --bench` to capture some benchmarking data while your indexer is running. This should not be run in production, since it holds each benchmark data point in memory and adds some overhead in writing to a file.
+You can run `pnpm envio start --bench` to capture some benchmarking data while your indexer is running. This should not be run in production, since it holds each benchmark data point in memory and adds some overhead in writing to a file.
### Printing the benchmark
diff --git a/docs/HyperIndex/Examples/example-ens.md b/docs/HyperIndex/Examples/example-ens.md
index 690abdd7..58305daf 100644
--- a/docs/HyperIndex/Examples/example-ens.md
+++ b/docs/HyperIndex/Examples/example-ens.md
@@ -18,4 +18,4 @@ The indexer has been built using v0.0.37 of Envio.
3. Install with `pnpm i`
4. Generate indexing code via `pnpm envio codegen`
5. Run the indexer via `pnpm envio dev` (make sure you have Docker running)
-6. Stop the indexer via `envio stop`
+6. Stop the indexer via `pnpm envio stop`
diff --git a/docs/HyperIndex/Examples/example-liquidation-metrics.md b/docs/HyperIndex/Examples/example-liquidation-metrics.md
index 725ecd70..1ffebea3 100644
--- a/docs/HyperIndex/Examples/example-liquidation-metrics.md
+++ b/docs/HyperIndex/Examples/example-liquidation-metrics.md
@@ -36,6 +36,6 @@ The indexer has been built using v0.0.21 of Envio.
1. Clone the [repo](https://github.com/enviodev/liquidation-metrics)
2. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites)
3. Install Envio via `npm i -g envio@v0.0.21`
-4. Generate indexing code via `envio codegen`
-5. Run the indexer via `envio dev` (make sure you have Docker running)
-6. Stop the indexer via `envio stop`
+4. Generate indexing code via `pnpm envio codegen`
+5. Run the indexer via `pnpm envio dev` (make sure you have Docker running)
+6. Stop the indexer via `pnpm envio stop`
diff --git a/docs/HyperIndex/Examples/example-uniswap-v3.md b/docs/HyperIndex/Examples/example-uniswap-v3.md
index 6d681f78..e30ff58d 100644
--- a/docs/HyperIndex/Examples/example-uniswap-v3.md
+++ b/docs/HyperIndex/Examples/example-uniswap-v3.md
@@ -21,6 +21,6 @@ The indexer has been built using v0.0.21 of Envio.
1. Clone the [repo](https://github.com/enviodev/uniV3-swaps)
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites)
1. Install Envio via `npm i -g envio@v0.0.21`
-1. Generate indexing code via `envio codegen`
-1. Run the indexer via `envio dev` (make sure you have Docker running)
-1. Stop the indexer via `envio stop`
+1. Generate indexing code via `pnpm envio codegen`
+1. Run the indexer via `pnpm envio dev` (make sure you have Docker running)
+1. Stop the indexer via `pnpm envio stop`
diff --git a/docs/HyperIndex/Guides/cli-commands.md b/docs/HyperIndex/Guides/cli-commands.md
index dd853209..2cf34966 100644
--- a/docs/HyperIndex/Guides/cli-commands.md
+++ b/docs/HyperIndex/Guides/cli-commands.md
@@ -9,6 +9,8 @@ slug: /cli-commands
This document contains the help content for the `envio` command-line program.
+**_Note:_** `envio` is an executable, but it is recommended to always run `pnpx envio@latest` for the init command and `pnpm envio` when interacting with a specific repo. This ensures that you are using an up to date version for new projects, and use the correct version of the envio executable for local project you may look at.
+
**Command Overview:**
* [`envio`↴](#envio)
diff --git a/docs/HyperIndex/Guides/configuration-file.mdx b/docs/HyperIndex/Guides/configuration-file.mdx
index b480e44d..19fbc474 100644
--- a/docs/HyperIndex/Guides/configuration-file.mdx
+++ b/docs/HyperIndex/Guides/configuration-file.mdx
@@ -45,7 +45,7 @@ Once you have set up your config file and the [schema](./schema-file.md), you ar
Run the following command:
```bash
-envio codegen
+pnpm envio codegen
```
## Contract Addresses
diff --git a/docs/HyperIndex/Guides/event-handlers.mdx b/docs/HyperIndex/Guides/event-handlers.mdx
index bf959d4c..1afaa1e0 100644
--- a/docs/HyperIndex/Guides/event-handlers.mdx
+++ b/docs/HyperIndex/Guides/event-handlers.mdx
@@ -13,7 +13,7 @@ import TabItem from "@theme/TabItem";
Once the configuration and schema files are in place, run:
```bash
-envio codegen
+pnpm envio codegen
```
in the project directory to generate the functions you will use in your handlers.
diff --git a/docs/HyperIndex/Guides/hyperindex-basics.md b/docs/HyperIndex/Guides/hyperindex-basics.md
index e671a617..5f43cea4 100644
--- a/docs/HyperIndex/Guides/hyperindex-basics.md
+++ b/docs/HyperIndex/Guides/hyperindex-basics.md
@@ -11,8 +11,8 @@ The following files are required from the user to run HyperIndex:
- GraphQL Schema (defaults to `schema.graphql`)
- Event Handlers (defaults to `src/EventHandlers.*` depending on the language chosen)
-These files are auto-generated according to the template and language chosen by running the `envio init` command.
+These files are auto-generated according to the template and language chosen by running the `pnpx envio@latest init` command.
Click [here](../getting-started.md) for a Quickstart guide on how to get started.
----
\ No newline at end of file
+---
diff --git a/docs/HyperIndex/Guides/ipfs.md b/docs/HyperIndex/Guides/ipfs.md
index a11140ee..0dedd4f7 100644
--- a/docs/HyperIndex/Guides/ipfs.md
+++ b/docs/HyperIndex/Guides/ipfs.md
@@ -19,7 +19,7 @@ This guide assumes you are familiar with IPFS, however [jump](#what-is-ipfs) to
First, we create an indexer using the Envio contract import feature.
-`npx envio init`
+`npx pnpx envio@latest init`
Contract address: `0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D`
We then make some light modifications. The resulting config, schema, and event handlers look as follows.
diff --git a/docs/HyperIndex/Guides/running-locally.md b/docs/HyperIndex/Guides/running-locally.md
index 6e509473..5196e12b 100644
--- a/docs/HyperIndex/Guides/running-locally.md
+++ b/docs/HyperIndex/Guides/running-locally.md
@@ -7,14 +7,14 @@ slug: /running-locally
## Starting the Indexer
-Remember to `cd` into your project directory if you have defined one during `envio init`.
+Remember to `cd` into your project directory if you have defined one during `pnpx envio@latest init`.
Before running the Envio CLI command to start the indexer locally, please make sure you have [Docker](https://www.docker.com/products/docker-desktop/) running.
Run the indexer
```bash
-envio dev
+pnpm envio dev
```
This will automatically open up the Hasura dashboard where you can view the data that has been indexed.
@@ -26,7 +26,7 @@ Admin-secret / password for local Hasura is `testing`.
To delete the docker images used for the local development environment, run
```bash
-envio stop
+pnpm envio stop
```
## What next?
diff --git a/docs/HyperIndex/Guides/schema-file.md b/docs/HyperIndex/Guides/schema-file.md
index 48add0ef..278d5f48 100644
--- a/docs/HyperIndex/Guides/schema-file.md
+++ b/docs/HyperIndex/Guides/schema-file.md
@@ -84,10 +84,10 @@ In GraphQL, scalars represent fundamental data types such as strings and numbers
You can find out more on GraphQL [here](https://graphql.org/learn/).
-Once you have set up your config and schema file you can run `envio codegen` to generate the functions that you will use in your handlers.
+Once you have set up your config and schema file you can run `pnpm envio codegen` to generate the functions that you will use in your handlers.
```bash
-envio codegen
+pnpm envio codegen
```
## Defining One-to-Many Relationships
diff --git a/docs/HyperIndex/Guides/testing.mdx b/docs/HyperIndex/Guides/testing.mdx
index cde2ace3..c89b69c3 100644
--- a/docs/HyperIndex/Guides/testing.mdx
+++ b/docs/HyperIndex/Guides/testing.mdx
@@ -21,7 +21,7 @@ Tests are written in JavaScript, TypeScript, and ReScript for the Greeter templa
Generate `greeter` template in TypeScript using Envio CLI
```bash
-envio init template -l typescript -d greeter -t greeter -n greeter
+pnpx envio@latest init template -l typescript -d greeter -t greeter -n greeter
```
Run tests
@@ -81,10 +81,10 @@ Add a test command to your `package.json`
"test": "mocha",
```
-Make sure to run `envio codegen` when changes are made to the config or schema files to regenerate the testing library (`TestHelpers` file).
+Make sure to run `pnpm envio codegen` when changes are made to the config or schema files to regenerate the testing library (`TestHelpers` file).
```bash
-envio codegen
+pnpm envio codegen
```
## Writing tests
diff --git a/docs/HyperIndex/Troubleshoot/common-issues.md b/docs/HyperIndex/Troubleshoot/common-issues.md
index 6c48389c..ba9a2a8e 100644
--- a/docs/HyperIndex/Troubleshoot/common-issues.md
+++ b/docs/HyperIndex/Troubleshoot/common-issues.md
@@ -7,17 +7,17 @@ slug: /common-issues
# Common issues
-## `Cannot find module` errors on `envio start`
+## `Cannot find module` errors on `pnpm envio start`
This error indicates that the indexer is unable to find the necessary files to start the indexer.
Delete the `generated` folder and run
```bash
-envio codegen
+pnpm envio codegen
```
-> Always run `envio codegen` straight after cloning an indexer repo using Envio.
+> Always run `pnpm envio codegen` straight after cloning an indexer repo using Envio.
## Indexer not starting at the specified start block
@@ -26,13 +26,13 @@ If the indexer starts running but does not index the smart contracts from the `s
Run
```bash
-envio stop
+pnpm envio stop
```
and then
```bash
-envio dev
+pnpm envio dev
```
## Tables for entities are not registered on Hasura
@@ -42,13 +42,13 @@ Should the tables for the entities outlined in the schema file not show up on Ha
Run
```bash
-envio stop
+pnpm envio stop
```
and then
```bash
-envio dev
+pnpm envio dev
```
## Postgres running locally
@@ -58,16 +58,14 @@ If Postgres is running locally on port 5432, then you can run the whole system w
In practice, this could look like this:
```
-ENVIO_PG_PORT=5433 envio codegen
-ENVIO_PG_PORT=5433 envio dev
+ENVIO_PG_PORT=5433 pnpm envio codegenENVIO_PG_PORT=5433 pnpm envio dev
```
or
```
export ENVIO_PG_PORT=5433
-envio codegen
-envio dev
+pnpm envio codegenpnpm envio dev
```
NOTE: you can further customize how you connect to Postgres with these additional environment variables `ENVIO_POSTGRES_PASSWORD`, `ENVIO_PG_USER`, and `ENVIO_PG_DATABASE`.
diff --git a/docs/HyperIndex/Troubleshoot/error-codes.md b/docs/HyperIndex/Troubleshoot/error-codes.md
index d5362a2e..8a26e015 100644
--- a/docs/HyperIndex/Troubleshoot/error-codes.md
+++ b/docs/HyperIndex/Troubleshoot/error-codes.md
@@ -271,7 +271,7 @@ Contact us in our [Discord](https://discord.gg/Q9qt8gZ2fX) for further assistanc
For all of the database-related errors, rerun DB migrations using the following command:
```bash
-envio local db-migrate setup
+pnpm envio local db-migrate setup
```
### `EE700`: Parse DB Row
diff --git a/docs/HyperIndex/Tutorials/greeter-tutorial.md b/docs/HyperIndex/Tutorials/greeter-tutorial.md
index 855258ad..13726541 100644
--- a/docs/HyperIndex/Tutorials/greeter-tutorial.md
+++ b/docs/HyperIndex/Tutorials/greeter-tutorial.md
@@ -42,7 +42,7 @@ Initialize the project using the Greeter template.
Run
```bash
-envio init
+pnpx envio@latest init
```
Choose the directory where you would like to set up your project (default is the current directory)
@@ -89,7 +89,7 @@ The following commands will start the docker and create databases for indexed da
Run
```bash
-envio dev
+pnpm envio dev
```
The indexer will then start indexing the contract's specified in the `config.yaml` file from the `start_block` specified for each network.
diff --git a/docs/HyperIndex/Tutorials/tutorial-erc20-token-transfers.md b/docs/HyperIndex/Tutorials/tutorial-erc20-token-transfers.md
index a6e63f39..e72f4961 100644
--- a/docs/HyperIndex/Tutorials/tutorial-erc20-token-transfers.md
+++ b/docs/HyperIndex/Tutorials/tutorial-erc20-token-transfers.md
@@ -21,7 +21,7 @@ Before we start indexing, you'll need to make sure you have the [prerequisites](
Now that you’re all set up and have installed the prerequisite packages required, let’s jump into the practical steps of initializing the indexer and generating a boilerplate index to index the largest USDC token transfers on Base.
-1. Open your terminal in an empty repository and run the command ‘**envio init.**’
+1. Open your terminal in an empty repository and run the command ‘**pnpx envio@latest init.**’
@@ -55,13 +55,13 @@ Before starting your indexer, run the command below to ensure that no conflictin
### Stopping the indexer
-`envio stop`
+`pnpm envio stop`
> Note: Ignore if you’re a first-time user.
### Start the indexer
-`envio dev`
+`pnpm envio dev`
Now, let's run our indexer locally by running the command below.
diff --git a/docs/HyperIndex/Tutorials/tutorial-indexing-fuel.md b/docs/HyperIndex/Tutorials/tutorial-indexing-fuel.md
index 9e6b1fc4..c64000d2 100644
--- a/docs/HyperIndex/Tutorials/tutorial-indexing-fuel.md
+++ b/docs/HyperIndex/Tutorials/tutorial-indexing-fuel.md
@@ -36,7 +36,7 @@ Now that you have installed the prerequisite packages let's begin the practical
Open your terminal in an empty directory and initialize a new indexer by running the command:
```bash
-npx envio init
+npx pnpx envio@latest init
```
In the following prompt, choose the directory where you want to set up your project. The default is the current directory, but in the tutorial, I'll use the indexer name:
diff --git a/docs/HyperIndex/Tutorials/tutorial-op-bridge-deposits.md b/docs/HyperIndex/Tutorials/tutorial-op-bridge-deposits.md
index 19cd64c1..c0392e7f 100644
--- a/docs/HyperIndex/Tutorials/tutorial-op-bridge-deposits.md
+++ b/docs/HyperIndex/Tutorials/tutorial-op-bridge-deposits.md
@@ -21,7 +21,7 @@ Before we start indexing, you'll need to make sure you have the [prerequisites](
Now that you have installed the prerequisite packages required, let’s jump into the practical steps of setting up the indexer.
-1. Open your terminal in an empty repository and initialize a new indexer by running the command ‘envio init’
+1. Open your terminal in an empty repository and initialize a new indexer by running the command ‘pnpx envio@latest init’
@@ -59,13 +59,13 @@ Before starting your indexer, run the command below to ensure that no conflictin
### Stopping the indexer:
-`envio stop`
+`pnpm envio stop`
> Note: Ignore if you’re a first-time user.
### Start the indexer:
-`envio dev`
+`pnpm envio dev`
Now, let's run our indexer locally by running the command below.
diff --git a/docs/HyperIndex/contract-import.md b/docs/HyperIndex/contract-import.md
index 4b2d0fdb..a72766f1 100644
--- a/docs/HyperIndex/contract-import.md
+++ b/docs/HyperIndex/contract-import.md
@@ -7,7 +7,7 @@ slug: /contract-import
The Quickstart allows you to instantly autogenerate a basic indexer and query your data. This is the quickest way to get going and likely the starting point for most developers.
-For example, you could autogenerate an indexer for Eigenlayer AND index the entire Eigenlayer contract in under 5 minutes simply through running `envio init` and pasting the contract address from the Block Explorer: https://etherscan.io/address/0x858646372cc42e1a627fce94aa7a7033e7cf075a
+For example, you could autogenerate an indexer for Eigenlayer AND index the entire Eigenlayer contract in under 5 minutes simply through running `pnpx envio@latest init` and pasting the contract address from the Block Explorer: https://etherscan.io/address/0x858646372cc42e1a627fce94aa7a7033e7cf075a
@@ -18,7 +18,7 @@ For example, you could autogenerate an indexer for Eigenlayer AND index the enti
To start, simply run:
```
-envio init
+pnpx envio@latest init
```
After selecting the name, directory and preferred language for the indexer, choose `Contract Import` as the initialization option.
diff --git a/docs/HyperIndex/getting-started.md b/docs/HyperIndex/getting-started.md
index d3db5c14..9c873d1e 100644
--- a/docs/HyperIndex/getting-started.md
+++ b/docs/HyperIndex/getting-started.md
@@ -47,7 +47,7 @@ More information on [the Quickstart](./contract-import) can be found in this doc
### Templates
-Select either the `ERC20`, `Greeter`, or `Blank` template following the `envio init` command.
+Select either the `ERC20`, `Greeter`, or `Blank` template following the `pnpx envio
More information on [the `Greeter` template](./greeter-tutorial) is available.
diff --git a/docs/unused/example-aave-token.md b/docs/unused/example-aave-token.md
index 239ee645..b6d67793 100644
--- a/docs/unused/example-aave-token.md
+++ b/docs/unused/example-aave-token.md
@@ -18,6 +18,6 @@ The indexer has been built using v0.0.21 of Envio.
1. Clone the [repo](https://github.com/enviodev/aave-token-mainnet-events)
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites)
1. Install Envio via `npm i -g envio@v0.0.21`
-1. Generate indexing code via `envio codegen`
-1. Run the indexer via `envio dev` (make sure you have Docker running)
-1. Stop the indexer via `envio stop`
+1. Generate indexing code via `pnpm envio codegen`
+1. Run the indexer via `pnpm envio dev` (make sure you have Docker running)
+1. Stop the indexer via `pnpm envio stop`
diff --git a/docs/unused/example-erc4626-token-vault.md b/docs/unused/example-erc4626-token-vault.md
index eaa7643a..11ee6f05 100644
--- a/docs/unused/example-erc4626-token-vault.md
+++ b/docs/unused/example-erc4626-token-vault.md
@@ -20,6 +20,6 @@ The indexer has been built using v0.0.22 of Envio.
1. Clone the [repo](https://github.com/enviodev/erc4626-token-vault-indexer)
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites)
1. Install Envio via `npm i -g envio@v0.0.22`
-1. Generate indexing code via `envio codegen`
-1. Run the indexer via `envio dev` (make sure you have Docker running)
-1. Stop the indexer via `envio stop`
+1. Generate indexing code via `pnpm envio codegen`
+1. Run the indexer via `pnpm envio dev` (make sure you have Docker running)
+1. Stop the indexer via `pnpm envio stop`
diff --git a/docs/unused/example-on-chain-governance.md b/docs/unused/example-on-chain-governance.md
index ddcdf151..3df62d87 100644
--- a/docs/unused/example-on-chain-governance.md
+++ b/docs/unused/example-on-chain-governance.md
@@ -20,6 +20,6 @@ The indexer has been built using 0.0.20 of Envio.
1. Clone the [repo](https://github.com/enviodev/onchain-governance-indexer)
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites)
1. Install Envio via `npm i -g envio@v0.0.20`
-1. Generate indexing code via `envio codegen`
-1. Run the indexer via `envio dev` (make sure you have Docker running)
-1. Stop the indexer via `envio stop`
+1. Generate indexing code via `pnpm envio codegen`
+1. Run the indexer via `pnpm envio dev` (make sure you have Docker running)
+1. Stop the indexer via `pnpm envio stop`
diff --git a/docs/unused/example-reNFT.md b/docs/unused/example-reNFT.md
index af1c6ee3..cb18c61b 100644
--- a/docs/unused/example-reNFT.md
+++ b/docs/unused/example-reNFT.md
@@ -18,6 +18,6 @@ The indexer has been built using v0.0.21 of Envio.
1. Clone the [repo](https://github.com/enviodev/reNFT-index)
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites)
1. Install Envio via `npm i -g envio@v0.0.21`
-1. Generate indexing code via `envio codegen`
-1. Run the indexer via `envio dev` (make sure you have Docker running)
-1. Stop the indexer via `envio stop`
+1. Generate indexing code via `pnpm envio codegen`
+1. Run the indexer via `pnpm envio dev` (make sure you have Docker running)
+1. Stop the indexer via `pnpm envio stop`
diff --git a/docs/unused/subgraph-migration.md b/docs/unused/subgraph-migration.md
index d3278a7d..8614db04 100644
--- a/docs/unused/subgraph-migration.md
+++ b/docs/unused/subgraph-migration.md
@@ -14,7 +14,7 @@ This page will show you how to migrate an existing subgraph from theGraph's host
### Initialize `envio`
```bash
-envio init
+pnpx envio@latest init
```
### Name your indexer
@@ -65,7 +65,7 @@ The migration will also import schema and ABI files for the associated contracts
## Write event handlers
-Function names for event handlers will be generated from `envio init` and the existing event handlers file for the hosted subgraph can be written in the language chosen.
+Function names for event handlers will be generated from `pnpx envio@latest init` and the existing event handlers file for the hosted subgraph can be written in the language chosen.
Migration script automatically populates the events section of the config file.
Linking of specific events to entities needs to be done manually. This is required to indicate the entities each event is required to load and update.
@@ -79,7 +79,7 @@ The following command will start the docker and create databases for indexed dat
Run
```bash
-envio dev
+pnpm envio dev
```
The indexer will then start indexing the contract specified in the `config.yaml` file from the `start_block` specified.