just_core_cli 0.1.0
just_core_cli: ^0.1.0 copied to clipboard
The core of `just` (also `ju`), the Just ecosystem's command-line tool: projects, plugins and hooks, version sets, safe pubspec edits, transactions and downloads.
0.1.0 #
The first release of the core of just (and ju, the same tool for machines where just is another program), the Just ecosystem's command-line tool, for Windows, macOS and Linux. It knows no product of its own; the Just Game Engine's commands come from the just_game_engine_cli plugin.
- Projects:
createmakes a project of a kind (--kind game, the default):flutter create,just.json, just_core_cli and the kind's plugin as one-line dev dependencies on pub.dev versions (--localwrites them all the same, and addspubspec_overrides.yamlentries pointing every just_* package in that folder at its checkout), then the plugin'screatehook fills it in. On a failure the folder is deleted whencreatemade it, or emptied when it was there already, empty.doctorchecks the tool on the PATH, Flutter, the tools' versions,just.json, links and git ignores, then runs each plugin'sdoctorhook;checkruns theircheckhooks, and fails when nothing was checked;dev link|unlinkpoints a project at local checkouts, with each plugin'slinkhook after a link and before and after an unlink. - Upgrades:
upgrademoves the tools to this release's tool set (2026.10), each plugin's packages through itsupgradehook, withpub get, in one transaction — asking eachmigratehook with--checkbefore anything changes and again with the new packages before it commits — then runs the migrations (anything after--goes to them). Up to date when nothing would move. - Plugins: packages add commands through
just_plugin.json, from the project or installed globally, and hook intocreate,check,doctor,upgrade,migrateandlink. The ecosystem's own run without asking when they come from a local checkout or github.com/just-unknown-dev, and from pub.dev only under the names the ecosystem publishes there (PluginTrust.onPubDev: just_game_engine_cli, published right after this release); any other asks once, the answer kept in the project'sjust.jsonor the user'splugins.json(which covers every project), and--yesnever allows one. A hook that can't--checkexits 2 or 64 and is warned about. With--json, a hook's own document is part of the result;upgradehooks always get--json. Options reach hooks before any--, values as--name=value.just help <a plugin's command>is the plugin's own help. - Pinning: a global
justhands a run to the version the project pins in its dev dependencies. - Scripts: every command takes
--json,--yes,--verboseand--project(before any--). Exit codes: 0 done; 1 failed — a change is rolled back first, and a rollback that fails itself is named and finished by the next change; a failed migration afterupgrade, or a failedlinkhook afterdev link|unlink, exits 1 with the change kept; 2 called wrongly. A plugin's command, or a run handed to the pinnedjust, exits with that process's code (128 + the signal for one a signal ended). - Every platform: the toolkit in
package:just_core_cli/just_core_cli.dart— JSON, versions, SHA-256, ZIP read and write in memory, pubspec edits, templates, version sets,just.json, plugin manifests — runs on the web too, as JavaScript and as WebAssembly; there the library holds only the toolkit, and the command framework is exported everywhere else.project.dartandfetch.dartneeddart:io. - The toolkit plugins build on: the command framework,
runTrustedPlugin,FindingandPluginManifest;just.json, which keeps every key it doesn't know as it was;PackageSetand theToolSet; template filling (TemplateRenderer,ProjectNames,GitIgnores); pubspec edits that keep every other byte, inside the block each tool names (PubspecEditor,ManagedBlock,PubspecConstraints); all-or-nothing project changes that keep permissions and symbolic links (and never write through one that leads out of the project), with a lock (taken over at once from a crashed process on the same machine and system) and crash recovery, whose trash is.just_trash/<tool>/unless the tool names its own; pub and the Flutter SDK (FLUTTER_ROOTfirst, then the project's last, thenflutteron the PATH, a snap's included); HTTPS-only downloads (redirects included) pinned by size and SHA-256; ZIP reading that refuses unsafe archives, and reproducible ZIP writing.