@revenexx/cli
v0.0.4
Published
Revenexx CLI.
Keywords
Readme
This repository is auto-generated by the Revenexx SDK Generator. Do not submit changes directly — they will be overwritten on the next generation run.
Revenexx API — revenexx Revenexx CLI SDK
Revenexx command-line interface for managing your platform.
Installation
The Revenexx API — revenexx CLI is a Node based command line tool to help you interact with the Revenexx API — revenexx API. The CLI is distributed both as an npm package as well as pre built binaries for specific operating systems and architectures.
Install using NPM
Install the CLI globally from the npm registry:
$ npm install -g @revenexx/cliOnce the installation is complete, you can verify the install using
$ revenexx -v
0.0.4Install using prebuilt binaries
If you do not have npm installed, you can always install the prebuilt binaries for your architecture and OS using our convenient installation scripts.
Linux / MacOS Terminal
$ wget -q https://revenexx.com/cli/install.sh -O - | /bin/bashMacOS via Homebrew
Coming soon — Homebrew support is not yet available.
$ brew install revenexxWindows
Via Powershell
$ iwr -useb https://revenexx.com/cli/install.ps1 | iexVia Scoop
$ scoop install https://raw.githubusercontent.com/revenexx-sdks/cli/master/scoop/revenexx.config.jsonOnce the installation completes, you can verify your install using
$ revenexx -v
0.0.4Getting Started
Before you can use the CLI, you need to login to your Revenexx account.
$ revenexx login
? Enter your email [email protected]
? Enter your password ********
✓ Success This will also prompt you to enter your Revenexx endpoint ( default: https://revenexx.com/v1 )
Initialising your project
Once logged in, the CLI needs to be initialised before you can use it with your Revenexx project. You can do this with the revenexx init project command.
$ revenexx init projectThe following prompt will guide you through the setup process. The init command also creates a revenexx.json file representing your Revenexx project.
The revenexx.json file does a lot of things.
- Provides context to the CLI
- Keeps track of all your cloud functions
- Keeps track of all your project's collections
- Helps you deploy your Revenexx project to production and more..
You can also fetch all the collections in your current project using
revenexx init collectionCreating and deploying cloud functions
The CLI makes it extremely easy to create and deploy Revenexx's cloud functions. Initialise your new function using
$ revenexx init function
? What would you like to name your function? My Awesome Function
? What runtime would you like to use? Node.js (node-15.5)
✓ Success This will create a new function My Awesome Function in your current Revenexx project and also create a template function for you to get started.
$ tree My\ Awesome\ Function
My Awesome Function
├── README.md
├── index.js
├── package-lock.json
└── package.json
0 directories, 4 filesYou can now deploy this function using
$ revenexx push function
? Which functions would you like to deploy? My Awesome Function (61d1a4c81dfcd95bc834)
ℹ Info Deploying function My Awesome Function ( 61d1a4c81dfcd95bc834 )
✓ Success Deployed My Awesome Function ( 61d1a4c81dfcd95bc834 )Your function has now been deployed on your Revenexx server! As soon as the build process is finished, you can start executing the function.
Deploying Collections
Similarly, you can deploy all your collections to your Revenexx server using
revenexx push collectionNote
By default, requests to domains with self signed SSL certificates (or no certificates) are disabled. If you trust the domain, you can bypass the certificate validation using
$ revenexx client --selfSigned trueAuthentication
The CLI is token-based. There is no email/password flow — every session uses a gateway API key.
Default (non-interactive)
$ revenexx loginWith no flags, login resolves a token from (in order) --token, REVENEXX_API_KEY, then .revenexx.yaml. If a token is found, it's validated against the gateway (GET /locale) and persisted to ~/.revenexx/prefs.json. If no token is found, the command errors out and tells you how to supply one.
Typical setups:
# CI / scripts
$ revenexx login --token <token> --tenant <tenant>
# Project workspace — drop credentials in `.env` or `.revenexx.yaml`
$ revenexx loginCredential resolution order
For any command that needs auth, credentials are resolved as:
- CLI flag —
--token,--endpoint,--project-id,--tenant - Environment variables —
REVENEXX_API_KEY,REVENEXX_API_URL,REVENEXX_TENANT(legacy aliasREVENEXX_PROJECTis still honoured) - Project file
.revenexx.yaml— nearest one, walking up from the current directory - Global config at
~/.revenexx/prefs.json— populated byrevenexx login - Built-in default endpoint
Exception: the tenant slug prefers the explicit tenants use switch — --tenant flag → ~/.revenexx/tenant → REVENEXX_TENANT → .revenexx.yaml.
Versioning & changesets
The CLI uses Changesets for reviewable version bumps. When you ship a user-visible change, add a changeset alongside your PR:
$ npx changesetThe CLI prompts for a semver bump (major / minor / patch) and a short summary, then writes the answer to .changeset/<random-name>.md. Commit that file with the rest of the PR — the entry shows up in the PR diff and is reviewable like any other change.
At release time, the publish workflow runs npx changeset version, which:
- bumps
package.json, - aggregates all pending
.changeset/*.mdintoCHANGELOG.md, - removes the consumed changesets.
The workflow then stamps the git-tag version (so v1.2.3 always ends up as 1.2.3 regardless of what changesets computed) and publishes to the npm registry.
See .changeset/README.md for a deeper walkthrough.
Clean-machine install verification
A throwaway-container smoke test for the install path lives at scripts/verify-install.sh. It boots a fresh node:20-bookworm-slim image, installs the CLI from the npm registry, and asserts revenexx -v / --help / login --help work.
# Verify the published npm build:
$ npm run verify:install
# Verify a local working copy (npm pack → install inside the container):
$ npm run verify:install:localUse the --image flag on the script to pin a specific Node base (e.g. --image node:22-alpine).
Tenants
revenexx tenants scopes follow-up commands to a specific Revenexx tenant.
| Command | Status |
|---|---|
| revenexx tenants use <slug> | ✅ Persists the active slug to ~/.revenexx/tenant (overriding REVENEXX_TENANT). When an API key is available the slug is validated against the gateway first; a tenant the key can't access is rejected unless --force is passed. |
| revenexx tenants current | ✅ Prints the active slug. Pass --check to verify it against the gateway. |
| revenexx tenants list | ✅ Lists every tenant known to this machine (flag, env, .revenexx.yaml, ~/.revenexx/tenant, login sessions) with its sources and whether the current API key can access it. The gateway doesn't expose a /v1/tenants endpoint (and by design never discloses whether a tenant exists), so this is a client-side aggregate verified per-slug. |
Global Configuration
The CLI stores its configuration in ~/.revenexx/prefs.json. You can seed this file manually before running any commands:
{
"current": "",
"endpoint": "https://api.revenexx.com",
"selfSigned": false,
"project": "",
"key": "",
"locale": "en-US",
"mode": "default"
}| Key | Description |
|-----|-------------|
| current | Active session ID (set automatically on login) |
| endpoint | Your Revenexx API — revenexx server URL |
| selfSigned | Allow self-signed TLS certificates (true/false) |
| project | Default project ID |
| key | API key for server-side access |
| locale | Locale for API responses |
| mode | Auth mode — default (API key) or admin (cookie session) |
You can also configure these values via the CLI:
$ revenexx client --endpoint https://api.revenexx.com
$ revenexx client --key YOUR_API_KEY
$ revenexx client --self-signed trueContribution
This library is auto-generated by RevenexxAPIRevenexx custom [SDK Generator](https://github.com/revenexx api — revenexx/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/revenexx api — revenexx/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
To build and test the CLI for development, follow these steps
- Clone the CLI repository and install dependencies
$ git clone https://github.com/revenexx-sdks/cli
$ cd cli
$ bun install- Build the CLI
$ npm run build- Install the CLI globally from the local build
$ npm install -g .- You can now use the CLI
$ revenexx -vLicense
Please see the license file for more information.
