-
-
Notifications
You must be signed in to change notification settings - Fork 18
feat: Add craft init, validate commands and improve onboarding #732
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
Draft
BYK
wants to merge
2
commits into
master
Choose a base branch
from
feat/improve-onboarding
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Add new commands and features to improve the onboarding experience: - craft init: Auto-detect project type and generate configuration - Detects npm, pypi, crates, docker, gem, pub-dev targets - Generates .craft.yml with smart defaults - Creates GitHub Actions workflows (release, publish, changelog-preview) - craft validate: Validate configuration and workflows - Checks YAML syntax and schema - Validates target names and regex patterns - Warns about deprecated fields and missing best practices - Smart defaults for minVersion >= 2.20.0 - changelog.policy defaults to 'auto' - versioning.policy defaults to 'auto' (>= 2.14.0) - First release improvements - Defaults to version 0.1.0 when no tags exist - Creates CHANGELOG.md automatically with auto policy - Documentation updates for all new features
Contributor
|
BYK
commented
Jan 23, 2026
docs/src/content/docs/index.mdx
Outdated
| craft init | ||
|
|
||
| # Auto-determine version from conventional commits | ||
| craft prepare auto |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
| craft prepare auto | |
| craft prepare |
BYK
commented
Jan 23, 2026
src/commands/prepare.ts
Outdated
|
|
||
| const latestTag = await getLatestTag(git); | ||
|
|
||
| // Handle first release (no existing tags) |
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this logic be merged with the part that says // Calculate new version from latest tag below?
- Fix docs: Change 'craft prepare auto' to 'craft prepare' in quick example - Merge first release logic with version calculation: - Use default bump type (minor) instead of hardcoded version - Allow explicit bump types to work for first release (e.g., major -> 1.0.0) - More consistent code flow
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.
Summary
Improves the Craft onboarding experience by reducing the trial-and-error typically required to set up Craft for a new project.
New Commands
craft init: Auto-detects project type and generates configuration.craft.ymlwith smart defaults (minVersion: 2.20.0).python-versionorpyproject.toml)craft validate: Validates configuration and workflowsincludeNames/excludeNamesSmart Defaults
When
minVersion >= 2.20.0:changelog.policydefaults toauto(wasnone)versioning.policydefaults toautowhen>= 2.14.0(wasmanual)First Release Improvements
0.1.0when no git tags existCHANGELOG.mdwhen using auto changelog policyDocumentation
craft initquick start