0.3.3 • Published 3 months ago

webtender v0.3.3

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

WebTender Cli

WebTender is a new way to manage & monitor your servers in one place. It's a platform that makes it easy to manage, monitor and share your servers with your team.

webt CLI

WebTender CLI implements the REST API and SSH over the hardened WT WebSocket Protocol. See the REST API Docs here

Features

  • SSH into servers shared between your team
  • Launch WebTender hosted VMs from the command line
  • Add any server with SSH access to your WebTender account
  • Manage your servers across cloud providers
  • Manage status monitors for HTTPS, TCP & push health checks
  • Scan for viruses and malware with WebTender's Anti-Virus API (WebAV)
  • (Upcoming) Secure your servers with Multi Factor Authentication (TOTP Authenticator apps)
  • (Upcoming) Copy files between servers and your local machine with webt scp
  • (Upcoming) Share servers with your team
  • (Upcoming) SSH Session recording, audit log (opt in)
  • (Upcoming) Deploy scripts with GitHub actions

Getting Started

Install globally from npm:

npm install --global webtender
bun add --global webtender
pnpm add --global webtender

Or download a standalone binary for your platform from the releases page

To run:

webt --help

# Or
bunx webt --help
npx webt --help
pnpx webt --help

Examples

# Login with your API Key, follow the prompts
webt login

# Launch a WebTender-hosted Instance
webt server launch --name my-server --image debian12 \
    --cpu 2 --memory-gb 2 --storage-gb 8 --provider webtender --region nz-1

# Add an existing server with SSH access
webt server add 10.1.2.3 --hostname my-external-server \
    --port 22 --user tender --jump-host d7b54978-21f0-4a3b-99f0-993a478b22df

# list all servers
webt server list --page 2

# Check VM's running state, CPU, RAM, and local IP address
webt server instance-status my-server

## Check if the server is up and running
webt server ssh-check my-server

# Jump in, no need to configure and share SSH keys
webt ssh my-server

# Copy files to and from your server
webt scp ./local-file.txt my-server:remote-file.txt
# Copy a directory
webt scp my-server:remote-directory/ ./ -r

# Destroy the server
webt server delete my-server

# Append --json to get JSON output for scripting
# works with most commands.
webt server list --json

Authentication

webt login will prompt you for your WebTender API Key and save it to ~/.webtender-config.json

Manage your WebTender API Keys here

You can run webt login --check or webt me to test your API Key.

Change your API Key with webt login --api-key (your key)

You can also set your API Key with the WEBTENDER_API_KEY environment variable in a .env local to the working directory of webt. Environment variables override the ~/.webtender-config.json file.

Building from source

git clone git@github.com:webtender/cli.git webtender-cli
cd webtender-cli

# Use your package manager of choice
bun install || pnpm install || npm install

# Run TS directly with Bun
bun ./src/main.ts --help

# Build for Node support, creates a commonjs bundle,
# Output: dist/webt.cjs
bun run build || pnpm build || npm run build

# Run your build
node dist/webt.cjs --help
bun dist/webt.cjs --help

# Package as a binary
pnpx pkg dist/webt.cjs --output dist/webt

# Link `webt` globally
sudo npm link
webt --help

Supported Platforms

PlatformStatusNotes
Linux x64SupportedTested on Debian 11/12 and Ubuntu 22.04/23.04
Linux arm64SupportedTested on EC2 tg4 series with Debian 12
Windows x64ExperimentalLightly tested on Windows 10 / 11.
Windows arm64Not Tested
MacOS (Darwin) x64Not Tested
MacOS (Darwin) arm64Not Tested

Dependencies

This CLI has Bun and Node runtime support!

JS EnvironmentStatusNotes
Node 20TestedWell tested.
Node 18TestedWell tested.
Node <= 16Not TestedNot recommended.
Bun v1.xExperimentalSSH functionality not working. Support for this is coming

Security

Please report any security issues to security@webtender.host