For AI agents: Documentation index at /llms.txt

Skip to content

Quickstart

Deploy a fullstack app to a local Internet Computer network in under 10 minutes.

Windows users: You also need WSL and Docker Desktop. Run all commands inside WSL.

Terminal window
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm

This installs:

  • icp-cli: builds and deploys canisters on the Internet Computer
  • ic-wasm: optimizes WebAssembly modules for onchain deployment

For Motoko projects, also install the Motoko package manager:

Terminal window
npm install -g ic-mops

Verify everything is installed:

Terminal window
icp --version
ic-wasm --version

Alternative methods: Homebrew, shell scripts, and other options are also available.

Terminal window
icp new my-project --subfolder hello-world \
--define backend_type=motoko \
--define frontend_type=react \
--define network_type=Default && cd my-project

This creates a fullstack project from the hello-world template with a Motoko backend and React frontend. The --define flags skip interactive prompts. Without them, icp new asks you to choose a template, language, and network type.

Prefer Rust? Use --define backend_type=rust instead. You’ll need Rust installed with the WASM target: rustup target add wasm32-unknown-unknown.

Backend only? Use a language-specific template instead: --subfolder rust or --subfolder motoko. These templates have no frontend.

Your new project contains:

PathDescription
icp.yamlProject configuration: lists your canisters
backend/Motoko source code with a greet function
frontend/React app that calls the backend
Terminal window
icp network start -d

This starts a local Internet Computer replica in the background. The local network comes pre-funded. You can deploy immediately without setting up a wallet or acquiring cycles.

Terminal window
icp deploy

This single command builds your Motoko code into WebAssembly, compiles the React frontend, creates canisters on the local network, and installs your code. When it finishes, you’ll see output like:

Deployed canisters:
backend (Candid UI): http://...localhost:8000/?id=...
frontend: http://...localhost:8000

Open the frontend URL in your browser to see your app running. The Candid UI URL opens a web interface where you can test backend methods directly. Try calling greet with your name.

You can also interact with your backend from the terminal:

Terminal window
icp canister call backend greet '("World")'

Output: ("Hello, World!")

The argument '("World")' uses Candid syntax (the interface description language for the Internet Computer). The outer single quotes are shell quoting; the Candid value itself is ("World"). You can also omit the argument and icp canister call will prompt you interactively.

When you’re done developing:

Terminal window
icp network stop

The hello-world template deploys two canisters that run on the Internet Computer:

  1. Backend canister: Your Motoko code compiled to WebAssembly. It exposes a greet function through a Candid interface, making it callable from any client.

  2. Frontend canister: An asset canister that serves your React app. It automatically provides the backend’s canister ID to your frontend code via a cookie, so the two canisters can communicate without manual configuration.

The icp.yaml file ties everything together:

canisters:
- backend
- frontend

Each canister name maps to a directory containing its own canister.yaml with build configuration (recipe, source files, etc.). icp-cli handles the rest: compiling, optimizing, deploying, and wiring up canister-to-canister discovery.