-
Notifications
You must be signed in to change notification settings - Fork 83
feat(cli): add --local flag to set local profile as default on init #1395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When running `inkeep init --local`, the CLI now creates a local profile in ~/.inkeep/profiles.yaml and sets it as the active profile. This makes it easier for self-hosted users to get started with the local profile as their default. Changes: - Add LOCAL_REMOTE and DEFAULT_LOCAL_PROFILE constants - Modify localInitCommand() to set up profiles after creating config - Add tests for local profile setup behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: cd0d3b0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @amikofalvy's task —— View job Code Review: feat(cli): add --local flag to set local profile as default on initSummaryThis PR successfully implements the StrengthsArchitecture & Design
Code Quality
User Experience
Areas for Improvement🔧 Minor: Missing changeset (automated comment already flagged this)The PR needs a changeset for version management. Consider adding one for the 🔧 Code Quality: Hard-coded URLs could be more maintainableIn manageUi: 'http://localhost:3001',Recommendation: Consider extracting this to use const localProfile: Profile = {
remote: {
manageApi: manageApiUrl as string,
manageUi: LOCAL_REMOTE.manageUi, // Use constant
runApi: runApiUrl as string,
},
credential: 'none',
environment: 'development',
};🔧 Edge Case: Profile name collisionThe implementation assumes the profile name "local" is available. Consider what happens if a user already has a "local" profile with different settings. Current behavior: Sets existing local profile as active (line 465-466) Recommendation: Consider prompting user about this scenario or using a more descriptive name pattern. 🔧 Documentation: CLI reference needs updatingThe PR doesn't include updates to documentation. The CLI reference in Recommendation: Add documentation for the new flag: **Options:**
- `--local` - Set up local profile for self-hosted deployments
- `--no-interactive` - Skip interactive path selection🔧 Testing: Missing integration test scenarioWhile unit tests are comprehensive, consider adding a test for the integration between config file creation and profile setup: it('should create both config file and profile in one operation', async () => {
// Test that both file creation and profile setup succeed together
});🔧 Type Safety: Runtime URL validationThe Future ConsiderationsExtensibility
Security
Technical Implementation NotesWell-implemented patterns:
Architecture alignment:
RecommendationLGTM with minor improvements. This is a solid implementation that correctly follows existing patterns and provides value to self-hosted users. The suggested improvements are minor and could be addressed in follow-up PRs if needed. The core functionality is sound, well-tested, and maintains backward compatibility while providing the requested feature. Review completed |
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add documentation for the new --local flag that allows users to initialize for local/self-hosted development with the local profile as default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CLI Profile Setup section explaining the --local flag for local/self-hosted development vs cloud default. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add prominent callout at top of quickstart explaining the --local flag for local/self-hosted development. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add step 5 to setup.js that runs `inkeep init --local --no-interactive` to automatically configure the local CLI profile during setup - Remove manual CLI profile setup docs from quickstart (now automatic) - Keep CLI reference docs for users who need to manually configure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
🔎💬 Inkeep AI search and chat service is syncing content for source 'Inkeep Agent Framework Docs' |
Summary
inkeep init --local, the CLI now creates a local profile in~/.inkeep/profiles.yamland sets it as the active profile--localflag, cloud remains the default (unchanged behavior)Changes
LOCAL_REMOTEandDEFAULT_LOCAL_PROFILEconstants inagents-cli/src/utils/profiles/types.tsagents-cli/src/utils/profiles/index.tslocalInitCommand()inagents-cli/src/commands/init.tsto set up profiles after creating configagents-cli/src/__tests__/commands/init.test.tsBehavior
inkeep initinkeep init --localTest plan
pnpm test- all tests passpnpm typecheck- no type errorsinkeep init --localand verify local profile is created in~/.inkeep/profiles.yaml🤖 Generated with Claude Code