aboutsummaryrefslogtreecommitdiff
path: root/mingling_cli/src
Commit message (Collapse)AuthorAgeFilesLines
* chore: switch update source to checksum-verified static package魏曹先生26 hours2-155/+155
| | | | | | Replace GitHub API artifact discovery with a static base URL, verify the downloaded package by sha256, and record the applied checksum so the wrapper can report when mling is already up to date.
* feat: add self-update command for mling魏曹先生26 hours4-1/+382
| | | | | | | | Add `mling update` to fetch the latest GitHub Actions artifact for the current platform, stage it as a tarball in the data directory, and apply it on the next wrapper invocation. The wrapper extracts the staged package over the installation directory while skipping the running executable, then removes the staged file.
* chore: move lint registry to OUT_DIR魏曹先生27 hours1-2/+3
| | | | | Update registry generation to write to cargo's OUT_DIR and include it via env! instead of a static project-relative path.
* feat: normalize test path for Windows verbatim prefixes魏曹先生6 days1-1/+5
|
* fix: strip verbatim prefix from canonicalized paths on Windows魏曹先生7 days1-1/+23
| | | | | Refactor `find_project_root` to use `deverbatim` on canonicalized paths, removing the `\\?\` prefix on Windows to ensure proper path handling.
* fix(class-add): resolve project root by walking up for `.mling`魏曹先生7 days1-5/+56
|
* feat(class-add): implement class-add command魏曹先生7 days2-0/+268
| | | | | | | Add the `class-add` command to create project classes from templates registered in `.mling/classes.toml`. Supports name derivation (snake_case, PascalCase, etc.), template expansion, and shell completions.
* feat(proj_mgr): add support for conditional directory removal魏曹先生7 days2-1/+63
| | | | | | Add `[[hide-dir]]` rule to remove entire directories when their condition evaluates to true, extending the existing file-level hide functionality to directory trees.
* feat(rule_solver): support `!=` comparison and reject trailing tokens魏曹先生7 days1-2/+39
| | | | | | Add `!=` operator support in rule expressions and ensure the entire expression is consumed during parsing, invalidating any trailing garbage tokens that would previously be silently ignored.
* feat(proj_mgr): add toggle mutex validation and program crate name魏曹先生7 days2-2/+117
| | | | | | Support `[[user.toggle-mutex]]` groups in rule.toml to enforce mutually exclusive toggle options, and derive `program_crate_name` from `program_name` using snake_case conversion.
* refactor(proj_init): simplify template expansion logic魏曹先生7 days1-42/+12
| | | | | Remove `tmpl_` prefix stripping and special `.mling` handling, rendering all files as templates except metadata files.
* feat: add remote template source support via git refs魏曹先生8 days3-12/+404
| | | | | | Allow `proj-init` to accept a `<ref>@<variant>` template source that resolves and caches templates from a git repository, falling back to local directories for plain paths.
* feat: add description to FLAG_PAIR suggestion魏曹先生8 days1-1/+1
|
* chore: remove ZIP template packaging and use directories魏曹先生8 days1-39/+32
| | | | | | Replace the ZIP-based template archive workflow with direct directory copying. Delete the `package-mling-tmpls` tool and remove the `zip` dependency.
* feat(config): add metadata description for config command魏曹先生8 days1-1/+9
|
* feat(config): add cfg --pair flag and refactor config path魏曹先生8 days2-6/+128
| | | | | | | Add `--pair` flag to output config values as `"key" = "value"` pairs, and provide escaped formatting for display. Move config path resolution to a helper function and expose the underlying hash map for rendering and completion.
* feat: add config command and resource for editing settings魏曹先生8 days3-2/+114
| | | | | Add a new `cfg` command to view and edit configuration items stored as key-value pairs in a JSON file.
* refactor: move packages dir to mingling/packages魏曹先生8 days3-4/+4
|
* feat: add project template expansion with rule-based generation魏曹先生8 days4-2/+841
| | | | | | | | Implement `mling proj-init` to generate projects from zip templates with checklist-based configuration. Extracts template archive, moves checklist for user editing, and expands `tmpl_`-prefixed files using `just_template` with boolean rule evaluation from `rule.toml` for file hides and display toggles.
* refactor(pkg-mgr): use pack results for uninstall states魏曹先生8 days1-25/+42
|
* feat(pkg-show): return early error for empty packages魏曹先生8 days1-9/+18
| | | | | Add dedicated error renderer for "No packages installed" and return it early instead of rendering empty package list.
* fix: use consistent output macro for install results魏曹先生8 days1-2/+2
|
* refactor: migrate renderers to RenderResult and stdout macros魏曹先生8 days5-65/+99
| | | | | Replace buffer-based renderers with explicit RenderResult returns and use cargo-styled output macros for consistency.
* feat: add cargo-style formatting utilities and macros魏曹先生8 days2-0/+219
|
* style: format code and fix minor lint issues魏曹先生8 days2-1/+1
|
* fix: correct docs for parse function in utils::display魏曹先生8 days1-4/+4
|
* feat(pkg-mgr): implement pkg-show command魏曹先生8 days3-0/+219
| | | | | | Add `pkg-show` to display installed packages and their versions, removing its NOT_IMPL marker from help. Include internal commands to load enabled package paths and completion scripts.
* feat: implement pkg-enable and pkg-disable commands魏曹先生8 days4-4/+268
| | | | | Add package enable/disable functionality with version matching for pkg-enable, and fix help text to reflect implemented commands.
* feat(pkg_mgr): add uninstall command and improve install魏曹先生8 days4-5/+364
| | | | | | | Implement `mling uninstall` to remove installed packages by name or name@version, with shell completion support. Rework install to build release binaries, copy them plus completion scripts to a per-version directory under the user data dir.
* feat: add exit codes for io error handling魏曹先生8 days1-4/+209
|
* feat(pkg-mgr): add install command placeholder魏曹先生8 days2-0/+10
|
* refactor(cli): move global help and completion to library魏曹先生8 days2-35/+33
| | | | | Move the global help and completion handlers from the CLI binary into the library crate so they can be reused by other entry points.
* chore: move CLI entry to bin and restructure imports魏曹先生8 days2-20/+23
| | | | | Move the CLI binary from `src/main.rs` to `src/bin/cli.rs` and move shared program generation into a new lib.rs module.
* chore(mingling_cli): add colored dependency and utils module魏曹先生8 days3-0/+386
|
* revert: Remove serde and structural renderer support魏曹先生8 days2-15/+8
|
* feat(lint): add shell completion for linter checkers魏曹先生8 days1-6/+26
|
* refactor(linter): rename LintRegistry to ResLintRegistry魏曹先生8 days2-7/+7
|
* feat(linter): refactor lint registry into program resource魏曹先生8 days4-54/+58
| | | | | Extract lint registry loading from cmd_explain into a shared program-level resource initialized via setup.
* refactor(linter): simplify lint explain output formatting魏曹先生8 days1-4/+2
|
* chore: align markdown table formatting魏曹先生8 days1-8/+8
|
* chore: add shell completion for explain command魏曹先生8 days1-3/+20
|
* feat(cli): implement `explain` command and add JSON structural rendering魏曹先生8 days3-2/+133
| | | | | | | | | | Add a new `explain <LINT>` command that queries the embedded lint registry (generated by `build.rs`) and displays detailed information about a specifoic lint, including its name, title, summary, active-on target, default setting, and author. Enable the `structural_renderer` feature and add `serde`/`serde_json` dependencies to support JSON output rendering for command results.
* refactor(linter): move ra lint commands to separate module魏曹先生8 days2-64/+64
|
* refactor(linter): rename cmd_mlint to cmd_lint魏曹先生8 days2-2/+2
|
* feat: add package and project manager modules魏曹先生8 days3-0/+2
|
* docs: add help text for CLI commands and descriptions魏曹先生8 days3-3/+39
| | | | | | Add help text for global flags, commands, and subcommands in help.txt. Add metadata descriptions for linter and metadata commands.
* refactor: extract metadata args into reusable statics魏曹先生8 days2-9/+39
|
* feat(cli): add dynamic completion scripts and global help魏曹先生8 days3-26/+19
| | | | | | Enable the dispatch_tree and comp features to generate completion scripts during build and register global help and completion support in the main entry point.
* feat(diagnostic): translate doc comment to English魏曹先生11 days1-1/+1
|
* feat(linter): use RendererInvoker for JSON report rendering魏曹先生13 days1-4/+8
| | | | | Replace AnyOutput-based dispatch with RendererInvoker in render_lint_reports_json to improve type safety and clarity.