The command line interface to the Ribose API.
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
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'
The space
command retrieve space related resources, please use the help
command to see what's sub-commands are available.
ribose help space
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
ribose space show --space-id 123456789
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"
ribose space update --space-id 123456 --name "New Space Name"
ribose space remove --space-id 123456789 --confirmation 123456789
ribose member list --space-id space_uuid
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"
ribose member update --role-id 135 --member-id 246 --space-id 1234
ribose member remove --member-id 246 --space-id 1234
ribose invitation list [--query=key:value]
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"
ribose invitation update --invitation-id 2468 --role-id 246
ribose invitation accept --invitation-id 2468
ribose invitation reject --invitation-id 2468
ribose invitation remove --invitation-id 2468
ribose join-space list [--query=space-id:2468]
ribose join-space show --request-id 2468
ribose join-space add --space-id 1234 [--message "My request message"]
ribose join-space accept --request-id 2468
ribose join-space reject --request-id 2468
ribose note list --space-id space_uuid --format json
ribose note show --note-id 123456 --space-id 78901
ribose note add --space-id space_uuid --title "Name of the note"
ribose note update --space-id 1234 --note-id 5678 --title "Name of the note"
ribose note remove --space-id space_uuid --note-id note_uuid
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
.
ribose file show --file-id 5678 --space-id 1234 [--format json]
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
ribose file update [--file-name "new filename"] \
[--description "New description"] \
[--tags "tag 1, tag 2, tag 3"] --file-id 5678 --space-id 1234
ribose file remove --file-id 5678 --space-id 1234
ribose conversation list --space-id 123456789
ribose conversation show --space-id 123456789 --conversation-id 67890
ribose conversation add --space-id 123456789 --title "Conversation Title" \
--tags "sample, conversation"
conversation update --conversation-id 5678 --space-id 123456789 --title \
"Conversation Title" --tags "sample, conversation"
ribose conversation remove --space-id 1234 --conversation-id 5678
ribose message list --space-id 12345 --conversation-id 56789
ribose message add --space-id 12345 --conversation-id 56789 \
--message-body "Welcome to Ribose Space"
ribose message update --message-id 123456 --space-id 12345 \
--conversation-id 56789 --message-body "Welcome to Ribose Space"
ribose message remove --message-id 1234 --space-id 12345 --conversation-id 456
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.
Clone the repository.
git clone https://github.com/riboseinc/ribose-cli
Setup your environment.
bin/setup
Run the test suite
bin/rspec
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:
- Open an issue to discuss a new feature.
- Write tests to support your new feature.
- Make sure the entire test suite passes locally and on CI.
- Open a Pull Request.
- Squash your commits after receiving feedback.
- Party!
This gem is developed, maintained and funded by Ribose Inc.
The gem is available as open source under the terms of the MIT License.