diff --git a/examples/generators/production_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml b/examples/generators/production_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml index 4837f8a..afa2cac 100644 --- a/examples/generators/production_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml +++ b/examples/generators/production_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml @@ -1,12 +1,6 @@ _tasks: - "echo '==== Successfully generated new .env file 🚀 ===='" -use_generic_env: - type: bool - help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false). - placeholder: "true" - default: "true" - target_network: type: str help: Name of your target network. diff --git a/examples/generators/production_python_smart_contract_python/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} b/examples/generators/production_python_smart_contract_python/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} deleted file mode 100644 index e69de29..0000000 diff --git a/examples/generators/production_python_smart_contract_python/.vscode/launch.json b/examples/generators/production_python_smart_contract_python/.vscode/launch.json index 46c92e0..dbaea6e 100644 --- a/examples/generators/production_python_smart_contract_python/.vscode/launch.json +++ b/examples/generators/production_python_smart_contract_python/.vscode/launch.json @@ -8,7 +8,14 @@ "module": "smart_contracts", "cwd": "${workspaceFolder}", "preLaunchTask": "Start AlgoKit LocalNet", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -17,7 +24,14 @@ "module": "smart_contracts", "args": ["deploy"], "cwd": "${workspaceFolder}", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Build contracts", diff --git a/examples/generators/production_python_smart_contract_python/README.md b/examples/generators/production_python_smart_contract_python/README.md index 7df5b15..dc2a1a4 100644 --- a/examples/generators/production_python_smart_contract_python/README.md +++ b/examples/generators/production_python_smart_contract_python/README.md @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured: Run the following commands within the project folder: - **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+. -- **Setup Project**: Execute `algokit project bootstrap all` to: - - Install dependencies and setup a Python virtual environment in `.venv`. - - Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)). +- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`. +- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`. - **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network. ### Development Workflow @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world ### Generate '.env' files -By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. +By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`### Continuous Integration / Continuous Deployment (CI/CD) diff --git a/examples/generators/production_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml b/examples/generators/production_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml index 4837f8a..afa2cac 100644 --- a/examples/generators/production_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml +++ b/examples/generators/production_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml @@ -1,12 +1,6 @@ _tasks: - "echo '==== Successfully generated new .env file 🚀 ===='" -use_generic_env: - type: bool - help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false). - placeholder: "true" - default: "true" - target_network: type: str help: Name of your target network. diff --git a/examples/generators/production_python_smart_contract_typescript/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} b/examples/generators/production_python_smart_contract_typescript/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} deleted file mode 100644 index e69de29..0000000 diff --git a/examples/generators/production_python_smart_contract_typescript/.vscode/launch.json b/examples/generators/production_python_smart_contract_typescript/.vscode/launch.json index de9a409..6c40d26 100644 --- a/examples/generators/production_python_smart_contract_typescript/.vscode/launch.json +++ b/examples/generators/production_python_smart_contract_typescript/.vscode/launch.json @@ -11,7 +11,14 @@ "console": "integratedTerminal", "skipFiles": ["/**", "node_modules/**"], "preLaunchTask": "Build contracts (+ LocalNet)", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -22,7 +29,14 @@ "cwd": "${workspaceFolder}/smart_contracts", "console": "integratedTerminal", "skipFiles": ["/**", "node_modules/**"], - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Build contracts", diff --git a/examples/generators/production_python_smart_contract_typescript/README.md b/examples/generators/production_python_smart_contract_typescript/README.md index 469abaa..4d58024 100644 --- a/examples/generators/production_python_smart_contract_typescript/README.md +++ b/examples/generators/production_python_smart_contract_typescript/README.md @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured: Run the following commands within the project folder: - **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+. -- **Setup Project**: Execute `algokit project bootstrap all` to: - - Install dependencies and setup a Python virtual environment in `.venv`. - - Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)). +- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`. +- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`. - **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network. ### Development Workflow @@ -75,7 +74,7 @@ By default the template creates a single `HelloWorld` contract under hello_world ### Generate '.env' files -By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. +By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`### Continuous Integration / Continuous Deployment (CI/CD) diff --git a/examples/generators/starter_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml b/examples/generators/starter_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml index 4837f8a..afa2cac 100644 --- a/examples/generators/starter_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml +++ b/examples/generators/starter_python_smart_contract_python/.algokit/generators/create_env_file/copier.yaml @@ -1,12 +1,6 @@ _tasks: - "echo '==== Successfully generated new .env file 🚀 ===='" -use_generic_env: - type: bool - help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false). - placeholder: "true" - default: "true" - target_network: type: str help: Name of your target network. diff --git a/examples/generators/starter_python_smart_contract_python/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} b/examples/generators/starter_python_smart_contract_python/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} deleted file mode 100644 index e69de29..0000000 diff --git a/examples/generators/starter_python_smart_contract_python/.vscode/launch.json b/examples/generators/starter_python_smart_contract_python/.vscode/launch.json index 46c92e0..dbaea6e 100644 --- a/examples/generators/starter_python_smart_contract_python/.vscode/launch.json +++ b/examples/generators/starter_python_smart_contract_python/.vscode/launch.json @@ -8,7 +8,14 @@ "module": "smart_contracts", "cwd": "${workspaceFolder}", "preLaunchTask": "Start AlgoKit LocalNet", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -17,7 +24,14 @@ "module": "smart_contracts", "args": ["deploy"], "cwd": "${workspaceFolder}", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Build contracts", diff --git a/examples/generators/starter_python_smart_contract_python/README.md b/examples/generators/starter_python_smart_contract_python/README.md index 0a7ee5f..25fe33c 100644 --- a/examples/generators/starter_python_smart_contract_python/README.md +++ b/examples/generators/starter_python_smart_contract_python/README.md @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured: Run the following commands within the project folder: - **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+. -- **Setup Project**: Execute `algokit project bootstrap all` to: - - Install dependencies and setup a Python virtual environment in `.venv`. - - Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)). +- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`. +- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`. - **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network. ### Development Workflow @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world ### Generate '.env' files -By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. +By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file` diff --git a/examples/generators/starter_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml b/examples/generators/starter_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml index 4837f8a..afa2cac 100644 --- a/examples/generators/starter_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml +++ b/examples/generators/starter_python_smart_contract_typescript/.algokit/generators/create_env_file/copier.yaml @@ -1,12 +1,6 @@ _tasks: - "echo '==== Successfully generated new .env file 🚀 ===='" -use_generic_env: - type: bool - help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false). - placeholder: "true" - default: "true" - target_network: type: str help: Name of your target network. diff --git a/examples/generators/starter_python_smart_contract_typescript/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} b/examples/generators/starter_python_smart_contract_typescript/.algokit/generators/create_env_file/{% if use_generic_env %}.env{% endif %} deleted file mode 100644 index e69de29..0000000 diff --git a/examples/generators/starter_python_smart_contract_typescript/.vscode/launch.json b/examples/generators/starter_python_smart_contract_typescript/.vscode/launch.json index de9a409..6c40d26 100644 --- a/examples/generators/starter_python_smart_contract_typescript/.vscode/launch.json +++ b/examples/generators/starter_python_smart_contract_typescript/.vscode/launch.json @@ -11,7 +11,14 @@ "console": "integratedTerminal", "skipFiles": ["/**", "node_modules/**"], "preLaunchTask": "Build contracts (+ LocalNet)", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -22,7 +29,14 @@ "cwd": "${workspaceFolder}/smart_contracts", "console": "integratedTerminal", "skipFiles": ["/**", "node_modules/**"], - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Build contracts", diff --git a/examples/generators/starter_python_smart_contract_typescript/README.md b/examples/generators/starter_python_smart_contract_typescript/README.md index 2617064..edffbe4 100644 --- a/examples/generators/starter_python_smart_contract_typescript/README.md +++ b/examples/generators/starter_python_smart_contract_typescript/README.md @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured: Run the following commands within the project folder: - **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+. -- **Setup Project**: Execute `algokit project bootstrap all` to: - - Install dependencies and setup a Python virtual environment in `.venv`. - - Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)). +- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`. +- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`. - **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network. ### Development Workflow @@ -75,7 +74,7 @@ By default the template creates a single `HelloWorld` contract under hello_world ### Generate '.env' files -By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. +By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file` diff --git a/examples/production_python/.vscode/launch.json b/examples/production_python/.vscode/launch.json index 46c92e0..dbaea6e 100644 --- a/examples/production_python/.vscode/launch.json +++ b/examples/production_python/.vscode/launch.json @@ -8,7 +8,14 @@ "module": "smart_contracts", "cwd": "${workspaceFolder}", "preLaunchTask": "Start AlgoKit LocalNet", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -17,7 +24,14 @@ "module": "smart_contracts", "args": ["deploy"], "cwd": "${workspaceFolder}", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Build contracts", diff --git a/examples/production_python/README.md b/examples/production_python/README.md index 9ebcc7c..e9d3ee2 100644 --- a/examples/production_python/README.md +++ b/examples/production_python/README.md @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured: Run the following commands within the project folder: - **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+. -- **Setup Project**: Execute `algokit project bootstrap all` to: - - Install dependencies and setup a Python virtual environment in `.venv`. - - Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)). +- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`. +- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`. - **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network. ### Development Workflow @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world ### Generate '.env' files -By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. +By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file`### Continuous Integration / Continuous Deployment (CI/CD) diff --git a/examples/starter_python/.vscode/launch.json b/examples/starter_python/.vscode/launch.json index 46c92e0..dbaea6e 100644 --- a/examples/starter_python/.vscode/launch.json +++ b/examples/starter_python/.vscode/launch.json @@ -8,7 +8,14 @@ "module": "smart_contracts", "cwd": "${workspaceFolder}", "preLaunchTask": "Start AlgoKit LocalNet", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -17,7 +24,14 @@ "module": "smart_contracts", "args": ["deploy"], "cwd": "${workspaceFolder}", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Build contracts", diff --git a/examples/starter_python/README.md b/examples/starter_python/README.md index 6093b0b..d0f66e1 100644 --- a/examples/starter_python/README.md +++ b/examples/starter_python/README.md @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured: Run the following commands within the project folder: - **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+. -- **Setup Project**: Execute `algokit project bootstrap all` to: - - Install dependencies and setup a Python virtual environment in `.venv`. - - Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)). +- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`. +- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`. - **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network. ### Development Workflow @@ -74,7 +73,7 @@ By default the template creates a single `HelloWorld` contract under hello_world ### Generate '.env' files -By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. +By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file` diff --git a/template_content/.algokit/generators/create_env_file/copier.yaml b/template_content/.algokit/generators/create_env_file/copier.yaml index 4837f8a..afa2cac 100644 --- a/template_content/.algokit/generators/create_env_file/copier.yaml +++ b/template_content/.algokit/generators/create_env_file/copier.yaml @@ -1,12 +1,6 @@ _tasks: - "echo '==== Successfully generated new .env file 🚀 ===='" -use_generic_env: - type: bool - help: Create generic empty .env file (true) or create a network specific .env.{network_name} file (false). - placeholder: "true" - default: "true" - target_network: type: str help: Name of your target network. diff --git a/template_content/.algokit/generators/create_env_file/{% raw %}{% if use_generic_env %}.env{% endif %}{% endraw %} b/template_content/.algokit/generators/create_env_file/{% raw %}{% if use_generic_env %}.env{% endif %}{% endraw %} deleted file mode 100644 index e69de29..0000000 diff --git a/template_content/README.md.jinja b/template_content/README.md.jinja index d2fbe84..c95d783 100644 --- a/template_content/README.md.jinja +++ b/template_content/README.md.jinja @@ -26,9 +26,8 @@ Ensure the following pre-requisites are installed and properly configured: Run the following commands within the project folder: - **Install Poetry**: Required for Python dependency management. [Installation Guide](https://python-poetry.org/docs/#installation). Verify with `poetry -V` to see version `1.2`+. -- **Setup Project**: Execute `algokit project bootstrap all` to: - - Install dependencies and setup a Python virtual environment in `.venv`. - - Configure '.env' files if needed (see [AlgoKit Generators](#algokit-generators)). +- **Setup Project**: Execute `algokit project bootstrap all` to install dependencies and setup a Python virtual environment in `.venv`. +- **Configure environment**: Execute `algokit generate env-file -a target_network localnet` to create a `.env.localnet` file with default configuration for `localnet`. - **Start LocalNet**: Use `algokit localnet start` to initiate a local Algorand network. ### Development Workflow @@ -77,7 +76,7 @@ By default the template creates a single `HelloWorld` contract under {{ contract ### Generate '.env' files -By default the template instance would not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. +By default the template instance does not contain any env files. Using [`algokit project deploy`](https://github.com/algorandfoundation/algokit-cli/blob/main/docs/features/project/deploy.md) against `localnet` | `testnet` | `mainnet` will use default values for `algod` and `indexer` unless overwritten via `.env` or `.env.{target_network}`. To generate a new `.env` or `.env.{target_network}` file, run `algokit generate env-file` diff --git a/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja b/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja index cd188b1..2b6ed9c 100644 --- a/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja +++ b/template_content/{% if ide_vscode %}.vscode{% endif %}/launch.json.jinja @@ -9,7 +9,14 @@ "module": "smart_contracts", "cwd": "${workspaceFolder}", "preLaunchTask": "Start AlgoKit LocalNet", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -18,7 +25,14 @@ "module": "smart_contracts", "args": ["deploy"], "cwd": "${workspaceFolder}", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, {% elif deployment_language == 'typescript' -%} { @@ -31,7 +45,14 @@ "console": "integratedTerminal", "skipFiles": ["/**", "node_modules/**"], "preLaunchTask": "Build contracts (+ LocalNet)", - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, { "name": "Deploy contracts", @@ -42,7 +63,14 @@ "cwd": "${workspaceFolder}/smart_contracts", "console": "integratedTerminal", "skipFiles": ["/**", "node_modules/**"], - "envFile": "${workspaceFolder}/.env.localnet" + "env": { + "ALGOD_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "ALGOD_SERVER": "http://localhost", + "ALGOD_PORT": "4001", + "INDEXER_TOKEN": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "INDEXER_SERVER": "http://localhost", + "INDEXER_PORT": "8980" + } }, {% endif -%} {