Is there a CLI to create a new canister with boilerplate

i am new to ICP , i have created my first small counter project in Rust and React js , i am struggling to create a third canister. now i have backend and frontend. is it possible to create third canister in parent folder ? if yes, how ? if not , how do you do it?

Yes β€” with the new icp CLI this is pretty straightforward.

A project can have multiple canisters listed in the root icp.yaml, with each canister living in its own folder and defining its build in canister.yaml:

my-project/
β”œβ”€β”€ icp.yaml
β”œβ”€β”€ backend/
β”‚   └── canister.yaml
β”œβ”€β”€ frontend/
β”‚   └── canister.yaml
└── worker/
    └── canister.yaml

Then add it to icp.yaml:

canisters:
  - backend
  - frontend
  - worker

For Rust boilerplate you can also use:

icp new example --subfolder rust

and copy/adapt the generated Rust canister into your existing project.

After that:

icp deploy worker

will build, create and install it.

The new icp.yaml + per-canister canister.yaml structure is much nicer for multi-canister projects than the older dfx.json setup.

Also, if you’re building a React frontend against multiple ICP canisters, you might find our open-source ic-reactor project useful β€” it provides React/TypeScript tooling and hooks for working with canisters: documentation

Thank you , i have successful created a new canister ! a bit of time consuming thought! i appreciate your work and we hope in future a single cli will be created so that a single line will create a canister with all default files! thank you for ic-reactor too