feat(apps): add CLI command to sync Miaoda dev workspace with sprint/default
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
Problem
For a locally developed Miaoda full-stack app, pushing code to the remote sprint/default branch does not automatically update the Miaoda web development workspace. The web workspace shows that it is behind the remote branch and requires a manual Pull action in the browser.
Today lark-cli apps can initialize Git credentials, push with native Git, pull environment variables, and create releases, but it cannot:
- read the commit SHA currently loaded by the Miaoda development workspace;
- compare that SHA with remote
sprint/default; - trigger the same safe Pull action exposed by the Miaoda web UI;
- wait until the dev preview is actually running the requested SHA.
This makes automated local-development and Playwright workflows ambiguous: git push proves only that the remote branch was updated, not that the dev workspace or preview is running that commit.
Proposed capability
Add read and write shortcuts under lark-cli apps, for example:
lark-cli apps +workspace-status --app-id app_xxx --as user
lark-cli apps +workspace-pull --app-id app_xxx --branch sprint/default --as user
The exact names are flexible.
Expected behavior
Status
Return structured fields such as:
- remote branch and remote commit SHA;
- current dev-workspace commit SHA;
- current dev-preview commit SHA, if different;
behind,ahead,dirty, orconflictedstate;- whether a pull/sync job is currently running.
Pull
- Operate on the Miaoda development workspace only.
- Never create a release, update
main, or change the online environment. - Fast-forward automatically only when the workspace is clean and safe.
- If the workspace has local/cloud-generated changes or conflicts, stop and return a typed error with actionable conflict details instead of overwriting files.
- Return a sync job ID/status and the final workspace/preview SHA.
- Support idempotent polling or a
--waitmode so automation can verify that the target SHA is actually running before Playwright tests begin. - Support
--dry-runwhen an overwrite or conflict-resolution action could be required.
Acceptance example
- Push commit
abc123to remotesprint/default. +workspace-statusreports remoteabc123, workspacedef456, statebehind.+workspace-pull --waitcompletes without publishing.+workspace-statusreports workspace and previewabc123.- Automated Playwright tests can then safely start against the dev preview.
Current version check
Reproduced with lark-cli 1.0.68. The 1.0.70 changelog was checked and does not appear to add this workspace-sync capability.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing lark-cli apps command entry points and review how current Git, environment, and release operations are exposed. Use the Miaoda web Pull behavior as the reference, then verify the acceptance example: status detects the SHA gap, pull safely updates only the development workspace, and --wait confirms the workspace and preview run the requested commit without publishing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, go
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100