@kiwa-lab/cli
v2.0.2
Published
CLI for kiwa (init / doctor commands)
Downloads
432
Readme
@kiwa-lab/cli
CLI for kiwa with init and doctor commands.
@kiwa-lab/cli scaffolds Playwright-based dApp E2E tests that use @kiwa-lab/dapp, and provides a quick prerequisite check for local setup.
Installation
pnpm add -D @kiwa-lab/cli
# or use it without installing
pnpm dlx @kiwa-lab/cli init
pnpm dlx @kiwa-lab/cli doctorBonus — Claude Code plugin
Use kiwa with Claude Code? Install the matching skill chain in one command — /kiwa:kiwa-design, /kiwa:kiwa-play, /kiwa:kiwa-forge, /kiwa:kiwa-hardhat, /kiwa:kiwa-vitest, /kiwa:kiwa-api, /kiwa:kiwa-review become available across any dApp project. (The /kiwa:kiwa-test one-shot orchestrator requires examples/ and is kiwa-monorepo-only.)
# In Claude Code:
/plugin marketplace add cardene777/kiwa
/plugin install kiwa@kiwa-marketplace
/reload-pluginsPlugin skills are namespaced by plugin name (
/kiwa:kiwa-design, not/kiwa-design). See kiwa README — Option A for the full skill list.
Commands
kiwa init
Scaffolds Playwright E2E files into an existing dApp project and wires the generated test to @kiwa-lab/dapp.
pnpm dlx @kiwa-lab/cli init
# creates: e2e/connect.spec.ts + playwright.config.ts
# also updates package.json and creates tsconfig.json if missingAvailable flags include --force, --testDir, --config-suffix, --script-key, and --with-deploy.
kiwa doctor
Checks that the required anvil binary is available in the current environment.
pnpm dlx @kiwa-lab/cli doctorkiwa anvil seed <script> --out <path>
Runs <script> (any executable .mjs / .js) against a fresh anvil instance and dumps the full chain state to <path> via anvil --dump-state. The script reads process.env.ANVIL_RPC_URL to deploy contracts and prepare seed data; on exit, anvil writes the state file that downstream vitest tests can pass to setupTestEnv({ anvil: { loadState: ... } }) for instant chain startup.
pnpm dlx @kiwa-lab/cli anvil seed tests/seed.ts --out tests/fixtures/state.json
# OK seeded state at /…/tests/fixtures/state.json (port 49xxx)Flags: --chain-id <n> (default 31337), --port <n> (default: random free port).
Related
- GitHub repository
- Full documentation
- @kiwa-lab/dapp - runtime fixture
Author
License
MIT
