CLI Cheat Sheet
OneSky CLI Cheat Sheet
This page contains a quick reference for performing common tasks with the CLI.
Prerequisite: the CLI must first be installed, please see Installing the CLI Tool.
Authentication
onesky auth list
: List the Access Token that is currently in use.onesky auth login
: Update the Access Token.onesky auth revoke
: Revoke the Access Token that is currently in use.
Languages
onesky lang list
: List all enabled languages of the app.
File
onesky file list
: List all files of the app.onesky file upload
: Upload a file.onesky file download
: Download a file with the specified file ID.
Basic workflow with examples
Step 1 - Add your Access Token
Replace ACCESS_TOKEN
with the Access Token obtained from the Dashboard:
$ onesky auth login --access-token=ACCESS_TOKEN
Step 2 - Upload a string file
Replace path/to/file/with/valid.ext
with the path to your file:
$ onesky file upload --platform-id=web --language-id=en_US --file-name=en_US.json --path=path/to/file/with/valid.ext
Step 3 - List all files in the app
$ onesky file list
Output:
{
"files": [
{
"id": "98934910-87fe-4da1-becb-a8c89a683014",
"languageId": "en_US",
"platformId": "web",
"status": "IMPORTED"
},
{
"id": "0ed17c19-4ca4-4e0e-a73f-32f10189f18d",
"languageId": "en_US",
"platformId": "web",
"status": "IMPORTED"
}
]
}
Step 4 - Download a string file of a particular id
Replace FILE_ID
with the file id obtained in the previous step:
$ onesky file download --file-id=FILE_ID --plugin-agent=cli
Output:
{
"SIMPLE": "Simple Sentence",
"orange-key": "Orange",
"apple-key": "Apple",
"HELLO": "Hello, {name}. Welcome to {where}!",
"TIP": "This is <span style='color:red'>HTML<\/span>",
"TIP_VAR": "This is <span style='color:red'>{message}<\/span>",
"SALE_START": "Sale begins {start, date}",
"SALE_END": "Sale ends {end, date, long}",
"COUPON": "Coupon expires at {expires, time, medium}",
"SALE_PRICE": "The price is {price, number, USD}"
}
Updated 12 months ago