Operator CLI for Xian networks and nodes
Project description
xian-cli
xian-cli is the operator-facing and automation-facing control plane for
Xian. It owns manifests, node profiles, lifecycle commands, health checks,
local bootstrap flows, and JSON-first client commands without turning
xian-abci, xian-py, or xian-stack into user-facing tools.
The published PyPI package is xian-tech-cli. The installed console command
remains xian. Runtime-heavy commands expect access to xian-stack and
canonical manifests from xian-configs, either through the default sibling
workspace layout or explicit --stack-dir and --configs-dir flags.
Control Plane
flowchart LR
Operator["Operator or automation"] --> CLI["xian CLI"]
CLI --> Configs["xian-configs manifests, modules, solutions"]
CLI --> Stack["xian-stack backend"]
CLI --> SDK["xian-py client"]
Configs --> Profiles["Network and node profiles"]
Stack --> Runtime["Local node runtime"]
SDK --> Node["Running Xian node"]
Runtime --> Node
Quick Start
Local development in a sibling-repo workspace:
uv sync --group dev
uv run xian --help
Isolated operator install from a published release:
uv tool install xian-tech-cli
xian --help
Bootstrap installer (requires uv):
curl -fsSL https://raw.githubusercontent.com/xian-technology/xian-cli/main/scripts/install.sh | sh
Windows PowerShell:
irm https://raw.githubusercontent.com/xian-technology/xian-cli/main/scripts/install.ps1 | iex
Set XIAN_CLI_VERSION before either installer to pin a specific release.
Common Workflows
Create a local network from a template:
uv run xian network template list
uv run xian network create local-dev --chain-id xian-local-1 \
--template single-node-dev --generate-validator-key --init-node
uv run xian node start local-dev
uv run xian node status local-dev
Join a preset-backed shared network with a local profile:
uv run xian network join devnet-node --network devnet \
--template embedded-backend --generate-validator-key \
--init-node --restore-snapshot
uv run xian node health devnet-node
uv run xian node endpoints devnet-node
Package a clean operator handoff bundle for a network manifest:
uv run xian network package-operator-bundle devnet \
--bootstrap-seed '<node_id>@<public-host>:26656' \
--archive
Inspect or recover a configured node:
uv run xian doctor devnet-node
uv run xian doctor devnet-node --skip-live-checks
uv run xian snapshot restore devnet-node
For remote snapshot bootstrap, prefer a signed snapshot manifest plus trusted snapshot signing keys in the network manifest or node profile.
Wallet, query, and transaction automation against a running node:
uv run xian client wallet generate --include-private-key
uv run xian client query nonce --node-url http://127.0.0.1:26657 <address>
uv run xian client tx transfer \
--node-url http://127.0.0.1:26657 \
--private-key-env XIAN_PRIVATE_KEY \
<recipient> 1.25
Operator Journeys
Use xian-cli when you want a stable human-facing command surface. The CLI
reads committed assets from xian-configs, delegates runtime-heavy local
operations to xian-stack, and uses xian-py for wallet / RPC automation.
| Goal | Primary commands | Backing repo |
|---|---|---|
| Create a local network | xian network template ..., xian network create ... |
xian-configs, xian-abci |
| Join an existing network | xian network join ... |
xian-configs, xian-stack |
| Package operator handoff | xian network package-operator-bundle ... |
xian-cli, xian-configs |
| Operate a node | xian node start/status/health/endpoints/stop ... |
xian-stack |
| Diagnose a setup | xian doctor ..., xian snapshot restore ... |
xian-stack, xian-abci |
| Install reusable contracts | xian module list/show/validate/install ... |
xian-configs modules |
| Inspect full app starters | xian solution list/show/starter ... |
xian-configs solutions |
| Script chain interactions | xian client query/call/simulate/tx ... |
xian-py |
Typical local development loop:
uv run xian network template show single-node-indexed
uv run xian network create local-indexed \
--chain-id xian-local-indexed-1 \
--template single-node-indexed \
--generate-validator-key \
--init-node
uv run xian node start local-indexed
uv run xian node health local-indexed
uv run xian node endpoints local-indexed
Install and smoke a reusable module:
uv run xian module list
uv run xian module show dex
uv run xian module validate dex
uv run xian module install dex \
--rpc-url http://127.0.0.1:26657 \
--deployer-private-key "$XIAN_PRIVATE_KEY" \
--top-up-liquidity \
--emit-test-swap
Inspect a complete starter flow before creating files or running installers:
uv run xian solution list
uv run xian solution show dex-demo
uv run xian solution starter dex-demo --flow local
Validate a hash-pinned contract bundle directly:
uv run xian contract bundle validate ../xian-dex/contract-bundle.json
Build Xian VM deployment artifacts from source for SDKs or CI:
uv run xian contract build-artifacts ./contracts/con_counter.s.py \
--output ./dist/con_counter.artifacts.json
Submit prebuilt deployment artifacts through the same signed transaction surface as other client automation:
uv run xian client tx submit-artifacts ./dist/con_counter.artifacts.json \
--node-url http://127.0.0.1:26657 \
--private-key-env XIAN_PRIVATE_KEY \
--mode commit
For scripts and CI, prefer commands that emit JSON and avoid parsing human status text:
uv run xian client query balance \
--node-url http://127.0.0.1:26657 \
<address>
Principles
- Operator UX lives here. Deterministic node logic stays in
xian-abci, and local runtime orchestration stays inxian-stack. This repo is the control plane that ties them together. - Explicit artifacts, not hidden state. Manifests and node profiles are human-readable files. The CLI inspects, generates, and updates them; it does not invent state outside them.
- Templates accelerate, never lock in. Templates, modules, and solutions shorten common setups, but an operator who knows what they are doing should still be able to work directly with manifests, profiles, and node homes.
- Diagnostics are first-class. Health, endpoint discovery, and
doctorpaths are core features, not afterthoughts. - JSON-first for automation. Client commands and inspection commands emit machine-readable output suitable for scripts and CI.
Key Directories
src/xian_cli/— commands, models, manifest handling, and backend integration.cli.py,parser.py— argument parsing and command dispatch.client/— wallet, query, call, simulate, and transaction commands.config_repo.py,models.py— manifest and profile schemas.abci_bridge.py,runtime.py— node-runtime integration.contract_bundles.py— hash-pinned contract-bundle validation.
scripts/— install / packaging helpers (e.g.install.sh,install.ps1).tests/— CLI behavior and manifest / profile validation coverage.docs/— architecture, lifecycle contract, distribution notes, backlog.
Capabilities
- key generation and validator material
- network template, module, and solution discovery
- network creation and network join flows
- node initialization, start, stop, and status
- endpoint and health discovery, including optional dashboard, monitoring,
and stack-managed
xian-intentkit/xian-dex-automation - snapshot restore and doctor diagnostics
- module install / validation flows backed by
xian-configs - solution starter flows backed by
xian-configs - Xian VM deployment artifact generation from contract source
- hash-pinned contract-bundle validation
- wallet, query, call / simulate, and transaction automation via
xian-py
Command Groups
xian keys ...— generate validator and account materialxian network template ...— inspect reusable network templatesxian network create ...— create a local / operator-managed network profilexian network join ...— join an existing preset-backed or remote networkxian network package-operator-bundle ...— package a shareable operator handoffxian node ...— initialize, start, stop, inspect, and recover a node profilexian client ...— wallet, query, call / simulate, and transaction automation including artifact-backed contract submissionxian module ...— inspect, validate, and install reusable modulesxian solution ...— discover full application / operator starter flowsxian contract build-artifacts ...— build Xian VM deployment artifactsxian contract bundle ...— validate hash-pinned contract bundlesxian doctor ...— run broader local diagnostics
Validation
uv sync --group dev
uv run ruff check .
uv run ruff format --check .
uv run pytest
Related Docs
- AGENTS.md — repo-specific guidance for AI agents and contributors
- docs/README.md — index of internal docs
- docs/ARCHITECTURE.md — major components and dependency direction
- docs/BACKLOG.md — open work and follow-ups
- docs/LIFECYCLE_CONTRACT.md — node-lifecycle contract that the CLI enforces
- docs/DISTRIBUTION.md — packaging, install paths, and release-channel rules
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xian_tech_cli-0.1.5.tar.gz.
File metadata
- Download URL: xian_tech_cli-0.1.5.tar.gz
- Upload date:
- Size: 72.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4fa43ee6acc40ec9a694dc07d959d8227db84e13a03ce3906122ceca97a9af2
|
|
| MD5 |
5d68cd5973339508ae57e767de64cbee
|
|
| BLAKE2b-256 |
f4ce1702e751067bf5229d7580ceaa1068471adc4cd768256982743dd6a27985
|
Provenance
The following attestation bundles were made for xian_tech_cli-0.1.5.tar.gz:
Publisher:
release.yml on xian-technology/xian-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xian_tech_cli-0.1.5.tar.gz -
Subject digest:
a4fa43ee6acc40ec9a694dc07d959d8227db84e13a03ce3906122ceca97a9af2 - Sigstore transparency entry: 1541808854
- Sigstore integration time:
-
Permalink:
xian-technology/xian-cli@5c7590e909707461a6eed2ade5df3f8fe811ab83 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/xian-technology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5c7590e909707461a6eed2ade5df3f8fe811ab83 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xian_tech_cli-0.1.5-py3-none-any.whl.
File metadata
- Download URL: xian_tech_cli-0.1.5-py3-none-any.whl
- Upload date:
- Size: 52.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd1b26b93a26d171839ae835937ad2510c5f58e718cf9765a8fce620b59d221c
|
|
| MD5 |
44a36ded7a7afd015b780050fde86f18
|
|
| BLAKE2b-256 |
1ce72b21fc604556bb4bdc0adc042781447cd7cd88d5494bfa8bb71fd85f070d
|
Provenance
The following attestation bundles were made for xian_tech_cli-0.1.5-py3-none-any.whl:
Publisher:
release.yml on xian-technology/xian-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xian_tech_cli-0.1.5-py3-none-any.whl -
Subject digest:
bd1b26b93a26d171839ae835937ad2510c5f58e718cf9765a8fce620b59d221c - Sigstore transparency entry: 1541808948
- Sigstore integration time:
-
Permalink:
xian-technology/xian-cli@5c7590e909707461a6eed2ade5df3f8fe811ab83 -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/xian-technology
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5c7590e909707461a6eed2ade5df3f8fe811ab83 -
Trigger Event:
push
-
Statement type: