@hiveops/cli
v1.4.3
Published
A command-line interface for managing HiveOps projects projects, offering seamless integration with the HiveOps platform.
Readme
@hiveops/cli
A command-line interface for managing HiveOps projects projects, offering seamless integration with the HiveOps platform.
Features
- 🔐 Secure authentication with HiveOps via browser-based flow
- 🚀 Project initialization and setup
- 📝 Model generation and schema management
- 🔄 Migration planning and application
- 🛠 Code generation for multiple programming languages
Installation
npm install --save-dev @hiveops/cliOr install globally:
npm install -g @hiveops/cliUsage
Project Initialization
Initialize a new Vespa project with interactive setup:
hive vespa initor
npx @hiveops/cli@latest vespa initThis command will:
- Guide you through authentication
- Help select your organization
- Choose a secure app
- Select a project and database stack
- Set up project configuration
- Create bootstrap models (optional)
- Initialize package.json with required scripts
- Install necessary dependencies
Project Commands
Once your project is initialized, you can use the following commands:
# Generate TypeScript code from your HSL models
npm run vespa:generate
# Apply schema migrations
npm run vespa:apply
# Generate code and apply migrations in one step
npm run vespa:generate-and-applyEnvironment Configuration
The CLI manages environment configuration through a .env file:
HIVE_STACK_HRN: Your HiveOps stack HRNHIVE_ACCESS_TOKEN: Your authentication token
These values are automatically configured during project initialization.
Command Reference
hive vespa [command] [options]
Commands:
init-v2 Initialize a project using browser-based authentication
plan Plan vespa migration
apply Apply vespa migration
generate-code Generate code from HSL files
generate-and-apply Generate vespa code and apply migration
fetch-token Fetch Vespa token
Options:
-d, --project-directory <projectDirectory> Project directory
-p, --programming-language <language> Programming language (required for code generation)
-h, --help Show help informationDevelopment
To build and run the CLI locally:
# Install dependencies
npm install
# Build the package
npm run build
# Link for local development
npm link
# Run CLI
hive vespa --helpSupported Programming Languages
- TypeScript/JavaScript
License
Apache-2.0
