Skip to content

feat: cli fetch command - #1085

Closed
doc-han wants to merge 1 commit into
mainfrom
cli-fetch-command
Closed

doc-han wants to merge 1 commit into
mainfrom
cli-fetch-command

Conversation

@doc-han

@doc-han doc-han commented Oct 22, 2025

Copy link
Copy Markdown
Collaborator

Short Description

A CLI command for fetching projects state file from lightning into the project directory without expanding it unto the filesystem.

Fixes #1005

Implementation Details

A more detailed breakdown of the changes, including motivations (if not provided in the issue).

QA Notes

List any considerations/cases/advice for testing/QA here.

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

Release branch checklist

Delete this section if this is not a release PR.

If this IS a release branch:

  • Run pnpm changeset version from root to bump versions
  • Run pnpm install
  • Commit the new version numbers
  • Run pnpm changeset tag to generate tags
  • Push tags git push --tags

Tags may need updating if commits come in after the tags are first generated.

@github-project-automation github-project-automation Bot moved this to New Issues in Core Oct 22, 2025
@doc-han

doc-han commented Oct 22, 2025

Copy link
Copy Markdown
Collaborator Author

Planning to make the code for pull(beta) to depend on fetch. since it's like an extension of it

@josephjclark

Copy link
Copy Markdown
Collaborator

Feature request: when fetching, I want to be able to control the serialisation format. fetch --format json should serialize to a v1 compatible JSON state. This is the same behaviour as setting formats: project: json in openfn.yaml, but it allows me to do it on an ad-hoc basis

@josephjclark

Copy link
Copy Markdown
Collaborator

This is great @doc-han thank you

I want to merge the merge PRs and my refactor first, then circle back to this and rebase against them.

Then:

  1. I agree that pull should re-use the fetch logic, so it's literally just a fetch and checkout,
  2. If the remote project is not compatible with the local one, I want to throw an error, and allow --force to override. I like that you've kept -o - if the user passes an output, and nothing exists there, we can safely write the local version and resolve diffs manually. That's neat.

@josephjclark

Copy link
Copy Markdown
Collaborator

Tomorrow I plan to take this on alongside #1143

@josephjclark josephjclark self-assigned this Nov 27, 2025
@josephjclark josephjclark mentioned this pull request Nov 28, 2025
4 of 10 tasks
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

sandbox: create a cli fetch command

2 participants