struere pull
Pull remote resources to local files
The pull command downloads the current remote state from Convex and writes it to local files, creating or updating resource definitions in your project directories.
Usage
npx struere pull
What It Does
The pull command:
- Fetches the current state of all resources from your Convex backend
- Generates local definition files for each resource
- Writes the files to the appropriate directories (
agents/,entity-types/,roles/,triggers/)
When to Use Pull
The pull command is useful when:
-
Resources were created via the dashboard — If you or a team member created agents, entity types, roles, or triggers through the web dashboard,
pullbrings those definitions into your local project so they can be managed as code. -
Onboarding to an existing project — When joining a team that already has resources configured in Convex,
pullgives you the local files to start working with. -
Recovering local files — If local files were accidentally deleted or corrupted,
pullrestores them from the remote state. -
Switching machines — When setting up a new development environment,
pullpopulates your project with the current remote definitions.
Example Workflow
A common scenario is creating resources in the dashboard and then pulling them locally for version control:
npx struere pull
git add agents/ entity-types/ roles/ triggers/
git commit -m "Pull remote resources to local definitions"
After pulling, you can modify the local files and use struere dev to sync changes back.
Relationship with Dev and Status
| Command | Direction | Purpose |
|---|---|---|
struere pull |
Remote to local | Download remote state as local files |
struere dev |
Local to remote | Sync local files to remote |
struere status |
Comparison | Show differences without changing anything |
A typical workflow might be:
struere pull— Get the latest remote state- Edit local files — Make your changes
struere status— Review what will changestruere dev— Sync changes to the development environment