Skip to main content

Usage

dokrypt init <project-name> [flags]

Arguments

ArgumentRequiredDescription
project-nameYesName of the new project directory

Flags

FlagTypeDefaultDescription
-t, --templatestringevm-basicTemplate to use
--chainstringethereumChain type
--enginestringanvilNode engine (anvil, hardhat, geth)
--no-gitboolfalseSkip git repository initialization
--dirstring.Target parent directory

Description

Creates a new project directory with smart contracts, tests, deployment scripts, and a dokrypt.yaml configuration file scaffolded from the selected template. The scaffolding process:
  1. Validates the project name and checks that the target directory doesn’t already exist
  2. Loads the selected template (built-in or installed from marketplace)
  3. Renders all template files, replacing variables like {{ .ProjectName }}, {{ .ChainName }}, {{ .ChainID }}, and {{ .Engine }}
  4. Initializes a git repository (unless --no-git is set)
  5. Displays the created files and next steps

Available Templates

TemplateDifficultyDescription
evm-basicBeginnerCounter + ERC-20 starter
evm-tokenIntermediateERC-20, vesting, staking, multisig
evm-nftIntermediateERC-721, marketplace, royalties, IPFS
evm-daoAdvancedGovernor, timelock, treasury, voting
evm-defiAdvancedAMM, lending, staking, oracle

Examples

Basic project with defaults

dokrypt init my-project
Creates my-project/ with the evm-basic template, Anvil engine, and Ethereum chain.

DeFi project

dokrypt init my-defi-app --template evm-defi
Creates a full DeFi stack with AMM (Factory, Pair, Router), lending vault, staking rewards, and oracle contracts. Configures IPFS, Blockscout, and Chainlink mock services.

NFT project with custom chain

dokrypt init my-nft --template evm-nft --chain polygon --engine hardhat

Skip git initialization

dokrypt init my-project --no-git

Scaffold into a specific directory

dokrypt init my-project --dir /home/user/projects

Output Structure

The created directory structure depends on the template. For evm-basic:
my-project
dokrypt.yaml
foundry.toml
README.md
contracts
Counter.sol
SimpleToken.sol
test
Counter.t.sol
SimpleToken.t.sol
scripts
deploy.js

Errors

ErrorCauseSolution
Directory already existsTarget directory is not emptyChoose a different name or delete the existing directory
Template not foundTemplate name is invalidRun dokrypt template list to see available templates
Failed to load templateTemplate filesystem is corruptedReinstall Dokrypt or the template