Codius CLI
Command Line Interface for Codius
The command line interface for uploading and extending pods on Codius.
Tutorial
Codius is an open-source decentralized hosting plaform, built with Interledger. With it, users can run software on servers anywhere in the world and pay for it using any currency. This tutorial will teach you how to upload contracts using the Codius Command-line interface, and pay for hosting using XRP.
Prerequisites
- NodeJS
- An XRP Wallet (you will need at least 20 XRP to open a new one)
- Moneyd
Installation
The Codius CLI can be installed by running the following command to install it to your global npm packages.
npm install -g codius
It can then be run with the command codius
.
Command Reference
All codius
commands have a --help
parameter describing their usage, e.g. codius upload --help
for help with the upload
command.
hash <manifest>
Hashes your manifest file. This hash is used as an identifier for the Codius host and the CLI to identify your manifest.
Arguments:
<manifest>
- Type: Object
- Description: A path to the manifest containing information about your proram. Format is described here.
upload <manifest>
Uploads a manifest to a number of Codius hosts. By default it uploads it to a single random known host with a duration of 10 minutes.
Its recommended that you start with a short duration and then extend it to ensure your manifest is running appropriately.
Arguments:
<manifest>
- Type: Object
- Description: A path to the manifest containing information about your program. Format is described here.
Options | Argument Type | Description |
---|
--duration, -d | Integer | Duration (in seconds) by which the contract will be run on all Codius hosts, defaults to 10 mins. |
--max-monthly-rate, --max | Integer | The max rate per month the uploader is willing to pay a Codius host to run the manifest. |
--units, -u | Integer | The unit of currency to pay the Codius hosts with. e.g. XRP |
--host-count, -c | Integer | The number of hosts to upload the manifest to. They are discovered from known hosts and selected randomly. This and --host, -h are mutually exclusive. |
--host, -h | String | The public URI of a host to upload the manifest to. Can be repeated any number of times. This and --host-count, -c are mutually exclusive. |
--add-host-env, --add | Boolean | Adds a $HOST env in the manifest before upload which contains all the hosts the manifest will be uploaded |
--no-prompt, --np | None | Run without making any prompts to the user. |
extend <manifest>
Extends the duration of existing contracts.
Arguments:
<manifest>
- Type: Object
- Description: The path to the manifest with information about your program. Format is described here.
Options | Argument Type | Description |
---|
--duration, -d | Integer | Duration (in seconds) by which the contract will be extended on all Codius hosts currently running it. |
--max-monthly-rate, --max | Integer | The max rate per month the uploader is willing to pay a Codius host to run the manifest. |
--units, -u | Integer | The unit of currency to pay the Codius hosts with. E.g. XRP |
--no-prompt, --np | None | Run without making any prompts to the user. |
pods
Retrieves information about the pods uploaded by the codius cli, their hosts and expiration date.
Options | Argument Type | Description |
---|
--list, -l | Boolean | Lits all pods uploaded by the codius cli, their hash, hosts, and expiration date. |
--get-pod-manifest, -m | String | Takes the manifest hash and looks up the raw manifest file used for the pod. |
host
Suport modify the hosts local database where peers are stored.
Options | Argument Type | Description |
---|
--remove-host, -rmhost | String | Removes the host passed in as a string from the local Codius CLI db. |
--remove-all-hosts, -rmall | Boolean | Removes all hosts from the local database to reset the peer lookup table. |
License
Apache-2.0