officeless-cli
v2.0.0
Published
CLI toolkit for Mekari Officeless platform management and dependency mapping.
Downloads
757
Maintainers
Readme
Officeless CLI Toolkit 🚀
A high-performance CLI toolkit designed for Mekari Officeless developers to perform 360° impact analysis and dependency mapping. This tool allows you to visualize how a single change to a table, workflow, or form ripples across your entire low-code architecture.
Prerequisites
- Node.js: v18.0.0 or higher.
Installation
Install the package via NPM:
npm install officeless-cliInitialization & Configuration
Initialize your working directory. This will copy a .env template to your project root:
npx officeless initOpen the newly created .env file and fill in your credentials:
PROJECT_ID=your_project_id_here
COMPANY_ID=your_project_company_id
OFFICELESS_JWT=your_full_bearer_token_hereCLI Command Reference
1. Project Info
Fetch real-time metadata directly from the Mekari API to verify your connection.
npx officeless info2. Data Ingestion & Manifest Generation
Download raw JSON definitions for all Tables, Workflows, and Forms in your project. This command automatically parses the raw data and builds the bidirectional YAML manifests required for tracing.
npx officeless fetch3. Generate Global Index
Create a unified index.json file in your root directory. This acts as a flattened, global address book for quickly looking up component IDs, names, and subtypes across your entire project without digging through raw files.
npx officeless index4. Dependency Trace
Execute a recursive trace on a specific component to analyze its upstream or downstream impact.
# Trace a Workflow
npx officeless trace workflow [workflow_id]
# Trace a Table (Pivots to Upstream Impact)
npx officeless trace table [table_id]
# Trace a Page or UI Form
npx officeless trace page [page_id]The Impact Explorer (Visualizer)
Every time you execute a trace command, the tool automatically updates the dependency-visualizer.html file in your root directory.
How to View:
- Since the visualizer fetches local YAML files, you must use a local web server (e.g., Live Server in VS Code or
npx serve .). - Open
dependency-visualizer.html. - Searchable Trace Selector: Use the horizontal top-bar to search for and select your trace files.
- Highlight Search: Type in the search box to highlight specific nodes or IDs across the tree.
- Depth Controls: Use the "Lv 1", "Lv 2" buttons to expand the entire tree to a specific depth instantly.
- Localized Toggles: Click the
▼/▶icons to expand or collapse specific branches.
Understanding the Trace Logic
The Explorer uses a sophisticated hybrid mapping logic to provide maximum context:
- Standard Entities (Workflows, Forms, Pages): Follows a Downstream Path (What does this component use?). It identifies nested action blocks,
_hitFunctioncalls, and table references. - Table Entities: When the crawler hits a Table, it performs an Upstream Pivot. It identifies every Workflow or Form that is "Used By" that table, allowing you to see the true impact of a schema change.
- Circular Protection: If the engine detects a circular reference (e.g., Workflow A calling Workflow B which calls Workflow A), it marks the node as
(CIRCULAR REF)and stops that branch to prevent infinite loops.
