create-aptos-project
Original:🇺🇸 English
Translated
Scaffolds new Aptos projects using npx create-aptos-dapp. Supports fullstack (Vite or Next.js) and contract-only templates with network selection and optional API key. Triggers on: 'build app', 'create app', 'make app', 'new app', 'build dApp', 'create dApp', 'new dApp', 'build project', 'new project', 'create project', 'scaffold', 'start project', 'set up project', 'build me a', 'I want to build', 'make me a', 'help me build'.
6installs
Added on
NPX Install
npx skill4agent add aptos-labs/aptos-agent-skills create-aptos-projectTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Create Aptos Project Skill
Purpose
Scaffold new Aptos projects using . This is the mandatory first step when a user wants to
build any new Aptos app, dApp, or project — regardless of how they phrase it.
npx create-aptos-dappALWAYS
- Use to scaffold — NEVER create projects from scratch manually
npx create-aptos-dapp - Ask the user about project type, framework, and network before scaffolding
- Verify is in
.envbefore any git operations.gitignore - Use the same network for both and
create-aptos-dappaptos init - Follow the full Build a dApp workflow after scaffolding (contracts, tests, audit, deploy, frontend)
NEVER
- Skip scaffolding — even for "simple" projects, always start with
create-aptos-dapp - Create project structure manually — the boilerplate template handles this
- Display or read private keys — use as placeholder
"0x..." - Run or
git add .without first verifyinggit add -Ais in.env.gitignore
Decision Tree
Before running the scaffold command, gather these inputs from the user:
1. Project Name
Derive from the user's description or ask directly. Use kebab-case (e.g., , ).
habit-trackernft-marketplace2. Project Type
| Option | When to Use |
|---|---|
| Fullstack (default) | User wants a frontend + smart contracts |
| Contract-only | User only wants Move smart contracts (no frontend) |
3. Framework (fullstack only)
| Option | When to Use |
|---|---|
| Vite (default) | Default choice, lighter setup |
| Next.js | User asks for Next.js or SSR |
4. Network
| Option | When to Use |
|---|---|
| devnet (default) | Development and testing |
| testnet | Pre-production, user explicitly asks |
| mainnet | Production, user explicitly asks |
5. API Key (optional)
Ask if the user has a Geomi API key. It's optional for devnet but recommended for testnet/mainnet to avoid rate limits.
Get one at https://geomi.dev (create project -> API Resource -> copy key).
Scaffolding Commands
bash
# Fullstack dApp with Vite (frontend + contracts)
npx create-aptos-dapp <project-name> \
--project-type fullstack \
--template boilerplate-template \
--framework vite \
--network <network>
# Fullstack dApp with Next.js
npx create-aptos-dapp <project-name> \
--project-type fullstack \
--template boilerplate-template \
--framework nextjs \
--network <network>
# Contract-only (Move project)
npx create-aptos-dapp <project-name> \
--project-type move \
--network <network>Optional flags:
- — Pass a Geomi API key during scaffolding
--api-key <key> - — Enable Surf for type-safe contract interactions
--use-surf
Post-Scaffold Checklist
After scaffolding, complete these steps in order:
cd <project-name>- Verify is in
.envbefore any git operations.gitignore - Run (use the same network as above)
aptos init --network <network> --assume-yes - Verify:
npm run move:compile && npm run move:test git init && git add . && git commit -m "Initial commit"
Build a dApp Workflow
ALWAYS follow this workflow when the user wants to build a new Aptos app, dApp, or project. This applies regardless
of how the user phrases it ("build me a ...", "create a ...", "make a ...", "I want to build ...").
- -> scaffold with
/create-aptos-project(this skill — NEVER skip)npx create-aptos-dapp - -> write Move modules
/write-contracts - -> create test suite, verify 100% coverage
/generate-tests - -> audit before deployment
/security-audit - -> deploy contract to specified network
/deploy-contracts - -> orchestrates frontend integration (routes to ts-sdk-client, ts-sdk-transactions, ts-sdk-view-and-query, ts-sdk-wallet-adapter as needed)
/use-ts-sdk
What the Boilerplate Includes
Fullstack Template
- — Move smart contract with
contract/and starter moduleMove.toml - — React app with Aptos wallet adapter pre-configured
frontend/ - — Scripts for
package.json,move:compile,move:test,move:publish,devbuild - — Environment variables for network, API key, and publisher account
.env
Contract-Only Template
- — Move smart contract with
contract/and starter moduleMove.toml - — Scripts for
package.json,move:compile,move:testmove:publish - — Environment variables for network and publisher account
.env
Troubleshooting
npx create-aptos-dapp
command not found
npx create-aptos-dappbash
# Auto-confirm the npx package install prompt
npx --yes create-aptos-dapp <project-name> ...If that still fails, verify Node.js and npm are installed ().
node -v && npm -vCompile failures after scaffold
- Check has correct named addresses
contract/Move.toml - Run if not done
aptos init --network <network> --assume-yes - Verify is set to
my_addrin"_"section[addresses]
Named address errors
The boilerplate uses which gets resolved from at compile time. Ensure
is set in (populated by ).
my_addr = "_".envVITE_MODULE_PUBLISHER_ACCOUNT_ADDRESS.envaptos init