Skip to content

Conversation

@archandatta
Copy link
Contributor

@archandatta archandatta commented Dec 8, 2025

This PR adds methods to install dependencies after copying templates into a new directory.

Testing

  • run make build && ./bin/kernel create
  • select name, language, template
  • cd into directory and check if node_modules or .venv exist

Note

Adds language-specific dependency installation to the create flow with tool availability checks, fallback messaging, and comprehensive tests.

  • CLI Create Flow (cmd/create.go):
    • Invoke create.InstallDependencies after copying templates; minor output tweak with pterm.Printfln.
  • Dependency Setup (pkg/create/dependencies.go):
    • Install deps per language via InstallCommands with spinner.
    • Handle missing required tools using RequiredTools and print installation/next steps.
    • Gracefully handle install failures with warnings and manual steps.
  • Types and Config (pkg/create/types.go):
    • Add RequiredTools, InstallCommands, and Tools.CheckToolAvailable.
  • Tests (cmd/create_test.go):
    • Add tests for all templates with/without dependency installation.
    • Cover failure scenarios (install command fails) and missing required tools.
    • Validate created files, environment artifacts (node_modules, .venv), and next-step output.

Written by Cursor Bugbot for commit 66d4e7b. This will update automatically on new commits. Configure here.

@archandatta archandatta marked this pull request as ready for review December 9, 2025 15:43
@archandatta archandatta requested a review from rgarcia December 9, 2025 15:43
Base automatically changed from archand/add-templates to main December 9, 2025 19:50
@archandatta archandatta merged commit 1bc8095 into main Dec 10, 2025
2 checks passed
@archandatta archandatta deleted the archand/install-dependencies branch December 10, 2025 15:26
# Deploy your app:
brew install onkernel/tap/kernel
kernel login # or: export KERNEL_API_KEY=<YOUR_API_KEY>
kernel deploy index.py
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Python deploy instruction references wrong entry file

The getNextStepsWithToolInstall function for Python tells users to run kernel deploy index.py, but Python templates use main.py as the entry point (as confirmed by both the test assertions and the actual template files in pkg/templates/python/). Users following these instructions will attempt to deploy a non-existent file.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants