appmixer
v2.3.4
Published
Use the Appmixer CLI tool to interact with the Appmixer engine remotely from the command line. It can be used to list flows, start/stop flows but more importantly, to *develop and publish custom components*.
Keywords
Readme
Appmixer CLI
Use the Appmixer CLI tool to interact with the Appmixer engine remotely from the command line. It can be used to list flows, start/stop flows but more importantly, to develop and publish custom components.
Visit https://docs.appmixer.com/appmixer-cli/appmixer-cli for more information.
Usage
$ appmixer --help
Usage: appmixer [options] [command]
Appmixer command line interface.
Options:
-v, --version output the version number
-h, --help output usage information
Commands:
alias|a Use alias.
component|c Component commands.
download|d Download component.
flow|f Flow commands.
init|i Initialize component.
ai AI tools. Genererate components or connectors using AI.
login|l Login into Appmixer API.
logout|o Logout from Appmixer API.
modifiers|m Modifiers command.
pack|p Pack component into archive.
publish|pu Publish component.
remove|rm Remove component.
test|t Test component, authentication module, ...
transfer|tr Transfer data between Appmixer instances.
url|u <url> Set Appmixer API url.
help [cmd] display help for [cmd]
Go to https://docs.appmixer.com/appmixer/ to find more information.Alias Storage
On macOS and Linux, Appmixer CLI stores API URL aliases in ~/.config/configstore/appmixer.json using the configstore package. The alias data is under the appmixer-url key, for example:
{
"appmixer-url": {
"default": { "url": "https://api.appmixer.com", "alias": "default" },
"dev": { "url": "http://localhost:2200", "alias": "dev" }
}
}You can view the file with:
cat ~/.config/configstore/appmixer.jsonOr pretty-print with jq:
jq . ~/.config/configstore/appmixer.jsonAppmixer AI Connector & Component Generator
An AI-powered CLI tool that automatically generates complete Appmixer connectors and components. This tool leverages AI to analyze API documentation and create production-ready connector code with proper authentication, components, and test plans.
Important: This is an experimental tool and may contain bugs or produce incomplete results.
Table of Contents
Quick Start
# 1. Clone and setup
git clone https://github.com/appmixer-ai/appmixer-connectors.git
cd appmixer-connectors
npm install appmixer
# 2. Configure environment (create .env in appmixer-connectors root)
copy .env.example .env # Windows
# Edit .env and add your API keys (OpenAI, Anthropic, etc.)
# 3. Generate a connector
appmixer ai connector stripe --context ./stripe-context.md --icon ./stripe.svg
# 4. Generate a component
appmixer ai component stripe CreateCharge
Installation
Prerequisites
- Node.js v16 or higher
- API keys for AI services (OpenAI, Anthropic, etc.)
Setup Steps
- Clone the connectors repository:
git clone https://github.com/appmixer-ai/appmixer-connectors.git
cd appmixer-connectors- Install the Appmixer CLI:
npm install appmixer- Create
.envfile in the appmixer-connectors root:
copy .env.example .env # Windows
# cp .env.example .env # macOS/LinuxEdit .env and add your API keys:
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_hereCommands
Generate Connector
Creates a complete connector with authentication, components, and test plans.
appmixer ai connector <connector-name> [options]Options:
-i, --icon <file>- Required for the first run. Path to icon file (embedded in service.json as data URI).-c, --context <file>- Optional. Path to Markdown/text API docs-m, --module <name>- Module name (default: "core")-e, --vendor <name>- Vendor namespace (default: "appmixer")
Context Resolution (if --context not provided):
- Uses OpenAPI spec at
src/appmixer/<connector>/artifacts/openapi.json(if exists) - Attempts automatic discovery via web search
Context file example Context file includes basic information about the API and expected components to be generated.
sample context file for Harvest API:
# Harvest Connector for Appmixer
## Overview
Harvest connector provides integration with Harvest's API v2 for time tracking, project management, invoicing, and expense management. Harvest is a time tracking and invoicing software used by businesses and freelancers.
## Authentication
- **Type**: OAuth 2.0
- **Authorization URL**: `https://id.getharvest.com/oauth2/authorize`
- **Token URL**: `https://id.getharvest.com/api/v2/oauth2/token`
- **Required Headers**:
- `Authorization: Bearer ACCESS_TOKEN`
- `Harvest-Account-ID: ACCOUNT_ID`
- `User-Agent: APPLICATION_NAME ([email protected])`
- **Setup**: [Harvest Developers Portal](https://id.getharvest.com/developers)
## Components
### Client Management
- **ListClients** - Retrieve all clients with active/inactive filtering
- **GetClient** - Retrieve specific client by ID
- **CreateClient** - Create new client
- **UpdateClient** - Update client details
- **DeleteClient** - Archive client (soft delete)
- **ListContacts** - List client contacts
- **CreateContact** - Create client contact
- **UpdateContact** - Update contact information
- **DeleteContact** - Remove client contact
Examples:
# With context file
appmixer ai connector stripe \
--context "./stripe-api-docs.md" \
--icon "./stripe.svg"
# Without context (uses OpenAPI or auto-discovery)
appmixer ai connector stripe --icon "./stripe.svg"What Gets Generated:
auth.js- Authentication module.service.json- Service metadata, base URLs, iconbundle.json- Component registrationcomponents/- One directory per component withcomponent.jsonand<Name>.js<connector>/artifacts/ai-artifacts- generator artifacts and logs. This folder contains intermediate files used by the AI generator for reproducibility and debugging. Context file (if provided) and icon file is copied here.
How It Works
Generation Workflow
- ✅ Detect or generate auth.js
- ✅ Detect or generate components
- ✅ Apply Appmixer standards (refactor) - Applied for all components. Static analysis of the generated code. Apply fixes to follow Appmixer conventions.
- ✅ Validate authentication - Test the authentication using the appmixer cli command
appmixer test auth login <path to auth.js>. If it fails, prompt user to fix or continue. Authentication is required for further steps. - ✅ Detect or create test plan - Test plan is logical sequence for component tests. For example "Create" component must be tested before "Get" or "Update".
- ✅ Generate tests and test components - For each component in the test plan, generate test cases and run tests (using the
appmixer test componentcommand). Connector is marker as complete when at least one test case per component passes. There is also a limit of 5 attempts to fix failed tests. After 5 attempts, the process stops and component is marked as failed. - ✅ Report results - Summary of test results -
test-plan-report.mdis generated in the connector artifacts folder.
Important Note: You can interrupt the process at any time (Ctrl+C). The generated code up to that point will be saved, along with logs and artifacts for debugging. When you re-run the command, it will resume from the last successful step. This allows you to fix any issues (e.g., authentication) and continue without starting over.
Generate Component
Creates individual components for an existing connector.
appmixer ai component <connector> <component>Arguments:
<connector>- Required. Connector name<component>- Required. Component name
Options:
-m, --module <name>- Module name (default: "core")-e, --vendor <name>- Vendor namespace (default: "appmixer")
Examples:
# Single component
appmixer ai component stripe CreateChargeNote: Component commands must be run from the appmixer-connectors root directory.
Artifacts System
AI generates intermediate artifact files (JSON) stored in <connector>/artifacts/ai-artifacts/:
<component>/componentRecipe.json- Component metadata, schemas, sample data (generated whenappmixer ai componentis run)SERVICE_INFO_ACTIONS_AND_TRIGGERS- Connector metadata, schemas, sample data for all components (generated whenappmixer ai connectoris run)context.md- Copy of your context file for reproducibilitycommands-log- Text file containing all CLI commands run during generationtestplan.json- Component test cases and progressprogress.json- JSON file tracking progress of the refactoring steps (Apply Appmixer standards step).
Force regeneration:
rm -rf ai-artifacts/<connector> # Delete artifacts
appmixer ai connector <connector> --context ./context.md --icon ./icon.svgFlow Transfer Command
The appmixer transfer flow command allows you to transfer a flow (draft) from one Appmixer instance to another, including updating the associated template and all existing integration instances. This is useful for syncing integrations across development, staging, and production environments.
The transfer process works in three sequential steps: first, it syncs the draft (blueprint) from the source to the target instance; second, it updates the associated template if one exists on the target; and third, it optionally refreshes all integration instances based on the updated template. You can control which steps to execute using flags like --update-instances to include instance updates, or skip certain steps entirely.
Configuration can be managed interactively using appmixer transfer config -i to save source and target URLs with authentication tokens for future transfers. Alternatively, you can provide credentials via command-line flags or environment variables.
Artifact import/export — the transfer command can now save and import flow artifacts. Use --artifact-path <path> during export to save draft/template/details to disk. To import flows from saved artifacts (instead of connecting to a source instance) use --from-artifacts <path> — flows are discovered by scanning subdirectories under the artifact path (valid flow directories contain details.json). When using --from-artifacts you do not need --source-url or --source-token and some flags are incompatible with artifact import (see README_TRANSFER.md for full guidance and examples).
The command supports batch transfers via --flow-list-file (up to 100 flows), and includes safety features like --dry-run mode to preview changes before applying them.
The command also supports multi-target transfers (push to multiple target environments) using --target-list-file <path>, where <path> points to a JSON file with an array of target objects (each with url and token); see README_TRANSFER.md for examples and limits (maximum 10 targets).
