https://github.com/aeternity/aepp-cli-js
Command line interface for the æternity blockchain
https://github.com/aeternity/aepp-cli-js
aeternity blockchain cli devtools
Last synced: 6 days ago
JSON representation
Command line interface for the æternity blockchain
- Host: GitHub
- URL: https://github.com/aeternity/aepp-cli-js
- Owner: aeternity
- License: isc
- Created: 2018-10-29T13:26:40.000Z (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2025-04-08T15:38:07.000Z (8 days ago)
- Last Synced: 2025-04-10T01:41:13.268Z (6 days ago)
- Topics: aeternity, blockchain, cli, devtools
- Language: JavaScript
- Homepage: https://docs.aeternity.com/developer-documentation/aepp-cli-js
- Size: 2.2 MB
- Stars: 7
- Watchers: 5
- Forks: 6
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-aeternity - aepp-cli-js - A command line interface for the æternity blockchain. (Development / CLIs, other Plugins & Libraries)
README
# aepp-cli-js
Command Line Interface for the æternity blockchain.
## Installation
You can install `aecli` using your preferred tool (`yarn` or `npm`). Here's an `npm` example
```
$ npm install --global @aeternity/aepp-cli
```## Quick start
Let's ensure that CLI installed correctly by running `$ aecli`. It will show the available commands as below.
```
$ aecli
Usage: aecli [options] [command]Options:
-V, --version output the version number
-h, --help display help for commandCommands:
account handle wallet operations
spend [options] send coins to another account or contract
name manage AENS names
contract contract interactions
oracle interact with oracles
chain make a request to the node
inspect [options] get details of a node entity
tx generate transactions to sign and submit manually
config [options] print the current sdk configuration
select-node [nodeUrl] specify node to use in other commands
select-compiler [compilerUrl] specify compiler to use in other commands
help [command] display help for command
```> To read documentation of other commands and sub-commands, you can append `--help`. For example, type `aecli account --help` to get a list of commands available in `account` module.
The next step is to create a wallet to use in other commands:
```
$ aecli account create ./wallet.json
Address ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E
Path /path/to/wallet.json
```You need to send some coins to the created wallet.
> On testnet you can do that using [faucet]. Switch to testnet using `$ aecli select-node`.
[faucet]: https://faucet.aepps.com/
Run `$ aecli inspect ` to ensure that it got coins.
```
$ aecli inspect ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E
Account ID ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E
Account balance 10000ae
Account nonce 0
No pending transactions
```At the last step, we will send our coins to another account:
```
$ aecli spend ./wallet.json ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT 42ae
Transaction mined
Transaction hash th_2muLsbZeFaVJ3tePTnLqobPhxBzwFsm1zUv8sjgMX4LKuevX2T
Block hash mh_dnoULQWpiRtcrntd5yJPUxcu7YrTu18xZ1e9EC2b8prKdShME
Block height 2 (about now)
Signatures ["sg_SG5uW5KEGiy5iG1cCkKq4VEdpyvewcW4NjVf4vj2ZoCiap5iB7UQoknWpyWsD4FkziBuGPE88zwXemq3ZvPrdzNtXtKuD"]
Transaction type SpendTx (ver. 1)
Sender address ak_21A27UVVt3hDkBE5J7rhhqnH5YNb4Y1dqo4PnSybrH85pnWo7E
Recipient address ak_AgV756Vfo99juwzNVgnjP1gXX1op1QN3NXTxvkPnHJPUDE8NT
Amount 42ae
Payload ba_Xfbg4g==
Fee 0.00001684ae
Nonce 1
TTL 4 (about now)
```Find out more in the [user guide](./user-guide.md).
## Resources
- [User guide](./user-guide.md)
- [Changelog](./CHANGELOG.md)
- [Contributor guide](./contributor-guide.md)## Commands reference
- `account`
- [`sign`](./reference.md#sign) — sign a transaction using wallet
- [`sign-message`](./reference.md#sign-message) — sign a personal message using wallet
- [`verify-message`](./reference.md#verify-message) — check if message was signed by address
- [`address`](./reference.md#address) — get wallet address and optionally secret key
- [`create`](./reference.md#create) — create a wallet by a secret key or generate a new one
- [`spend`](./reference.md#spend) — send coins to another account or contract
- `name`
- [`full-claim`](./reference.md#full-claim) — claim an AENS name in a single command
- [`pre-claim`](./reference.md#pre-claim) — pre-claim an AENS name
- [`claim`](./reference.md#claim) — claim an AENS name (requires pre-claim)
- [`bid`](./reference.md#bid) — bid on name in auction
- [`update`](./reference.md#update) — update a name pointer
- [`extend`](./reference.md#extend) — extend name TTL
- [`revoke`](./reference.md#revoke) — revoke an AENS name
- [`transfer`](./reference.md#transfer) — transfer a name to another account
- `contract`
- [`compile`](./reference.md#compile) — compile a contract to get bytecode
- [`encode-calldata`](./reference.md#encode-calldata) — encode calldata for contract call
- [`decode-call-result`](./reference.md#decode-call-result) — decode contract call result
- [`call`](./reference.md#call) — execute a function of the contract
- [`deploy`](./reference.md#deploy) — deploy a contract on the chain
- `oracle`
- [`create`](./reference.md#create-1) — register current account as oracle
- [`extend`](./reference.md#extend-1) — extend oracle's time to leave
- [`create-query`](./reference.md#create-query) — create an oracle query
- [`respond-query`](./reference.md#respond-query) — respond to an oracle query
- `chain`
- [`top`](./reference.md#top) — query the top key/micro block of the chain
- [`status`](./reference.md#status) — query node version, network id, and related details of the selected node
- [`ttl`](./reference.md#ttl) — get relative TTL by absolute TTL
- [`play`](./reference.md#play) — prints blocks from top until condition
- [`broadcast`](./reference.md#broadcast) — send signed transaction to the chain
- [`inspect`](./reference.md#inspect) — get details of a node entity
- `tx`
- [`spend`](./reference.md#spend-1) — build spend transaction
- [`name-preclaim`](./reference.md#name-preclaim) — build name preclaim transaction
- [`name-claim`](./reference.md#name-claim) — build name claim transaction
- [`name-update`](./reference.md#name-update) — build name update transaction
- [`name-transfer`](./reference.md#name-transfer) — build name transfer transaction
- [`name-revoke`](./reference.md#name-revoke) — build name revoke transaction
- [`contract-deploy`](./reference.md#contract-deploy) — build contract deploy transaction
- [`contract-call`](./reference.md#contract-call) — build contract call transaction
- [`oracle-register`](./reference.md#oracle-register) — build oracle register transaction
- [`oracle-extend`](./reference.md#oracle-extend) — build oracle extend transaction
- [`oracle-post-query`](./reference.md#oracle-post-query) — build oracle post query transaction
- [`oracle-respond`](./reference.md#oracle-respond) — build oracle respond transaction
- [`verify`](./reference.md#verify) — verify transaction using node
- [`config`](./reference.md#config) — print the current sdk configuration
- [`select-node`](./reference.md#select-node) — specify node to use in other commands
- [`select-compiler`](./reference.md#select-compiler) — specify compiler to use in other commands