@arwed/ovh-tools
v0.1.4
Published
Cli tool for more effective development with OVH.
Readme
🛠️ OVH Tools
A powerful CLI tool for streamlined OVH development workflows
⚠️ This project is currently in development and not yet ready for production use.
✨ Features
- 🚀 Simplified OVH API interactions
- 🔧 Developer-friendly command interface
- 📦 TypeScript support with full type safety
- 🎯 Optimized for modern development workflows
- 🔐 Secure credential management with separate storage
- 🌍 Multi-region support (EU/US)
🚀 Installation
npm install -g ovh-tools📖 Usage
Create OVH Application
First, create an OVH application to get your API credentials:
ovh-tools application createThis will:
- Open your browser to the OVH application creation page
- Guide you through creating an application
- Save your application key, secret, and region to
.ovh-tools/application.json
Obtain Consumer Key
After creating an application, obtain a consumer key for API access:
ovh-tools credentials updateThis will:
- Request a consumer key from the OVH API
- Open your browser to validate the credentials
- Save the consumer key to
.ovh-tools/credentials.json
File Structure
.ovh-tools/
├── application.json # Application key, secret, region
└── credentials.json # Consumer key for API access🔌 Programmatic Usage
You can use ovh-tools programmatically in your Node.js applications:
import { CoreService } from "ovh-tools"
const core = new CoreService()
// Get OVH credentials for use in your application
const credentials = await core.environmentService.requireCredentials()
console.log(credentials.applicationKey)
console.log(credentials.applicationSecret)
console.log(credentials.consumerKey)
console.log(credentials.endpoint) // 'ovh-eu' or 'ovh-us'This is useful for:
- Building applications that need OVH API access
- Integrating with existing OVH SDKs
- Creating custom automation scripts
- Testing and development workflows
🔧 Commands
| Command | Description |
| ------------------------------ | ---------------------------- |
| ovh-tools application create | Create a new OVH application |
| ovh-tools credentials update | Obtain/update consumer key |
| ovh-tools environment bash | Output bash export commands |
| ovh-tools environment zsh | Output zsh export commands |
| ovh-tools environment fish | Output fish set commands |
| ovh-tools environment dotenv | Create or update .env file |
| ovh-tools --help | Show help information |
🏗️ Architecture
- Exception Hierarchy: Custom exceptions extending BaseException
- Service Layer: Modular services for different concerns
- Schema Validation: Zod schemas for runtime type safety
- Browser Integration: Automatic URL opening with fallbacks
- Secure Storage: Separate files for different credential types
🛠️ Development
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Format code
npm run format📝 License
MIT © Arwed Mett
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
