Skip to content

docs: flesh out mops init and fix user set properties#499

Merged
Kamirus merged 11 commits into
mainfrom
kamil/docs-mops-init
Apr 20, 2026
Merged

docs: flesh out mops init and fix user set properties#499
Kamirus merged 11 commits into
mainfrom
kamil/docs-mops-init

Conversation

@Kamirus
Copy link
Copy Markdown
Collaborator

@Kamirus Kamirus commented Apr 17, 2026

Rewrites the thin mops init docs to cover the interactive prompts, what files get created (including the base-vs-core matrix keyed on dfx version), the vessel.dhall migration, and the --yes behavior.

Also adds the missing site / email properties to the mops user set docs — the CLI already accepted them; only the docs were wrong.

No code changes.

mops init had a two-line description that didn't cover the interactive
prompts, what files get created, the --yes behavior, or the vessel.dhall
migration, forcing users to read the source. Rewrite to document the
prompt flow, the files written, and the project/package split.

mops user set listed only name/github/twitter, but the CLI also accepts
site and email. Add the missing properties.

Also clean up a couple of style nits in user set (Example → Examples,
drop non-idiomatic phrasing) for consistency with peer docs.

Made-with: Cursor
@Kamirus Kamirus requested a review from a team as a code owner April 17, 2026 13:04
When there is no dfx.json, mops init was silently consulting the
installed dfx's --version to pick a default package set, which could
pin an old `base` on a fresh standalone Motoko project.

Treat the absence of dfx.json as the signal for "standalone Motoko
project" and skip the dfx sniff: ask the backend for defaults with an
empty version (falls through to latest core) and pin the latest moc in
[toolchain] so the project is ready to compile on its own.

With dfx.json present the behavior is unchanged — the backend still
returns base for old dfx versions and core for newer ones.

Made-with: Cursor
@Kamirus Kamirus changed the title docs: flesh out mops init and fix user set properties feat: mops init uses core + latest moc for standalone projects Apr 17, 2026
Kamirus added 8 commits April 17, 2026 15:38
Narrating-code comment replaced with a two-line intent comment; the
condition duplication is hoisted into a `standalone` local.

The mops-cli skill's "New project" section now reflects the new init
behavior — `mops toolchain use moc latest` and `mops add core` are
redundant when there is no dfx.json.

Made-with: Cursor
dfx.json presence is the legacy signal for 'something else will provide
moc'. Whether the user is building a library or a project deployed via
dfx / icp-cli / raw wasm is independent — pin moc whenever dfx is not in
the picture, for both project and package.

Made-with: Cursor
toolchain.use validates installed dep manifests via checkRequirements,
so it crashes if run before installAll downloads the deps.

Caught by smoke-testing `mops init -y` in an empty dir.

Made-with: Cursor
The dep-selection behavior didn't actually change — the backend already
returns `core` for modern dfx, empty version, or unknown versions via
its fallthrough case. The only real change in this PR is pinning latest
`moc` when no `dfx.json` is present.

Made-with: Cursor
Existing init behavior already returns latest `core` for modern dfx,
missing dfx, and unknown versions via the backend's fallthrough case.
No CLI change is warranted — just documentation.

Made-with: Cursor
@Kamirus Kamirus changed the title feat: mops init uses core + latest moc for standalone projects docs: flesh out mops init and fix user set properties Apr 17, 2026
- restore ## Examples as h2 on mops user set
- split the dfx version matrix description into two sentences and
  name the 0.9.0-0.27.0 range explicitly instead of 'modern dfx'
- call out that vessel dev-dependencies are not migrated
- add trailing newline

Made-with: Cursor
@Kamirus Kamirus merged commit 27214dd into main Apr 20, 2026
25 checks passed
@Kamirus Kamirus deleted the kamil/docs-mops-init branch April 20, 2026 08:02
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.

2 participants