The create-typink CLI tool helps developers quickly scaffold a new ink! or Solidity dApp project using Typink & Dedot. It provides an interactive experience to select contract types, templates, and networks, automatically setting up a complete Next.js application with pre-deployed example contracts.
# npm
npx create-typink@latest
# pnpm
pnpm create typink@latest
# yarn
yarn create typink@latest
# bun
bunx create-typink@latestThe CLI will guide you through an interactive setup process to configure your project.
create-typink supports four contract types across two different pallets:
| Contract Type | Pallet | Technology | Template | Example Contract |
|---|---|---|---|---|
| Ink! v6 | pallet-revive | PolkaVM | inkv6-nextjs |
Flipper |
| Ink! v6 (Sol ABI) | pallet-revive | PolkaVM | inkv6-sol-nextjs |
Flipper |
| Solidity | pallet-revive | PolkaVM | sol-nextjs |
Storage |
| Ink! v5 | pallet-contracts | WASM | inkv5-nextjs |
Greeter |
All templates are built with Next.js and include:
- TypinkProvider configuration with wallet connector
- Pre-deployed example contract with working interactions
- TypeScript bindings for the example contract
- UI components demonstrating contract queries and transactions
- Ready-to-use setup for immediate development
| Option | Alias | Type | Description |
|---|---|---|---|
--name <project-name> | -n | String | Specify the project name. Must be a valid npm package name. |
--template <template-name> | -t | String | Choose a template: inkv6-nextjs, inkv6-sol-nextjs, sol-nextjs, inkv5-nextjs. |
--networks <network-names> | -N | String[] | Select supported networks (multiple values allowed). Networks must match the template's pallet type. |
--skip-install | --skip | Boolean | Skip automatic package installation. |
--no-git | Boolean | Skip git initialization. | |
--help | -h | Boolean | Show help message. |
- Project Name Validation: The project name must be a valid npm package name (lowercase, no spaces, etc.)
- Network Compatibility: Selected networks must be compatible with the chosen template:
inkv5-nextjs→ pallet-contracts networks onlyinkv6-nextjs,inkv6-sol-nextjs,sol-nextjs→ pallet-revive networks only
- Multiple Networks: You can select multiple networks using multiple
-Nflags or by selecting multiple in interactive mode
When you run npx create-typink@latest without options, the CLI guides you through an interactive setup:
? Project name: (my-typink-app)
Enter a valid npm package name for your project.
? Select contract type:
❯ Ink! v6 (PolkaVM, pallet-revive)
Ink! v6 using Sol ABI (PolkaVM, pallet-revive)
Solidity (PolkaVM, pallet-revive)
Ink! v5 (WASM, pallet-contracts)
Choose the contract type you want to work with. This determines which template and networks are available.
? Select supported networks: (Press <space> to select, <a> to toggle all)
❯◉ Pop Testnet
◯ Aleph Zero Testnet
◯ Aleph Zero
◯ Astar
Select one or more networks for your dApp. Available networks depend on the chosen contract type.
After running the CLI, your project will have the following structure:
my-typink-app/
├── src/
│ ├── app/ # Next.js app directory
│ ├── components/ # React components
│ │ ├── shared/ # Shared UI components
│ │ └── [example]-board.tsx # Example contract interactions
│ ├── contracts/ # Contract-related files
│ │ ├── deployments.ts # Contract deployment addresses
│ │ └── types/ # Generated TypeScript bindings
│ ├── lib/ # Utility functions
│ └── providers/ # React context providers
├── public/ # Static assets
├── .gitignore
├── package.json
├── tsconfig.json
├── next.config.ts
└── README.md
src/contracts/deployments.ts: Contains contract deployment information for selected networkssrc/contracts/types/: TypeScript bindings for type-safe contract interactionssrc/components/: Example components showing how to interact with contractssrc/providers/: TypinkProvider configuration with wallet connector setup