Command line wallet tooling built on the pollyweb library.
Project description
pollyweb-cli
pollyweb-cli provides the pw command, a small wallet-style CLI built on top of the pollyweb Python package.
It helps you:
- create a local PollyWeb key pair
- bind that identity to a PollyWeb-enabled domain
- send an echo request to a domain and verify the signed reply
- send a signed PollyWeb message from a file
- listen for notifier chat events over AppSync Events
- send signed shell commands to a remote domain
Install
Install the CLI globally from PyPI with pipx:
pipx install pollyweb-cli
Or install it globally with pip:
python3 -m pip install pollyweb-cli
After installation, the CLI is available as:
pw --help
Before running any pw command, the CLI checks PyPI for a newer published pollyweb-cli release. If it finds one, it automatically installs the newer release into the current Python environment and reruns the original pw ... command on the upgraded code. If the upgrade install fails, the CLI prints a notice and continues running the original command on the currently installed version.
To force an upgrade directly, run:
pw upgrade
This command directly installs the latest published pollyweb-cli release into the current Python environment.
To confirm which release is installed:
pw version
For more setup details, see docs/install.md.
Quick Start
Create your local key pair:
pw config
This writes your keys to:
~/.pollyweb/private.pem~/.pollyweb/public.pem
Bind your wallet to a domain:
pw bind vault.example.com
This sends a Bind@Vault request to https://pw.vault.example.com/inbox using the compact public-key value in the request body. The command reuses the stored bind UUID for that domain from ~/.pollyweb/binds.yaml when one exists and otherwise falls back to From: Anonymous, while still storing only the UUID portion of the returned bind token in ~/.pollyweb/binds.yaml. Rebinding the same domain replaces the existing bind for that domain unless the server returns a different Schema, in which case both entries are kept. Use --anonymous to ignore the stored bind and force From: Anonymous, or --unsigned to remove Hash and Signature before sending.
You can also use the PollyWeb shorthand domain suffix:
pw bind any-hoster.dom
That alias is normalized to any-hoster.pollyweb.org before signing, delivery, and local bind storage.
Open an interactive shell against a domain:
pw shell vault.example.com
Listen for notifier chat events on the configured wallet channel:
pw chat
Override the configured notifier for a single chat session:
pw chat notifier.example.com --debug --test
Publish a one-shot "TEST" event immediately after the websocket connection is acknowledged, then keep listening:
pw chat --test
Send a one-shot echo request and verify the synchronous signed response:
pw echo vault.example.com
This sends an Echo@Domain message to https://pw.<domain>/inbox, expects a synchronous PollyWeb message in return, verifies the reply signature using the responding domain's DKIM key, and checks that the response From, To, Subject, and Correlation values match the target domain and the original request. Use --anonymous to force From: Anonymous, or --unsigned to remove Hash and Signature before sending.
Send a signed message from a file:
pw msg ./message.yaml
This reads a YAML, JSON, or Python message definition, or you can pass a raw JSON object string or inline Key:Value fields. The CLI sends the message with wallet-backed sender selection to https://pw.<To>/inbox and prints the raw synchronous response body.
pw msg '{"To":"vault.example.com","Subject":"Echo@Domain","Body":{"Ping":"pong"}}'
pw msg To:any-domain.org Subject:topic@role DynamicBodyProperty:123
pw msg to:any-domain.dom subject:Echo@Domain --debug
For pw msg, inline header keys like to and subject are matched case-insensitively, and a To domain ending in .dom is expanded to .pollyweb.org before sending. From must be omitted, Anonymous, or a UUID bind value. When From is omitted or Anonymous, the CLI first checks ~/.pollyweb/binds.yaml for a stored bind matching the target domain and uses that UUID as msg.From; if none is stored, it falls back to From: Anonymous. Use --anonymous to ignore stored binds entirely, or --unsigned to keep the selected sender but remove Hash and Signature.
Run a wrapped message test fixture:
pw test ./test.yaml
Or, when the current directory contains pw-tests, run every *.yaml fixture in that folder in alphabetical order:
pw test
This reads a YAML file with Outbound and optional Inbound sections. The CLI sends only Outbound with the same wallet-backed rules as pw msg, then if Inbound is present it parses the synchronous JSON response and verifies that the expected Inbound fields appear in the returned payload. Fixtures can also use {BindOf(domain)} string placeholders, which resolve against ~/.pollyweb/binds.yaml with the same canonical domain normalization as pw bind. Any string field may also use "<PublicKey>", which resolves to the configured wallet public key from ~/.pollyweb/public.pem without the PEM envelope lines. Inside Inbound, the special string "<uuid>" matches any valid UUID value in the returned payload. --anonymous ignores stored binds, and --unsigned removes Hash and Signature before sending.
Each command you enter is parsed into a base Command plus an Arguments dictionary, then sent as a Shell@Domain message whose From header is set to the first stored bind for that domain by default. Long flags like --all 123 become {"all":"123"}, short flags like -a 123 become {"a":"123"}, key=value tokens like a=123 become {"a":"123"}, and plain positional arguments remain indexed as {"0":"value"}. --anonymous skips the bind requirement and forces From: Anonymous, while --unsigned removes Hash and Signature before each send. pw shell also keeps the last 20 commands for that exact domain in ~/.pollyweb/history/, so you can use the up/down arrows to revisit recent commands. Commands are recorded before the network request is sent, which means failed requests still appear in that domain's history.
To inspect the signed shell request and response for each command as colorized, indented YAML, including the full inbox URL the POST is sent to:
pw shell --debug vault.example.com
Debugging Bind Requests
Use --debug with pw bind to print the outbound request payload, the full inbox URL the POST is sent to, and the inbound response body as colorized, indented YAML:
pw bind --debug vault.example.com
This is useful when you want to inspect the exact message contents being sent or troubleshoot an unexpected server response.
Command Summary
pw configgenerates a PollyWeb key pair in~/.pollywebpw config --forcereplaces an existing key pairpw bind <domain>requests and stores a bind token for a domainpw bind --debug <domain>shows the target inbox URL plus bind request and response payloads as colorized YAMLpw echo <domain>sendsEcho@Domainand verifies the signed synchronous response, accepting a replyTothat matches either the target domain or its stored bind UUIDpw echo --debug <domain>shows the target inbox URL plus echo request and response payloads as colorized YAMLpw msg <message...>sends a signed message from a YAML, JSON, or Python file, a JSON object string, or inlineKey:Valuefieldspw msg --debug <message...>shows the target inbox URL plus message request and response payloads as colorized YAMLpw test [path]sends a wrappedOutboundfixture and verifies the returned payload againstInboundpw testwithout a path runs every*.yamlfixture under./pw-testsin alphabetical orderpw test --debug [path]shows the target inbox URL plus test request and response payloads as colorized YAMLpw chatlistens for AppSync Events on the configured notifier and wallet channelpw chat [domain]optionally overridesHelpers.Notifierfor that runpw chat --testpublishes a"TEST"event immediately after connecting, then listenspw shell <domain>starts an interactive remote shell sessionpw shell <domain>remembers the last 20 commands per domain for arrow-key navigationpw shell --debug <domain>shows the target inbox URL plus shell request and response payloads as colorized YAMLpw versionprints the installed CLI version after the same upgrade preflight check used by otherpwcommands
For more examples and command behavior, see docs/usage.md and the command-specific guides in docs/commands/.
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 pollyweb_cli-0.1.115.tar.gz.
File metadata
- Download URL: pollyweb_cli-0.1.115.tar.gz
- Upload date:
- Size: 63.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
534670d6425aa2209b36b3522461fb36bf794b66074d91cd238317ac64a4638c
|
|
| MD5 |
06ee83982efdcbf00ff01de034c0e3af
|
|
| BLAKE2b-256 |
68503d057f0ac4242f4cfad9c28d82dbcc99209c4b27269669128e84f887b8fd
|
Provenance
The following attestation bundles were made for pollyweb_cli-0.1.115.tar.gz:
Publisher:
publish.yml on pollycore/wallet-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pollyweb_cli-0.1.115.tar.gz -
Subject digest:
534670d6425aa2209b36b3522461fb36bf794b66074d91cd238317ac64a4638c - Sigstore transparency entry: 1123370443
- Sigstore integration time:
-
Permalink:
pollycore/wallet-cli@ee25910eca94244cb0c3228a1975e3c1760abb0f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pollycore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee25910eca94244cb0c3228a1975e3c1760abb0f -
Trigger Event:
push
-
Statement type:
File details
Details for the file pollyweb_cli-0.1.115-py3-none-any.whl.
File metadata
- Download URL: pollyweb_cli-0.1.115-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e032ad0989e7a72d0226999560e363a73a5e8ac109bbd8d0c97e626f6ca0de96
|
|
| MD5 |
a72ee047b2cd0022653c084ef81f9948
|
|
| BLAKE2b-256 |
d4433190937210ff3cb3bd834fda5782ee20741cd8608fbe9a1984d1d3ff5bde
|
Provenance
The following attestation bundles were made for pollyweb_cli-0.1.115-py3-none-any.whl:
Publisher:
publish.yml on pollycore/wallet-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pollyweb_cli-0.1.115-py3-none-any.whl -
Subject digest:
e032ad0989e7a72d0226999560e363a73a5e8ac109bbd8d0c97e626f6ca0de96 - Sigstore transparency entry: 1123370533
- Sigstore integration time:
-
Permalink:
pollycore/wallet-cli@ee25910eca94244cb0c3228a1975e3c1760abb0f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pollycore
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ee25910eca94244cb0c3228a1975e3c1760abb0f -
Trigger Event:
push
-
Statement type: