create-typink CLI
create-typink CLI
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.
Quick Start
# npm
npx create-typink@latest
# pnpm
pnpm create typink@latest
# yarn
yarn create typink@latest
# bun
bunx create-typink@latest
The CLI will guide you through an interactive setup process to configure your project.
Contract Types & Templates
create-typink supports four contract types across two different pallets:
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
Template Features
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
Options
--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.
Notes
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
-N
flags or by selecting multiple in interactive mode
Interactive Mode
When you run npx create-typink@latest
without options, the CLI guides you through an interactive setup:
1. Project Name
? Project name: (my-typink-app)
Enter a valid npm package name for your project.
2. Contract Type Selection
? 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.
3. Network Selection
? 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.
Generated Project Structure
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
Key Files
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
Last updated
Was this helpful?