Skip to content

A command-line interface (CLI) for the Ribose secure platform

License

Notifications You must be signed in to change notification settings

riboseinc/ribose-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ribose CLI

Build Status Code Climate

The command line interface to the Ribose API.

Installation

Add this line to your application's Gemfile:

gem "ribose-cli"

And then execute:

$ bundle install

Or install it yourself as:

$ gem install ribose-cli

Usage

Configure

To start with, we kept it pretty simple, install this gem & then configure your API Token and email using the following interface, This will store your Ribose configuration as .riboserc in the home directory.

ribose config --password='YOUR_API_PASSWORD' --email='youremail@example.com'

Spaces

The space command retrieve space related resources, please use the help command to see what's sub-commands are available.

ribose help space

Listing spaces

To list out the spaces, please use the list command, by default it will print out the basic information in tabular format.

ribose space list

This interface also has support json format, if we want the output to be in json then we can use the following

ribose space list --format json

Show a space details

ribose space show --space-id 123456789

Create a new space

To create a new user space we can use the following interface

ribose space add --name "Space name" --access "open" --category-id 12 \
  --description "Space description"

Update a space

ribose space update --space-id 123456 --name "New Space Name"

Remove an existing space

ribose space remove --space-id 123456789 --confirmation 123456789

Members

List space members

ribose member list --space-id space_uuid

Add a new space member

ribose member add \
  --space-id space_uuid \
  --user-id=user-one-uuid:role_one_id user-two-uuid:role_two_id \
  --email=email-one@example.com:role_one_id email@example.com:role_two_id \
  --message="Your invitation messages to the invitees"

Update an existing member

ribose member update --role-id 135 --member-id 246 --space-id 1234

Remove a space member

ribose member remove --member-id 246 --space-id 1234

Space Invitation

List Space Invitation

ribose invitation list [--query=key:value]

Send out space invitation

ribose invitation add \
  --space-id space_uuid \
  --user-id=user-one-uuid:role_one_id user-two-uuid:role_two_id \
  --email=email-one@example.com:role_one_id email@example.com:role_two_id \
  --message="Your invitation messages to the invitees"

Update a space invitation

ribose invitation update --invitation-id 2468 --role-id 246

Accept a space invitation

ribose invitation accept --invitation-id 2468

Reject a space invitation

ribose invitation reject --invitation-id 2468

Remove a space invitation

ribose invitation remove --invitation-id 2468

Join Space Request

List join space requests

ribose join-space list [--query=space-id:2468]

Fetch a join space request

ribose join-space show --request-id 2468

Add join space request

ribose join-space add --space-id 1234 [--message "My request message"]

Accept a join space request

ribose join-space accept --request-id 2468

Reject a join space requests

ribose join-space reject --request-id 2468

Note

Listing space notes

ribose note list --space-id space_uuid --format json

Show a space note

ribose note show --note-id 123456 --space-id 78901

Create a new note

ribose note add --space-id space_uuid --title "Name of the note"

Update an existing note

ribose note update --space-id 1234 --note-id 5678 --title "Name of the note"

Remove a note

ribose note remove --space-id space_uuid --note-id note_uuid

Files

Listing files

Ribose space may contain multiple files, and if we want to retrieve the list of the files of any space then we can use to following interface.

ribose file list --space-id 123456

The above interface will retrieve the basic details in tabular format, but it also support additional format option, acceptable option: json.

Fetch a file details

ribose file show --file-id 5678 --space-id 1234 [--format json]

Add a new file

Ribose CLI allows us to upload a file in a user space, and to upload a new file we can use the following interface.

ribose file add full_path_the_file.ext  --space-id space_uuid **other_options

Update a space file

ribose file update [--file-name "new filename"] \
[--description "New description"] \
[--tags "tag 1, tag 2, tag 3"] --file-id 5678 --space-id 1234

Remove a space file

ribose file remove --file-id 5678 --space-id 1234

Conversations

Listing conversations

ribose conversation list --space-id 123456789

Show a conversation details

ribose conversation show --space-id 123456789 --conversation-id 67890

Create A New Conversation

ribose conversation add --space-id 123456789 --title "Conversation Title" \
  --tags "sample, conversation"

Update a conversation

conversation update --conversation-id 5678 --space-id 123456789 --title \
"Conversation Title" --tags "sample, conversation"

Remove A Conversation

ribose conversation remove --space-id 1234 --conversation-id 5678

Message

Listing conversation messages

ribose message list --space-id 12345 --conversation-id 56789

Add a new message to conversation

ribose message add --space-id 12345 --conversation-id 56789 \
  --message-body "Welcome to Ribose Space"

Update an existing message

ribose message update --message-id 123456 --space-id 12345 \
  --conversation-id 56789 --message-body "Welcome to Ribose Space"

Remove an existing message

ribose message remove --message-id 1234 --space-id 12345 --conversation-id 456

Development

We are following Sandi Metz's Rules for this gem, you can read the description of the rules here All new code should follow these rules. If you make changes in a pre-existing file that violates these rules you should fix the violations as part of your contribution.

Setup

Clone the repository.

git clone https://github.com/riboseinc/ribose-cli

Setup your environment.

bin/setup

Run the test suite

bin/rspec

Contributing

First, thank you for contributing! We love pull requests from everyone. By participating in this project, you hereby grant Ribose Inc. the right to grant or transfer an unlimited number of non exclusive licenses or sub-licenses to third parties, under the copyright covering the contribution to use the contribution by all means.

Here are a few technical guidelines to follow:

  1. Open an issue to discuss a new feature.
  2. Write tests to support your new feature.
  3. Make sure the entire test suite passes locally and on CI.
  4. Open a Pull Request.
  5. Squash your commits after receiving feedback.
  6. Party!

Credits

This gem is developed, maintained and funded by Ribose Inc.

License

The gem is available as open source under the terms of the MIT License.

About

A command-line interface (CLI) for the Ribose secure platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published