Cli for interacting with the MoneroDaemon-RPC API
Project description
Monero-api-cli
Cli for interacting with the MoneroDaemon-RPC API
monero-api-cli
is a Python cli application meant for remotly 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 acctual interaction with the API
Usage:
$ 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.
Available RPC Methods/Arguments:
help
If no additional arguments are passed it will go into REPL mode
Otherwise it will just take the argument and display the help message asociated with it
get_info
Calls the get_info RPC method
version (REPL only)
Print current version
exit (REPL only)
Exit the cli REPL mode
You can also use Ctrl+C to exit
Available options:
-h, --help
Show help message and exits
-v, --version
Show current version and exit
--daemon-address
Which daemon address to use, format: [IPv4 address]:[Port number]
--config-file
Path for a config file
Check Config File section for more details
Example usage:
Config File:
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
Dependencies:
Because the app is bundled using pyinstaller dependencies are not required on the binnary 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 |
How to install
In the future I'll add the project to PyPi | Check TODO
Right now you can either use the source code with the Python interpretor directly
Or you could use the provided binnary available at dist/monero-api-cli
for MacOS/Linux and dist/monero-api-cli.exe
for Windows
Step 0:
Clone this repo :P
$ git clone https://github.com/Dvd-Znf/monero-api-cli
Step 1 (With binnary):
Use the provided binnary (Linux only!)
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 binnary>
Step 1 (From source, recommended for development):
Make sure you have all dependencies installed
Then just use the Python interpretor on the source code
$ cd monero-api-cli
$ python src/monero-api-cli
Why make this from zero when python-monero module already exists?
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 ment 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 realse you may integrate monero-api-cli into whatever you want but thats not my problem/focus.
Can't you ssh into your node then just use monerod?
Some setups require the daemon to be non-interactive
Also that sound super laaaameeeeeee
TODO:
Consider cross-platform support between POSIX and WindowsAdd --config-file optionMake /etc/ config fileAdd config option for changing default daemon address
Add error handling for EOF (End Of File)Choose a build-backend and make pyproject.toml- Add ability to switch daemon address from REPL interactive mode
TODO for v0.1.0:
- Fix issue #1
Package Python Project (Create distribution archive && add it to PyPi)
TODO for v1.0.0:
- Implement more of the API :P
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
Hashes for monero_api_cli-0.1.0rc2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 212b34a381bb08392e05f31a5c5d8f9e5bd2c90e6a50685be6bb9a5574d3f9c5 |
|
MD5 | 37b513b72124c85751db52b39c6578fd |
|
BLAKE2b-256 | ffa56ecbea85de7e3483660ce21edbe361e6ff42a7e17bc0f4cbda3cf46feb82 |