![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
amrayn-cli
Advanced tools
Readme
CLI tool for your Amrayn account
• • •
• • •
npm -g i amrayn-cli
yarn global add amrayn-cli
amrayn <command> [parameters]
login
Log in to your amrayn account.
Notes:
login.cli
signature.login.cli
signaturerefresh-login
is run.Optional parameters:
--email <email address>
--permanent
– Permanently login that does not require refresh token.--ssh-key
– SSH private key to log in without password--passphrase
– Ask for passphrase for encrypted private key (only applicable when --ssh-key
option provided)--signature <signature>
– Use custom signature name instead of login.cli
. The signature must be enabled for CLI authentication. You can enable it from settings page. Once you have logged in, changing the CLI authentication status will not revoke the tokens. You will need to deactivate the signature to disable the logged in sessions.rlogin
Refreshes the non-permanent session. The request must be made within 30 days of login
or last rlogin
commands. If the refresh token is expired or login.cli
signature is revoked, you will need to re-login
Optional parameters:
--passphrase
– Ask for passphrase for encrypted private key (only applicable when the original login was using encrypted SSH key, i.e, via --ssh-key
option)logout
Log out of your amrayn account.
whoami
Print currently logged in user information.
Optional parameters:
--raw
– Print just logged in email address.test
Tests connection for current project
Optional parameters:
--details
– Print details if connection failslogs
Stream or download the logs from your function box
Optional parameters:
--tail <number>
- Number of lines to start with--notail
- Do not request any lines to start with (Similar to --tail 0
)--download <filename>
- Save the file instead of streaming to the specified file--verbose
create-project
Create a project
Optional parameters:
--token <token>
--name <project name>
--domain <primary domain>
--username <project username>
init
Initializes a project and create relevant directories.
Optional parameters:
--project-id <project ID>
--services <[Hosting,Functions,...]>
--site-source <source directory>
--site-target <site target>
--site-name <site name>
create-function
Initialize function from one of the available templates.
Alias for this command is create-fn
Optional parameters:
--template <template name>
--name <function name>
--description <description>
--trigger <trigger name>
--trigger-value <trigger value>
create-site
Create new hosting site
Optional parameters:
--token <token>
--name <site name>
--target <site target>
connect-domain
Connect new domain to the specified site. The site must already exist. See create-site
command.
Optional parameters:
--token <token>
--site-name <Site name>
--domain <FQDN>
deploy-site
Deploys the site
Optional parameters:
--token <token>
--message <message>
--verbose
If you want to ignore a file, you can use hosting.ignore
array in amrayn.json
or create .amraynignore
file with glob pattern per line.
deploy-function
Deploys single function from amrayn.json
Alias for this command is deploy-fn
Required parameters:
--name <function name>
Optional parameters:
--token <token>
--message <message>
--version <new version>
--verbose
If you want to ignore a file, you can use functions.list[*].ignore
array in amrayn.json
or create .amraynignore
file with glob pattern per line.
deploy-db
Deployes single data table from amrayn.json
Required parameters:
--name <data table name>
Optional parameters:
--token <token>
--verbose
--create-new
--confirm-data-loss
create-db
Creates new data table and add it to amrayn.json
Optional parameters:
--token <token>
--name <Data table name>
--title <Data table title>
--public-access
--schema-file <json file>
--ui-schema-file <json file>
--options-file <json file>
--verbose
--confirm-data-loss
upload-media
Upload media files
Required parameters:
--file <media file path> --file <more>
Optional parameters:
--token <token>
--verbose
--variants 150,64
- Create variants of specified sizes--dir <dir path>
- Subdirectory to upload to--keep-names
- Keep original file names instead of random generated names--skip-cdn
- Do not save the file/s to CDN (if CDN is enabled on the account)delete-media
Delete single media file (and their respective variants if available)
Required parameters:
--id <media ID>
Optional parameters:
--token <token>
--verbose
Although you shouldn't worry about config file structure because this CLI will take care of it, nevertheless, some people are interested in how it is structured.
{
"projectId": "<project_id>",
"hosting": {
"target": "<target>",
"name": "<definitive name>",
"source": "build",
"ignore": [
"README.md"
]
},
"functions": {
"source": "functions",
"list": [
{
"name": "<public name of function>",
"module": "<module name in source>",
"trigger": "HTTP|HTTP_WITH_AUTH|HTTP_WITH_SCOPED_AUTH|SCHEDULE",
"triggerValue": "GET|POST|PUT|DELETE|ANY|<cron expression>",
"timeout": <timeout in seconds (<=30)>,
"overwrite": true|false,
"alwaysUseLatest": true|false,
"group": 1,
"ignore": [
"README.md",
"docs/*.md"
]
}
]
},
"dataTables": [
{
"name": "weekly_programs",
"title": "Weekly Programs",
"publicAccess": true,
"icon": "CalendarAlt",
"schemaFile": "db/weekly.schema.json",
"uiSchemaFile": "db/weekly.uischema.json",
"optionsFile": "db/weekly.options.json"
}
]
}
Copyright (c) 2020-present Amrayn Web Services
Copyright (c) 2020-present @abumusamq
https://amrayn.com
https://github.com/amrayn/
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
Old CLI tool
The npm package amrayn-cli receives a total of 0 weekly downloads. As such, amrayn-cli popularity was classified as not popular.
We found that amrayn-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.