Skip to content

Command Line Interface

Falcon Wong edited this page Oct 30, 2018 · 2 revisions

Wow, now Seneca comes with a terminal command line interface. What do?

Command Line Interface

Note: This is a toy interface that prefaces the real one. Please be patient while we develop the rest of the application!

Installation

Simply install the Python package and it comes with the CLI.

$ pip3 install seneca

Usage

Create a contract

Create a file in your favorite IDE or text editor ending with the extension <file_name>.sen.py

@export
def my_public_api_function():
    print("Use me.")
def my_private_function():
    print("Don't touch me!")

Run a contract

$ seneca -r <file_name>.sen.py

Publish a contract

Author and sender are optional. This will be changed in the future by requiring login or equivalent mechanism.

$ seneca -p <file_name>.sen.py -n <name_of_contract> \
         --author <your_name> --sender <your_name>

Delete a submitted contract

$ seneca -d <name_of_contract>

Clone this wiki locally