UNPKG

sesterce-cli

Version:

A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal.

303 lines (204 loc) 6.17 kB
# Sesterce CLI A powerful command-line interface tool for managing Sesterce Cloud services. Sesterce CLI provides easy access to GPU cloud instances, AI inference services, container registries, and SSH key management directly from your terminal. ## 🚀 Features - **GPU Cloud Management**: Launch, manage, and monitor GPU instances - **AI Inference Services**: Deploy and manage AI inference instances - **Container Registry**: Create and manage Docker registries - **SSH Key Management**: Manage SSH keys for secure access - **Volume Management**: Create and manage persistent storage volumes - **Interactive CLI**: User-friendly command-line interface with helpful prompts ## 📦 Installation ### Option 1: Debian Package (Recommended for Debian/Ubuntu) Download and install the Debian package from [GitHub Releases](https://github.com/sesterce-app/sesterce-cli/releases): ```bash # Download the latest version wget https://github.com/sesterce-app/sesterce-cli/releases/download/v1.0.1/sesterce-cli_1.0.1_all.deb # Install the package sudo dpkg -i sesterce-cli_1.0.1_all.deb # Install dependencies if needed sudo apt-get install -f ``` For detailed installation instructions, see [DEBIAN_INSTALL.md](DEBIAN_INSTALL.md). ### Option 2: npm (Cross-platform) Install Sesterce CLI globally using npm: ```bash npm install -g sesterce-cli ``` ### Prerequisites - Node.js 18 or higher - npm or yarn package manager - Sesterce Cloud account ## ⚙️ Configuration Before using Sesterce CLI, you need to configure your API credentials: 1. **Create credentials directory**: ```bash mkdir -p ~/.sesterce ``` 2. **Create credentials file**: ```bash touch ~/.sesterce/credentials ``` 3. **Add your API key** to `~/.sesterce/credentials`: ```ini [default] sesterce_api_key=your_api_key_here ``` You can also create multiple profiles: ```ini [default] sesterce_api_key=your_default_api_key [production] sesterce_api_key=your_production_api_key ``` ## 🎯 Quick Start 1. **Verify installation**: ```bash sesterce --help ``` 2. **List available GPU cloud offers**: ```bash sesterce gpu-cloud instance offers ``` 3. **Launch your first GPU instance**: ```bash sesterce gpu-cloud instance launch ``` ## 📚 Command Reference ### SSH Key Management Manage SSH keys for secure access to your instances: ```bash # List all SSH keys sesterce ssh-key list # Create a new SSH key sesterce ssh-key create # Set a key as default sesterce ssh-key make-default # Delete an SSH key sesterce ssh-key delete ``` ### Container Registry Manage Docker container registries: ```bash # List all registries sesterce registry list # Create a new registry sesterce registry create # Update registry settings sesterce registry update # Delete a registry sesterce registry delete ``` ### GPU Cloud Instances Manage GPU cloud computing instances: ```bash # List available instance offers sesterce gpu-cloud instance offers # Launch a new GPU instance sesterce gpu-cloud instance launch # List running instances sesterce gpu-cloud instance list # Get instance details sesterce gpu-cloud instance details # Delete an instance sesterce gpu-cloud instance delete ``` ### GPU Cloud Volumes Manage persistent storage volumes: ```bash # List available volume offers sesterce gpu-cloud volume offers # Create a new volume sesterce gpu-cloud volume create # List all volumes sesterce gpu-cloud volume list # Delete a volume sesterce gpu-cloud volume delete ``` ### AI Inference Services Manage AI inference instances and models: ```bash # List available AI models sesterce ai-inference models # List available hardware configurations sesterce ai-inference hardwares # List available regions sesterce ai-inference regions # Launch an AI inference instance sesterce ai-inference instance launch # List AI inference instances sesterce ai-inference instance list # Get instance details sesterce ai-inference instance details # Start an instance sesterce ai-inference instance start # Stop an instance sesterce ai-inference instance stop # Update instance configuration sesterce ai-inference instance update # Delete an instance sesterce ai-inference instance delete ``` ## 🔧 Global Options - `-h, --help`: Display help information - `-V, --version`: Display version information - `-l, --ls`: List available items (context-dependent) ## 📁 Configuration Files The CLI uses the following configuration structure: ``` ~/.sesterce/ └── credentials # API credentials file ``` ### Credentials File Format The credentials file uses INI format: ```ini [profile_name] sesterce_api_key=your_api_key_here ``` ## 🛠️ Development ### Building from Source 1. **Clone the repository**: ```bash git clone <repository-url> cd sesterce-cli ``` 2. **Install dependencies**: ```bash npm install ``` 3. **Build the project**: ```bash npm run build ``` 4. **Link locally**: ```bash npm link ``` ### Project Structure ``` src/ ├── cli/ # CLI application code ├── app.ts # Main CLI entry point └── commands/ # Command implementations ├── modules/ # Business logic modules ├── ai-inference/ # AI inference services ├── gpu-cloud/ # GPU cloud services ├── registries/ # Container registry services └── ssh-keys/ # SSH key management ├── core/ # Core utilities and domain logic └── providers/ # External service providers ``` ## 🤝 Contributing 1. Fork the repository 2. Create a feature branch 3. Make your changes 4. Add tests if applicable 5. Submit a pull request ## 📄 License This project is licensed under the MIT License. ## 🆘 Support For support and questions: - Check the command help: `sesterce --help` - Review the configuration setup - Ensure your API key is valid and has proper permissions ## 🔄 Version History - **1.0.0**: Initial release with GPU cloud, AI inference, registry, and SSH key management