$npx -y skills add halo-dev/cli --skill halo-cli-sharedUse when a task involves Halo CLI, Halo CMS command-line operations, or terminal-based Halo management. Also use when you need shared rules for profiles, JSON output, help discovery, config paths, and destructive actions. Trigger this skill whenever the user mentions 'halo', 'Hal
| 1 | # Halo CLI Shared |
| 2 | |
| 3 | Start here when the task says "use Halo CLI" but does not yet say whether it is auth, content, search, operations, or moderation. |
| 4 | |
| 5 | ## Install And Verify |
| 6 | |
| 7 | Install globally: |
| 8 | |
| 9 | ```bash |
| 10 | npm install -g @halo-dev/cli |
| 11 | ``` |
| 12 | |
| 13 | Binary name: |
| 14 | |
| 15 | ```bash |
| 16 | halo |
| 17 | ``` |
| 18 | |
| 19 | Check version and top-level help: |
| 20 | |
| 21 | ```bash |
| 22 | halo --version |
| 23 | halo --help |
| 24 | ``` |
| 25 | |
| 26 | ## Top-Level Areas |
| 27 | |
| 28 | - `auth` |
| 29 | - `post` |
| 30 | - `single-page` |
| 31 | - `search` |
| 32 | - `plugin` |
| 33 | - `theme` |
| 34 | - `attachment` |
| 35 | - `backup` |
| 36 | - `moment` |
| 37 | - `comment` |
| 38 | - `notification` |
| 39 | - `completion <shell>` — Generate shell completion script (bash, zsh, fish, powershell) |
| 40 | |
| 41 | ## Shared Rules |
| 42 | |
| 43 | - Most command areas require an authenticated profile. |
| 44 | - Use `halo auth login` to create a profile. |
| 45 | - Use `--profile <name>` when more than one profile exists. |
| 46 | - Use `--json` when output is meant for automation or follow-up parsing. |
| 47 | - In non-interactive mode, dangerous commands usually require `--force`. |
| 48 | - Read `--help` before guessing flags for a specific command. |
| 49 | |
| 50 | ## Public vs Authenticated |
| 51 | |
| 52 | Most areas require auth. |
| 53 | |
| 54 | The main public workflow is `halo search`, which can use a direct site URL without login: |
| 55 | |
| 56 | ```bash |
| 57 | halo search --keyword "halo" --url https://www.halo.run |
| 58 | ``` |
| 59 | |
| 60 | ## Config And Secrets |
| 61 | |
| 62 | Profile metadata is stored in: |
| 63 | |
| 64 | - `$HALO_CLI_CONFIG_DIR/config.json` if `HALO_CLI_CONFIG_DIR` is set |
| 65 | - otherwise `$XDG_CONFIG_HOME/halo/config.json` |
| 66 | - otherwise `~/.config/halo/config.json` |
| 67 | |
| 68 | Credentials are stored in the system keyring. |
| 69 | |
| 70 | ## Routing |
| 71 | |
| 72 | - Use `halo-cli-auth` for login, current profile, profile list/use/delete, and credential repair. |
| 73 | - Use `halo-cli-content` for posts and single pages. |
| 74 | - Use `halo-cli-search` for public site search. |
| 75 | - Use `halo-cli-operations` for themes, plugins, attachments, backups, and moments. |
| 76 | - Use `halo-cli-moderation-notifications` for comments, replies, and notifications. |