polkadot-cli 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +29 -0
  2. package/dist/cli.mjs +1067 -648
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -539,6 +539,35 @@ dot query System.Number --output json | jq
539
539
 
540
540
  In an interactive terminal, both streams render together so you see progress and results normally.
541
541
 
542
+ ### Shell completions
543
+
544
+ Generate shell completion scripts for tab-completing subcommands, chain names, pallet names, and item names. Completions use cached metadata — no network calls are made.
545
+
546
+ ```bash
547
+ # zsh — add to ~/.zshrc
548
+ eval "$(dot completions zsh)"
549
+
550
+ # bash — add to ~/.bashrc
551
+ eval "$(dot completions bash)"
552
+
553
+ # fish — save to completions directory
554
+ dot completions fish > ~/.config/fish/completions/dot.fish
555
+ ```
556
+
557
+ Once installed, press Tab to complete:
558
+
559
+ ```bash
560
+ dot qu<Tab> # → query
561
+ dot query.<Tab> # → query.System, query.Balances, ...
562
+ dot query.System.<Tab> # → query.System.Account, query.System.Number, ...
563
+ dot polkadot.<Tab> # → polkadot.query, polkadot.tx, ...
564
+ dot --chain <Tab> # → polkadot, paseo, ...
565
+ dot --from <Tab> # → alice, bob, ..., stored account names
566
+ dot chain <Tab> # → add, remove, update, list, default
567
+ ```
568
+
569
+ Completions are context-aware: `query.` shows pallets with storage items, `tx.` shows pallets with calls, `events.` and `errors.` filter accordingly. Chain prefix paths like `polkadot.query.System.` work at any depth.
570
+
542
571
  ## How it compares
543
572
 
544
573
  | | polkadot-cli | @polkadot/api-cli | subxt-cli | Pop CLI |