mas-cli / mas-cli/mas

Advice / Alert / Hint / Info / Notice / Notification / Tip system

Open
#839 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
Swift
Stars
12.4k
Forks
299
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Implement a advice / alert / hint / Info / notice / notification / tip system.

Chose the system's name from the above candidates. Using tip for now because it's the shortest.

Can use the system to notify users about stuff, whenever they:

  • run mas
  • run a specific command
  • encounter a certain issue
  • etc.

Note:

  • Each tip output will be labeled with a color-coded Tip: prefix (or whatever name is chosen)
  • Each tip will be displayed in the same circumstances until a user hides it
  • After each tip, a subsequent tip will inform users how to hide tips (until the tip-hiding tip is itself hidden).
  • Tip hidings will be recorded using the Config System as the backend, but will probably have its own interface
  • Tip hidings (& possibly other settings) will normally be left out of config system output for all settings
    • The --all flag for mas config subcommands will include them (& all other normally excluded settings) when desired
  • Tips will be namespaced via tip.-prefixed setting names
  • Use a quaternary setting 2-bit mask for each tip:
    • hidden 0b00
    • always show: 0b11:: both interactive & non-interactive
    • only show for interactive shells: 0b01 default for most (all?) tips
    • only for non-interactive shells: 0b10: this makes little sense, but including for completeness

Interface:

Maybe rename "hide" as "dismiss"; if so, what should "show" change to?

mas tip (hide|show) [--interactive] [--non-interactive] <tip-name-glob>…
mas tip print [-q|--quiet] [<tip-name-glob>…]

Tip name x maps to setting name tip.x.

Globs allow multiple tips to be hidden / shown at once. * allows all to be hidden / shown.

hide normally hides for both interactive & non-interactive shells.

show normally shows for only interactive shells.

To perform hide or show on any other combo of interactive or non-interactive shells, use one or both of [--interactive] [--non-interactive].

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Config System described in issue #838 and the existing command structure for mas. Resolve the open naming and interface questions, then use the listed tip visibility, hiding, namespacing, and config-output requirements as acceptance criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.