$npx -y skills add halo-dev/cli --skill halo-cli-authUse when working with Halo CLI authentication, login, bearer token or basic auth, profile setup, profile switching, current profile inspection, or fixing missing keyring credentials. Trigger this skill whenever the user needs to log into Halo, manage Halo CLI profiles, switch pro
| 1 | # Halo CLI Auth |
| 2 | |
| 3 | Use this skill for `halo auth` and `halo auth profile`. |
| 4 | |
| 5 | If authentication is not set up yet, do this first before running `post`, `single-page`, `plugin`, `theme`, `attachment`, `backup`, `moment`, `comment`, or `notification` commands. |
| 6 | |
| 7 | ## Commands |
| 8 | |
| 9 | ```bash |
| 10 | halo auth --help |
| 11 | halo auth login --help |
| 12 | halo auth profile --help |
| 13 | ``` |
| 14 | |
| 15 | Main workflows: |
| 16 | |
| 17 | - `halo auth login` |
| 18 | - `halo auth current` |
| 19 | - `halo auth profile list` |
| 20 | - `halo auth profile current` |
| 21 | - `halo auth profile get <name>` |
| 22 | - `halo auth profile use <name>` |
| 23 | - `halo auth profile delete <name>` |
| 24 | - `halo auth profile doctor` |
| 25 | |
| 26 | ## Common Flows |
| 27 | |
| 28 | Login with bearer token: |
| 29 | |
| 30 | ```bash |
| 31 | halo auth login \ |
| 32 | --profile local \ |
| 33 | --url http://127.0.0.1:8090 \ |
| 34 | --auth-type bearer \ |
| 35 | --token <token> |
| 36 | ``` |
| 37 | |
| 38 | Login with basic auth: |
| 39 | |
| 40 | ```bash |
| 41 | halo auth login \ |
| 42 | --profile local \ |
| 43 | --url http://127.0.0.1:8090 \ |
| 44 | --auth-type basic \ |
| 45 | --username admin \ |
| 46 | --password <password> |
| 47 | ``` |
| 48 | |
| 49 | Inspect and switch profiles: |
| 50 | |
| 51 | ```bash |
| 52 | halo auth current |
| 53 | halo auth profile list |
| 54 | halo auth profile use production |
| 55 | halo auth profile get production --json |
| 56 | ``` |
| 57 | |
| 58 | Diagnose broken credentials: |
| 59 | |
| 60 | ```bash |
| 61 | halo auth profile doctor |
| 62 | halo auth profile delete production --force |
| 63 | halo auth login --profile production --url https://halo.example.com --auth-type bearer --token <token> |
| 64 | ``` |
| 65 | |
| 66 | ## Rules |
| 67 | |
| 68 | - In non-interactive mode, `halo auth login` requires `--profile`, `--url`, and `--auth-type`. |
| 69 | - `basic` auth requires `--username` and `--password`. |
| 70 | - `bearer` auth requires `--token`. |
| 71 | - Use `--json` when another tool needs structured output. |
| 72 | - `profile delete` is destructive; use `--force` in non-interactive mode. |
| 73 | - Profile metadata lives in config, but secrets live in the system keyring. |
| 74 | |
| 75 | ## Routing |
| 76 | |
| 77 | - Use `halo-cli-content` for posts and single pages. |
| 78 | - Use `halo-cli-search` for public site search. |
| 79 | - Use `halo-cli-operations` for themes, plugins, attachments, backups, and moments. |
| 80 | - Use `halo-cli-moderation-notifications` for comments, replies, and notifications. |