Skip to content

Quick Start

The examples below distinguish runnable steps from illustrative placeholders, so the first local pass stays predictable.

Before you start

  • Version rule: use the exact version string with v prefix everywhere, for example v1.0.0.
  • CLI host rule: for real remote queries, set ASACTL_SERVER_HOST explicitly instead of relying on the implementation default.

1. Install ASACtl

Runnable if Bun is installed.

bun add -g asactl

Requirements:

  • Bun runtime (recommended Bun >= 1.0)

2. Point CLI to a real host

Runnable.

export ASACTL_SERVER_HOST=https://asahub.ai

3. Verify CLI is available

Runnable.

asactl -h
asactl -h agreement

Expected outcome:

  • help text is printed for the root command and the agreement module

4. Fetch one public agreement

Runnable against the configured remote host.

asactl agreement search -q '{"tags":["payment"]}'
asactl agreement get -q '{"agreementName":"try","version":"v2.4.5"}'

Expected outcome:

  • the first command returns a public agreement list
  • the second command returns one agreement detail and saves it into the local workspace

5. Search public services

Runnable against the configured remote host.

asactl service search -q '{"query":"shop"}'
asactl service get -q '{"serviceId":"<service-id>"}'

Note:

  • <service-id> is a placeholder
  • first run service search, then replace <service-id> with a real id from the response

6. Call a local service by agreement

Requires a local service that already implements the target agreement.

asactl call shop -a list -v v1.0.0 -h 127.0.0.1:3000

Use this only after you have started a local service on 127.0.0.1:3000.

7. Publish a service index

Illustrative only. Replace the payload with real service metadata.

asactl service post -q '{"name":"<service-name>","summary":"service summary","provider":"asa"}'

8. Publish an agreement

asactl build agreement
asactl agreement prepost
asactl agreement post

Notes:

  • local working files live under ~/.asactl/build/agreement/<name>/<version>/
  • publish the exact agreement.json; do not publish meta.json