@rapsodoo/agrippa
v1.1.4
Published
A command-line interface for interacting with Odoo workflow code stored in the database.
Readme
agRIPpa CLI
A command-line interface for interacting with Odoo workflow code stored in the database.
Overview
agRIPpa is a specialized CLI tool that allows developers to:
- Download workflow code from Odoo
- Edit the code locally with their preferred editor
- Upload changes back to the Odoo database
- Manage backups and restore previous versions
Installation
You can install agRIPpa via NPM:
npm i -g @rapsodoo/agrippaOtherwise, you can build and link the package locally:
# Clone the repository
git clone <repository-url>
cd agrippa
# Install dependencies
npm install
# Build the tool
npm run build
# Link the CLI globally
npm linkAfter linking, the agrippa command will be available in your terminal.
Usage
Initialize Workspace
Set up your workspace with credentials and configuration:
agrippa initYou'll be prompted to enter:
- Keycloak username and password
- Keycloak client ID and secret
- Odoo RIP base URL
- Keycloak URL
Clone a Workflow
Download a workflow from Odoo to work on locally:
agrippa cloneYou'll be prompted to select a workflow from the available options.
Make Changes
Once cloned, the workflow files will be available in your local directory. Edit the Python code with your preferred editor.
Upload Changes
Synchronize your local changes back to Odoo:
agrippa upsyncOr specify a specific workflow:
agrippa upsync -w workflow-slugTo upsync all local workflows:
agrippa upsync -aThe tool will show you the changes that will be applied and ask for confirmation.
Manage Backups
Create a backup:
agrippa backup -w workflow-slug -n "My backup name"Restore a backup:
agrippa backup -w workflow-slug -rYou'll be prompted to select which backup to restore.
Refresh Local Workflows
Update your local copies with the latest code from Odoo:
agrippa refreshOr refresh a specific workflow:
agrippa refresh -o workflow-slugCommands Reference
| Command | Description |
| ----------------- | --------------------------------------- |
| agrippa init | Initialize workspace with credentials |
| agrippa clone | Clone a workflow from Odoo |
| agrippa upsync | Upload local changes to Odoo |
| agrippa backup | Create or restore backups |
| agrippa refresh | Update local copies with remote changes |
Workflow
A typical workflow with agRIPpa looks like:
- Initialize your workspace (
agrippa init) - Clone the workflow you want to work on (
agrippa clone) - Make your code changes locally
- Upload your changes to Odoo (
agrippa upsync)
Before making significant changes, it's recommended to create a backup (agrippa backup).
[!WARNING] To perform operations, you must be in the folder in which you initialized agRIPpa.
Tips
- If a workflow path ends with a trailing slash, the CLI will automatically remove it
- The tool creates backups automatically before certain operations
- Use the
-wor--workflowflag to specify a workflow slug directly
