telebase-cli
v1.0.0
Published
CLI tool to interact with Telebase - the Telegram-powered serverless database layer.
Maintainers
Readme
Telebase CLI ⚡
Interactive Command-Line Interface to connect, query, upload, and manage your Telebase serverless database and Telegram storage channel directly from the terminal.
🏗️ Installation & Setup
Local Installation (during development)
You can link and install the CLI binary locally:
cd cli
npm install
npm linkAfter running npm link, the telebase command will be globally registered on your machine!
Production Installation (after NPM publish)
npm install -g telebase-cli⚡ Command Usage Reference
1. Initialize Connection
Configure your connection URL and project API key:
telebase initThis prompts for config values and saves them securely in a local .env file inside your working directory.
2. Check Connection Status
Verify if the target server is online:
telebase status3. Run SQL Queries
Query tables directly from the command line. Results are printed in a clean console table:
telebase query "SELECT id, name, age FROM users ORDER BY age DESC LIMIT 5"4. Upload Files
Upload documents or media files to the Telegram storage channel:
telebase upload ./my_media_file.zipPrints parameters like filename, size, download URL, and unique Asset UUID.
5. Download Files
Download files back to your local folder by UUID:
telebase download <asset-uuid> [custom-output-filename]🚢 Publishing to NPM
When you are ready to publish telebase-cli for public consumption:
- Log in to your NPM account:
npm login - Publish the package:
npm publish --access public
