Introduce `pkl project init` to create a project aka `PklProject`
- Dominant language
- Java
- Stars
- 11.5k
- Forks
- 402
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 20
Description
Go has something similar with `go mod init`.
Creating a `PklProject` by hand is possible, but I think it would be a nice convenient function to inrtoduce `pkl project init`.
It will create a `PklProject` and `PklProject.deps.json` with some base setup?!
```pkl
amends "pkl:Project"
package {
name = "some.name" // Maybe we can support here pkl project init --name "my.awesome.project"
baseUri = "package://pkg.pkl-lang.org/github.com/[owner/name]/\(name)"
version = "0.1.0"
packageZipUrl = "https://github.com/[repo/name]/releases/download/\(name)@\(version)/\(name)@\(version).zip"
description = "TODO"
authors {
"PlaceHolder "
}
website = "https://github.com/[owner/name]"
sourceCode = "https://github.com/[owner/name]"
license = "TODO"
issueTracker = "https://github.com/[owner/name]/issues"
}
dependencies {
// Add dependencies here
}
```
```pkl
{
"schemaVersion": 1,
"resolvedDependencies": {}
}
```
The placeholders and waht we put in should be discussed of course.
But maybe this gives especially new comes a better onboarding to pkl.
No need to find out that it is possible to create a PklProject and how to set it up etc.
We should also discuss if what cli options we support.
`name` is a good candidate I guess.
`website` etc. might be a bit too mucy?! 🤔 🤷
Contributor guide
Research direction
Start by reviewing the existing `pkl project` CLI entry point and how `PklProject` and `PklProject.deps.json` are currently created or loaded. Clarify the supported options and placeholder values with maintainers; done means `pkl project init` creates the agreed project files with the expected base setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100