Skip to content

Repository files navigation



paraspell-cli

Scaffold ParaSpell XCM SDK and XCM API starter apps.

version downloads build codecov

ParaSpell website [here]

XCM SDK documentation [here]

XCM API documentation [here]

XCM Tools monorepo [here]



Usage

Note

Requires Node.js 24 or newer.

Quick start

pnpm dlx paraspell-cli@latest

Use npm, Yarn, or Bun instead if that's your package manager:

npx paraspell-cli@latest
yarn dlx paraspell-cli@latest
bunx paraspell-cli@latest

Interactive mode

  1. Choose XCM SDK or XCM API.
  2. Choose React, Vue, or Node.js.
  3. Pick a Polkadot client for the SDK: PAPI (recommended), Polkadot.js, or Dedot.
  4. Choose the Swap, EVM, and Snowbridge extensions.
  5. Name the project and choose a package manager.
  6. Optionally configure a development wallet for Node.js.
  7. Review the configuration before files are written.

Note

Project creation and dependency installation report live progress. If installation fails, the generated project is kept and the CLI prints the command to finish it manually.

What to choose 🧰

Choice Options Pick based on
Tool XCM SDK / XCM API XCM SDK calls ParaSpell directly from your app. XCM API builds transfers via REST while you sign them locally, keeping XCM logic out of your app.
Extensions EVM, Swap, Snowbridge EVM for EVM-chain origins, Swap for cross-chain swaps (@paraspell/swap), Snowbridge for Ethereum ↔ Polkadot transfers.
Wallet secrets (Node.js only) Configure / skip Configure a development wallet (e.g. //Alice) so the generated server can sign and submit live transfers on POST /; skip it to wire up signing yourself. Secrets are entered via masked prompts and written to a gitignored .env.

Warning

Avoid typing secrets literally when passing them as flags in shared shells or CI logs: command-line values can be saved in shell history. Prefer the interactive prompt, or edit .env directly.

Getting help

npx paraspell-cli@latest --help
npx paraspell-cli@latest sdk --help
npx paraspell-cli@latest api --help

Note

These commands run the CLI once without installing it, so paraspell-cli alone won't work afterward. Install it globally with npm i -g paraspell-cli to call paraspell-cli --help directly.

Want to skip the prompts and generate a project in one command? See Commands below.

Commands

Every wizard step is also available as a flag. Pass everything a command needs and the wizard is skipped entirely, or leave a value out and the CLI only prompts for that one — handy for templates, CI pipelines, or repeated scaffolding.

paraspell-cli sdk [framework] [flags]
paraspell-cli api [framework] [flags]

framework can also be passed positionally instead of via --framework.

Flags

Flag Values Description
--name string Project name
--framework react | vue | node Target framework (default react)
--client papi | pjs | dedot JS client, sdk command only (default papi)
--extensions comma-separated list of evm, swap, snowbridge Extensions to include
--package-manager npm | yarn | pnpm | bun Package manager used to install dependencies (default pnpm)
--out path Output directory
--private-key string EVM wallet key for the Node.js server, when using EVM or Snowbridge origins
--substrate-mnemonic string Substrate mnemonic or //Dev URI for the Node.js server

Examples

# React app using the XCM SDK and PAPI
npx paraspell-cli@latest sdk react \
  --name my-xcm-app \
  --client papi \
  --package-manager pnpm

# Vue app using the XCM API with EVM origins and swaps
npx paraspell-cli@latest api vue \
  --name my-xcm-api \
  --extensions evm,swap \
  --package-manager npm

# Headless SDK server with swaps
npx paraspell-cli@latest sdk node \
  --name my-xcm-server \
  --client dedot \
  --extensions swap

Note

Non-interactive environments use sensible defaults for anything not passed as a flag. Dependency installation stays an explicit step, so it can be run separately in CI.

Warning

Avoid typing --private-key or --substrate-mnemonic literally in shared shells or CI logs: command-line values can end up in shell history. Pass them via an environment variable instead. Preferably through the interactive prompt, or edit the generated .env directly.

Development

pnpm install
pnpm build
pnpm start

Tests

  • Run compilation using pnpm compile
  • Run the linter using pnpm lint
  • Check formatting using pnpm format:check
  • Run the build using pnpm build
  • Run unit tests using pnpm test
  • Run unit tests with coverage using pnpm test --coverage
  • Run end-to-end tests using pnpm test:e2e

Get Support 🚑

License

Made with 💛 by ParaSpell✨

Published under MIT License.

About

ParaSpell CLI

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages