CLI reference
The aster CLI supports contract inspection, credential signing, and calls to
running services. Use it when you need to check an interface or exercise a peer
without writing a client application. Servers run through the SDK in the
language you choose.
| Task | Requires a remote peer? | Starting command |
|---|---|---|
| Record a Python service’s interface | No; service module must be importable | aster contract gen |
| Create an operator root or sign credentials | No; trusted signing key required | aster trust or aster enroll node |
| Inspect and call a service | Yes; address and any required credentials | aster shell or aster call |
Publish or request access through @aster |
Yes; configured registry service and identity | aster publish or aster access |
Installation and qualification
Section titled “Installation and qualification”The CLI is distributed separately as aster-cli; its dependency declaration
allows a range of aster-rpc versions. Installing it does not establish that
its commands match your SDK. A matching public CLI package and a clean-host
walkthrough are not qualified by these docs. Check the installed parser before
using the command examples:
python -m pip show aster-cli aster-rpcaster --helpaster trust sign --helpThe package installation command is:
python -m pip install aster-cliRun it in a separate environment when evaluating package compatibility. Confirm
the resolved SDK and native package against your language installation.
For maintainers with a matching source checkout, python -m pip install -e cli/
installs that checkout’s CLI; the checkout and its dependencies must be selected
together. The reference below describes inspected command behavior and does not
establish the availability of a hosted registry service.
Commands
Section titled “Commands”aster contract gen
Section titled “aster contract gen”Generate a contract manifest for one or more services. This computes the deterministic contract_id for each service version and writes it to a JSON manifest file. No network connection or credentials required.
aster contract gen --service my_module:MyServiceClass --out .aster/manifest.jsonArguments:
| Argument | Description |
|---|---|
--service MODULE:CLASS |
Python import path to the @service-decorated class. May be specified multiple times. |
--out PATH |
Output path for the manifest JSON file. Default: .aster/manifest.json. |
Python AsterServer checks .aster/manifest.json in its working directory when the file exists. A listed service whose live contract_id differs prevents startup. Services absent from the manifest are skipped, so include every interface you intend to guard. Review contract changes and application behavior together.
Example workflow:
# Generate manifestaster contract gen --service myapp.services:TaskService --out .aster/manifest.json
# Commit the manifestgit add .aster/manifest.json && git commit -m "Update contract manifest"
# Server validates on startuppython producer.py # fails if interface changed without updating manifestaster trust keygen
Section titled “aster trust keygen”Generate cryptographic keys for the Aster trust model.
# On the operator's signing machine; also writes root.pubaster trust keygen --out-key root.keyThe root keypair file contains private_key and public_key as hex strings.
The companion public-key file contains the hex-encoded public key. Provision
the public key independently to nodes; keep the private key on the signing
machine. See the trust model.
aster trust sign
Section titled “aster trust sign”Sign a consumer policy credential using the operator’s root:
aster trust sign \ --root-key root.key \ --type policy \ --attributes '{"aster.role":"operator"}' \ --out consumer.token| Argument | Description |
|---|---|
--root-key PATH |
Root keypair JSON file |
--type TYPE |
producer, policy, or ott; defaults to producer, so choose explicitly |
--attributes JSON |
Attribute object; method permissions must match the declared requirements |
--endpoint-id HEX |
Bind to an endpoint; required for producer credentials |
--expires ISO8601 |
Absolute expiry; omission defaults to 30 days |
--out PATH |
Credential JSON destination |
ott creates a one-time token. Enforcing one-time use requires the server’s
replay policy and nonce storage. A signed credential alone does not install
admission enforcement. Prefer aster enroll node when you need an identity
file pairing an endpoint key with its credential.
aster enroll node
Section titled “aster enroll node”Generate (or reuse) a node keypair, sign an enrollment credential, and write or update the .aster-identity file. This is the primary operator workflow for adding nodes to a mesh.
# Enroll a producer nodeaster enroll node \ --profile prod \ --role producer \ --name billing-producer
# Enroll a consumer nodeaster enroll node \ --profile prod \ --role consumer \ --name analytics-consumer \ --identity .aster-identityArguments:
| Argument | Description |
|---|---|
--profile NAME |
Profile to use (determines root key). Default: active profile. |
--role ROLE |
Node role: producer or consumer. |
--name NAME |
Human-readable name for the peer entry. |
--identity PATH |
Path to the .aster-identity file. Default: .aster-identity in current directory. |
--expires DURATION |
Credential expiry. Default: 30 days. |
The command resolves the signing key from the profile/keyring or a --root-key file, generates or reuses the node’s secret key, computes the EndpointId, signs a credential, and appends a [[peers]] entry to the identity file.
--capabilities sets the credential’s aster.role value. Optional
--attributes takes comma-separated key=value pairs here; trust sign uses
JSON instead. --expires accepts 30d, 24h, or an absolute ISO timestamp.
Protect the output file because it contains the endpoint secret as well as the
credential. Producer identity entries do not enable Python producer mesh
admission; that protocol is unavailable in the Python runtime.
aster profile
Section titled “aster profile”Manage operator profiles. Profiles represent deployment meshes (dev, staging, prod) and store the root public key. The root private key is stored in the OS keyring.
# Create a new profile (generates root keypair, stores private key in keyring)aster profile create prod
# List all profilesaster profile list
# Switch active profileaster profile use prod
# Show profile detailsaster profile show prod
# Delete a profileaster profile delete stagingaster call
Section titled “aster call”Invoke a unary RPC method on a remote service from the command line. One-shot, non-interactive.
aster call <ADDRESS> <SERVICE.METHOD> '<JSON>'Example:
aster call aster1Qm... MissionControl.getStatus '{"agent_id": "edge-node-7"}'Accepts JSON input and uses the discovered contract to encode an XLANG payload. Local type definitions are not required.
The CLI can open a session for a one-shot call to a session-scoped service. A one-shot command does not preserve that session across separate invocations. Use an SDK session when several calls must share state.
aster shell
Section titled “aster shell”Interactive shell for exploring and invoking services on a remote peer.
aster shell <ADDRESS>Provides cd, ls, describe, ./methodName for navigation and invocation. Tab completion for service names, methods, and arguments.
aster contract gen-client
Section titled “aster contract gen-client”Generate a typed client library from a running service or exported manifest.
# From a live serviceaster contract gen-client aster1Qm... --out ./clients --package my_client --lang python
# From an exported manifestaster contract gen-client ./Service.aster.json --out ./clients --package my_client --lang pythonArguments:
| Argument | Description |
|---|---|
SOURCE |
aster1... ticket, .aster.json file path, or @handle/Service. |
--out DIR |
Output directory for generated files. |
--package NAME |
Package/module name. Default: derived from source. |
--lang LANG |
Required target language: python or typescript. |
aster contract export
Section titled “aster contract export”Export a contract manifest to a portable .aster.json file for sharing.
aster contract export --manifest .aster/manifest.json -o ./exports/aster contract import
Section titled “aster contract import”Import a .aster.json file into the local contract store.
aster contract import ./TaskManager.aster.jsonaster contract verify
Section titled “aster contract verify”Verify an exported .aster.json matches the local manifest.
aster contract verify ./TaskManager.aster.jsonRegistry service commands
Section titled “Registry service commands”The following commands call a running @aster service. They require its
address, compatible service contracts, and the operator or consumer identity
needed for the operation. They do not start a registry. These docs do not
qualify a public hosted service or its email delivery.
Supply --aster ADDRESS, set ASTER_SERVICE_ADDR, or configure
[aster_service].node_id in the CLI profile file. Direct-address call and
shell do not require this hosted-service workflow.
aster join
Section titled “aster join”Claim a handle on the @aster registry.
aster join --handle myname --email me@example.comaster verify
Section titled “aster verify”Complete email verification for a claimed handle.
aster verify 123456aster publish
Section titled “aster publish”Publish a service to the @aster registry for discovery.
aster publish TaskManageraster discover
Section titled “aster discover”Search the @aster registry for published services.
aster discover taskaster access
Section titled “aster access”Manage registry access records for published services. This does not establish
that the target producer implements delegated admission. Python producers do
not accept @aster enrollment tokens; use their direct consumer-credential
workflow for RPC access.
aster access grant TaskManager @alice --role reader --aster "$ASTER_SERVICE_ADDR"aster access revoke TaskManager @alice --aster "$ASTER_SERVICE_ADDR"aster access list TaskManager --aster "$ASTER_SERVICE_ADDR"aster mcp
Section titled “aster mcp”Start an MCP (Model Context Protocol) server that exposes Aster services as tools for AI agents.
aster mcp <ADDRESS>Profile system
Section titled “Profile system”Profiles are stored in ~/.aster/config.toml:
active_profile = "prod"
[profiles.dev]root_pubkey = "<hex>"created_at = "2025-01-15T10:30:00"
[profiles.prod]root_pubkey = "<hex>"created_at = "2025-01-20T14:00:00"The corresponding root private keys are stored in the OS keyring under service aster and key root_privkey:<profile-name>. An explicit root-key file is also supported by signing commands; protect that file if you use it.
.aster-identity file
Section titled “.aster-identity file”The .aster-identity file is a TOML file containing a node’s secret key and enrollment credentials. It is generated by aster enroll node and consumed by AsterServer and AsterClient at startup.
See Configuration for the file format and how it integrates with AsterConfig.
See configuration and MCP integration for related workflows.