monero-api-cli
is a Python cli application meant for remotely interacting with a Monero Daemon via its RPC API
Under the hood it mostly uses the Prompt-Toolkit module for its REPL interface and Requests for the actual interaction with the API
$ monero-api-cli --help
usage: [-h] [-v] [--daemon-address DAEMON_ADDRESS] [--config-file CONFIG_FILE] {help,get_info} ...
Cli for interacting with the MoneroDaemon-RPC API
options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
--daemon-address DAEMON_ADDRESS
Which daemon address to use, format: [IPv4 address]:[Port number]
--config-file CONFIG_FILE
Path to config file
RPC methods:
{help,get_info}
help Help information regarding a command
get_info Invoke the get_info RPC method
If you call the app with no additional arguments it will enter into a REPL cli mode otherwise it will just take the argument as a RPC method.
If no additional arguments are passed it will go into REPL mode
Otherwise it will just take the argument and display the help message associated with it
Calls the get_info RPC method
Print current version
Exit the cli REPL mode
You can also use Ctrl+C to exit
Show help message and exits
Show current version and exit
Which daemon address to use, format: [IPv4 address]:[Port number]
Path for a config file
Check Config File section for more details
Default location for config file is /etc/monero-api-cli/monero-api-cli.config for MacOS/Linux
And C:\ProgramData\MoneroApiCli\monero-api-cli.confg for Windows
Example config file located at root of this repo, named monero-api-config.config
# Config File INI/TOML like syntax
# Lines starting with # are comments and have their respective default options
[settings]
# Which daemon address to use, format: [IPv4 address]:[Port number]
daemon-address = 127.0.0.1:18081
Because the app is bundled using pyinstaller dependencies are not required on the binary versions
The dependencies are only required when working direclty with the source
Install all python module dependencies with: pip install -r requirements.txt
Name | PyPi Name | What is it used for? |
---|---|---|
Python | N/A | Necessary for interpreting source code |
Requests module | requests |
Used in the implementation of interacting with the API |
Prompt Toolkit module | prompt_toolkit |
Used in the implementation of REPL cli mode |
If you use Arch Linux you know what to do.
Here is the link to the AUR package: https://aur.archlinux.org/packages/monero-api-cli
pip install monero-api-cli
You can either use the source code with the Python interpretor directly
Or you could use the provided binary available at dist/monero-api-cli
for MacOS/Linux and dist/monero-api-cli.exe
for Windows
Clone this repo :P
$ git clone https://github.com/Dvd-Znf/monero-api-cli
Use the provided binary
Dependencies are already bundled in, you dont need to install anything!
$ cd monero-api-cli
$ ./dist/monero-api-cli # MacOS/Linux
PS> ./dist/monero-api-cli.exe # Windows
If you get permisions error add execute permisions with: chmod +x <path to binary>
Make sure you have all dependencies installed
Then just use the Python interpretor on the launcher.py
script
$ cd monero-api-cli
$ python launcher.py
Or you can run the source directly as a module
$ python -m src.monero_api_cli
- This is not meant as a replacement for python-monero module!
Instead, this is an independent cli application for interacting with monerod via its RPC API
i.e. cli-app & no wallet RPC - This is mostly meant for monero node operators who would like a nice, intuitive and easy way to interact with their daemon
This is the reason I made this. - python-monero last update to its source code was more than a year ago, even tho it could use some improvements, at least to its docs.
This is activly developed.
After first release you may integrate monero-api-cli into whatever you want but thats not my problem/focus.
Some setups require the daemon to be non-interactive
Also that sound super laaaameeeeeee
- Implement
get_connections
RPC Method - Implement
get_version
RPC Method - Implement
/get_height
RPC Method - Implement
/get_net_stats
RPC Method
- Implement more of the API :P