The create-inco-app CLI allows you to create a new full-stack confidential dApp with a Next.js frontend, Anchor programs (Rust), and the Inco Solana SDK. It is the easiest way to get started building on Inco for Solana.
Basic usage
npx create-inco-app@latest
On installation, you’ll see the following prompts:
What is your project named? my-app
What would you like to scaffold? Full monorepo / Programs only / Frontend only
Which chain would you like to use? SVM
Which contract framework? Anchor (skipped for frontend-only)
Which wallet provider? Solana Wallet Adapter / Privy (skipped for programs-only)
After the prompts, create-inco-app will create a folder with your project name and install the required dependencies.
Scaffold modes
Choose what to generate with --template (or the second prompt). Programs-only and frontend-only are scaffolded at the project root (no monorepo wrapper).
Full monorepo (default)
Programs only
Frontend only
Anchor programs and frontend in one workspace.npx create-inco-app@latest my-app --chain svm --framework anchor --wallet privy --yes
my-app/
├── programs/ # Anchor workspace — confidential-pool + confidential-token
├── frontend/ # Next.js app (wallet provider + Inco Solana SDK wired up)
├── scripts/ # sync-programs.mjs (syncs IDLs + program IDs after deploy)
└── package.json # workspace root (npm run dev, programs:build, ...)
Just the Anchor workspace — no frontend.npx create-inco-app@latest my-programs --template contracts --chain svm --framework anchor --yes
my-programs/
├── programs/ # Rust programs
├── tests/
├── Anchor.toml
└── Cargo.toml
Scripts: anchor build (build), anchor test (test), anchor deploy (deploy). Just the Next.js dApp — no programs. Wire it to an already-deployed program.npx create-inco-app@latest my-frontend --template frontend --chain svm --wallet privy --yes
my-frontend/
├── app/ # Next.js App Router
├── components/ # Providers.tsx (wallet) + UI
├── hooks/ # Inco Solana SDK integration
├── idl/ # program IDLs
└── lib/
Reference
npx create-inco-app@latest [project-name] [options]
The following options are available:
| Option | Description |
|---|
-h or --help | Show all available options |
-v or --version | Output the version number |
-t or --template <value> | Scaffold type (monorepo, contracts, frontend) |
-f or --framework <value> | Contract framework (anchor) |
-w or --wallet <value> | Wallet provider (solana-wallet-adapter, privy) |
-c or --chain <value> | Chain type (svm) |
-y or --yes | Skip prompts, use defaults |
--install | Auto-install dependencies after scaffolding |
--git | Initialize a git repository |
--use-npm | Explicitly tell the CLI to bootstrap using npm |
--use-pnpm | Explicitly tell the CLI to bootstrap using pnpm |
--use-yarn | Explicitly tell the CLI to bootstrap using Yarn |
--use-bun | Explicitly tell the CLI to bootstrap using Bun |
Project Structure
The scaffolded project is a monorepo with two workspaces:
my-app/
├── programs/ # Anchor workspace (Rust programs)
│ ├── programs/
│ │ ├── confidential-pool/ # Privacy-preserving lottery
│ │ └── confidential-token/ # Encrypted token system
│ ├── tests/ # Integration tests
│ └── Anchor.toml # Anchor configuration (devnet)
└── frontend/ # Next.js app (pre-configured for Solana devnet)
├── components/
│ ├── Providers.tsx # Wallet provider setup
│ └── ConfPool.tsx # Example dApp component
├── hooks/
│ └── useConfPool.ts # Inco Solana SDK integration
└── idl/ # Program IDLs (auto-synced)
The frontend is pre-configured for Solana devnet. All wallet providers connect to devnet by default, no network configuration changes are needed.
Examples
With default options
npx create-inco-app@latest
With Anchor and Solana Wallet Adapter
npx create-inco-app@latest my-app --framework anchor --wallet solana-wallet-adapter --chain svm --yes
With Anchor and Privy
npx create-inco-app@latest my-app --framework anchor --wallet privy --chain svm --yes
Build & Test Programs
Run the test command from the project root — it builds, deploys to a local validator, runs tests, and automatically syncs the program IDs and IDLs to the frontend:
cd my-app
npm install
npm run programs:test
After the test completes, the frontend .env is automatically updated with the deployed program IDs.
Then run the frontend:
Open http://localhost:3000 to see your dApp.
For Privy, you need a Privy App ID with Solana (SVM) enabled. Set NEXT_PUBLIC_PRIVY_APP_ID in frontend/.env.local before running the frontend. For Solana Wallet Adapter, no additional configuration is needed — it works out of the box.
Inco Solana SDK Integration
The scaffolded app uses @inco/solana-sdk for client-side encryption. On-chain, the Anchor programs use inco-lightning CPI for encrypted operations.
Client-side encryption
import { encryptValue } from "@inco/solana-sdk/encryption";
import { hexToBuffer } from "@inco/solana-sdk/utils";
// Encrypt a value before sending on-chain
const amount = BigInt(Math.floor(parseFloat("100") * 1e9));
const encryptedHex = await encryptValue(amount);
// Pass encrypted value to your Anchor program
const tx = await program.methods
.mintTo(hexToBuffer(encryptedHex), 0)
.accounts({
mint: mintAddress,
account: tokenAccountAddress,
mintAuthority: publicKey,
incoLightningProgram: INCO_LIGHTNING_PROGRAM_ID,
systemProgram: SystemProgram.programId,
})
.transaction();
On-chain encrypted operations (Rust)
use inco_lightning::instructions::*;
// Encrypted addition
e_add(ctx, pool.pool_balance, participant.deposit_amount)?;
// Encrypted comparison
e_eq(ctx, participant.index_handle, pool.winner_index)?;
// Random encrypted value
e_rand(ctx)?;
// Grant decryption access
allow(ctx, handle, allowed_address)?;
See Encryption and Attested Decrypt for full details.
Choose Your Wallet Provider
Each wallet provider has its own setup. Select one to see the provider configuration:

Solana Wallet Adapter
Native Solana wallets (Phantom, Solflare)

Privy
Embedded wallets & social login
Quick Reference
| Command | Description |
|---|
npm run programs:test | Build, test, and sync programs to frontend |
npm run programs:build | Build Anchor programs only |
npm run programs:sync | Sync IDLs and program IDs to frontend |
npm run dev | Start frontend |