YepCode Command Line Interface Rules
Comprehensive guidelines for AI agents to use YepCode CLI for local development, testing, and synchronization with YepCode Cloud.
What is YepCode CLI?
Section titled “What is YepCode CLI?”The YepCode CLI facilitates interaction with YepCode Cloud directly from your local workstation’s command line. It’s particularly useful for developing and testing processes locally.
Command Flow
Section titled “Command Flow”Always follow this sequence:
- Make changes to local files (processes, modules, variables, etc.)
- Run
yepcode addto add new local resources to the context of YepCode CLI (prepare resources for execution or deployment) - Run
yepcode runto test (execute the process locally for development/testing purposes) - Run
yepcode pushto deploy to cloud (when ready for production synchronization)
Core CLI Commands
Section titled “Core CLI Commands”yepcode add
Section titled “yepcode add”Purpose: Add new local resources (processes, modules, variables, etc.) to the context of YepCode CLI to prepare them for execution or deployment. It may be the solution if you get the error “Local process not found.”
Usage:
yepcode addWhen to use:
- Before running
yepcode runto test - Before running
yepcode pushto deploy
What it does:
- Updates the local workspace state
- Makes processes ready for execution or deployment
Important: This command is required before yepcode run or yepcode push
yepcode run <process-slug> --parameters <filepath | stringified-json>
Section titled “yepcode run <process-slug> --parameters <filepath | stringified-json>”Purpose: Execute a process locally for development/testing
Usage:
# Using a parameters fileyepcode run <process-slug> --parameters <filepath>
# Using stringified JSONyepcode run <process-slug> --parameters '{"key": "value"}'
# Using default parameters.json from process folderyepcode run <process-slug>When to use:
- To test process execution locally
- To debug issues with detailed logs
- During iterative development to validate changes
What it does:
- Executes the process code locally
- Uses environment variables from
variables.envandvariables.local.env - Uses provided parameters or default
parameters.json - Shows execution logs
- Shows execution results and errors (if any)
Prerequisites:
- Must run
yepcode addfirst if the process was just created
yepcode push
Section titled “yepcode push”Purpose: Deploy local changes to YepCode cloud
Usage:
yepcode pushWhen to use:
- When the process is ready for production
- After testing locally with
yepcode run - To make changes available in the cloud
What it does:
- Uploads local files to YepCode cloud
- Updates cloud resources with local changes
- Makes the process available for cloud execution
Prerequisites:
- Must run
yepcode addfirst to prepare changes - Recommended to run
yepcode runfirst to test
Complete Workflow Examples
Section titled “Complete Workflow Examples”Example 1: Development Cycle
Section titled “Example 1: Development Cycle”Agent: “I’ve implemented the script. Would you like to test it locally?”
User: “Yes”
Agent: “I’ll sync and run it for you.”
[Agent runs yepcode add] [Agent runs yepcode run]
Agent: “The logs look good! Would you like to push to production?”
User: “Yes”
Agent: “Deploying to production now.”
[Agent runs yepcode push (no need to run yepcode add again since nothing changed)]
Example 2: Testing a New Process
Section titled “Example 2: Testing a New Process”User: “I need to test the new shopify-order-sync process locally with some parameters”
AI: “I’ll add the process first and then run it for you.”
yepcode addyepcode run shopify-order-sync --parameters '{"dateFrom": "2024-01-01", "dateTo": "2024-01-31"}'Example 3: Deploying to Production
Section titled “Example 3: Deploying to Production”User: “The inventory-sync process is ready for production. Please deploy it to the cloud.”
AI: “I’ll sync the process and push it to production.”
yepcode addyepcode pushCritical Rules
Section titled “Critical Rules”- NEVER run
yepcode runwithout runningyepcode addfirst - NEVER run
yepcode pushwithout runningyepcode addfirst