Repository navigation
feat(cli): seed a default local context in dirctl init - #1764
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends dirctl init to seed a default local client context (pointing at localhost:8888) so a fresh install can talk to a local Directory node without manual config.yaml edits, aligning with the onboarding goals in #1762.
Changes:
- Add
client/config.SaveContextto write a named context (optionally settingcurrent_context) while keeping existing known config sections. - Add an
initwizard step (runContextSetup) that seeds a defaultlocalcontext when no contexts are configured (opt-out on TTY; skipped non-interactively unless--yes). - Update/init tests to cover context seeding behavior and config preservation.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| client/config/config.go | Adds SaveContext writer to persist a context and optionally set it current. |
| client/config/config_test.go | Adds unit tests for SaveContext seeding and preservation behavior. |
| cli/cmd/init/run.go | Reorders init flow to include a new Step 1 (context setup) before extractor provisioning (Step 2). |
| cli/cmd/init/context.go | Implements the context-setup wizard step and default local context definition. |
| cli/cmd/init/context_test.go | Adds tests for context setup (seed, skip when configured, skip non-interactively without --yes). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ramizpolic
approved these changes
Jul 8, 2026
Signed-off-by: András Jáky <[email protected]>
…tions Signed-off-by: András Jáky <[email protected]>
akijakya
force-pushed
the
feat/init-dirctl-context-config
branch
from
July 9, 2026 08:37
ede14a5 to
f2d941f
Compare
akijakya
enabled auto-merge (squash)
July 9, 2026 08:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current wizard texts:
Closes #1762