Skip to content

docs: make dart run magic:artisan the canonical CLI invocation#92

Merged
anilcancakir merged 4 commits into
masterfrom
docs/cli-invocation-magic-artisan
Jun 19, 2026
Merged

docs: make dart run magic:artisan the canonical CLI invocation#92
anilcancakir merged 4 commits into
masterfrom
docs/cli-invocation-magic-artisan

Conversation

@anilcancakir

Copy link
Copy Markdown
Contributor

Summary

Aligns all documentation with the framework's intended CLI convention: dart run magic:artisan <command>.

Magic declares an artisan executable in its pubspec.yaml (executables: { artisan: }, backed by bin/artisan.dart, which boots runArtisan with MagicArtisanProvider). So once a user adds magic as a dependency, the full CLI is available via dart run magic:artisan <cmd> with no global activation and no app-specific <app> package-name placeholder. The source already used this form; the docs lagged behind (dart run <app>:artisan and stray dart run magic:magic).

Changes

  • Uniform invocation swap across doc/**, README.md, skills/magic-framework/**, CLAUDE.md, and a lib/ dartdoc: dart run <app>:artisan / dart run magic:magic / dart run :artisan -> dart run magic:artisan.
  • Prose rewritten where it explained the old model: the <app> placeholder ("replace with your package name"), the "host app's own artisan dispatcher" framing, and the stale dart pub global activate magic_cli tip now describe the bundled artisan executable.
  • README Quick Start simplified: dropped the obsolete "Step 3: create bin/artisan.dart" (magic ships it) and renumbered; bootstrap is now just dart run magic:artisan magic:install.
  • Fixes: a wrong command name in CLAUDE.local.md (magic:make:controller -> make:controller, local-only file) and the MagicInstallCommand dartdoc examples (dart run :artisan -> dart run magic:artisan).

Verification (local)

  • 0 residual dart run <app>:artisan, magic:magic, dart run :artisan, magic:make:, or <app> placeholders across docs/skill/README/CLAUDE/lib.
  • lychee offline (--root-dir doc --fallback-extensions md): 476 OK, 0 errors.
  • TOC/anchor check: 0 issues across 44 pages.
  • dart analyze + dart format clean on the touched lib/ file.

Note

The install command keeps its registered name magic:install, so the bootstrap reads dart run magic:artisan magic:install ("magic" appears twice). That is accurate to the current command name; renaming it to a bare install would be a separate code change (it would also affect the aggregated <app>:artisan magic:install form). Flagging in case you want that follow-up.

Magic ships an `artisan` executable (pubspec `executables: { artisan: }` + bin/artisan.dart), so every command runs as `dart run magic:artisan <cmd>` from any app that depends on magic, with no global activation and no <app> package-name placeholder. Replace the <app>:artisan / magic:magic forms across doc/ and README, drop the obsolete manual bin/artisan.dart Quick Start step (magic bundles it), and fix the stale global-activate tip.
…oject instructions

SKILL.md, references/cli-commands.md, CLAUDE.md, and CLAUDE.local.md now describe the bundled `artisan` executable and the `dart run magic:artisan <cmd>` form (no <app> placeholder, no host-dispatcher wiring). Also corrects a wrong command name in CLAUDE.local.md (`magic:make:controller` -> `make:controller`).
The MagicInstallCommand dartdoc showed `dart run :artisan magic:install` (empty package prefix). Use the real `dart run magic:artisan magic:install` form.
Copilot AI review requested due to automatic review settings June 19, 2026 08:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Aligns Magic’s documentation with the intended CLI convention that Magic ships a bundled artisan executable, making dart run magic:artisan <command> the canonical invocation from any consuming app.

Changes:

  • Standardizes CLI examples across docs and skills to use dart run magic:artisan ….
  • Simplifies the README Quick Start by removing the obsolete per-app bin/artisan.dart wrapper step and updating install/key generation examples.
  • Updates internal contributor docs (CLAUDE.md) and a CLI command dartdoc example to match the canonical invocation.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
skills/magic-framework/SKILL.md Updates skill guidance and CLI section to the canonical dart run magic:artisan invocation.
skills/magic-framework/references/forms-validation.md Updates FormRequest generation example to dart run magic:artisan ….
skills/magic-framework/references/cli-commands.md Rewrites invocation guidance + all command examples to dart run magic:artisan ….
README.md Updates Quick Start and CLI section examples to dart run magic:artisan … and removes obsolete wrapper step.
lib/src/cli/commands/magic_install_command.dart Updates dartdoc usage examples to dart run magic:artisan ….
doc/security/authorization.md Updates policy generation examples to dart run magic:artisan ….
doc/packages/magic-cli.md Updates invocation and install/key/gen/make:* examples to dart run magic:artisan ….
doc/getting-started/service-providers.md Updates make:provider example to dart run magic:artisan ….
doc/getting-started/installation.md Updates scaffold/install instructions to use dart run magic:artisan … and removes <app> placeholder framing.
doc/eloquent/getting-started.md Updates model generation examples to dart run magic:artisan ….
doc/digging-deeper/localization.md Updates make:lang examples to dart run magic:artisan ….
doc/digging-deeper/events.md Updates make:event/make:listener examples to dart run magic:artisan ….
doc/digging-deeper/encryption.md Updates key generation example to dart run magic:artisan ….
doc/database/seeding.md Updates make:seeder/make:factory examples to dart run magic:artisan ….
doc/database/migrations.md Updates make:migration examples to dart run magic:artisan ….
doc/basics/views.md Updates make:view examples to dart run magic:artisan ….
doc/basics/middleware.md Updates make:middleware example to dart run magic:artisan ….
doc/basics/forms.md Updates make:request tip example to dart run magic:artisan ….
doc/basics/controllers.md Updates make:controller examples to dart run magic:artisan ….
CLAUDE.md Updates contributor command table + CLI description to the canonical invocation.

Comment thread doc/packages/magic-cli.md Outdated
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…n executable

The Introduction and Installation paragraphs still said commands run 'through your app's artisan dispatcher/entrypoint', conflicting with the canonical dart run magic:artisan form. Reword to magic's bundled artisan executable, noting app-level dispatcher aggregation as an optional alternative. Addresses PR #92 review.
@anilcancakir anilcancakir merged commit a7d875a into master Jun 19, 2026
4 checks passed
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