|
1 | | -<!-- |
2 | | - Skulk CLI |
3 | | - The Human Pattern Lab |
| 1 | +# HPL CLI (Alpha) 🧭🦊 |
4 | 2 |
|
5 | | - This README is written for humans. |
6 | | - Design rationale lives in DESIGN.md. |
7 | | ---> |
8 | | -# Skulk CLI |
| 3 | +Contract-first CLI for The Human Pattern Lab. |
9 | 4 |
|
10 | | -[](./DESIGN.md)   |
11 | | - |
12 | | - |
13 | | -> A modern, automation-safe CLI for The Human Pattern Lab. |
14 | | -
|
15 | | -Skulk is a command-line tool for syncing and managing Lab Notes — built to work just as well for humans at the keyboard as it does for automation, CI, and agent-driven workflows. |
16 | | - |
17 | | ---- |
18 | | -## What Skulk Connects To |
19 | | - |
20 | | -Skulk is the CLI for **The Human Pattern Lab API**. |
21 | | - |
22 | | -By default it targets a Human Pattern Lab API instance. You can override the API endpoint with `--base-url` to use staging or a self-hosted deployment of the same API. |
23 | | - |
24 | | -> Note: `--base-url` is intended for alternate deployments of the Human Pattern Lab API, not arbitrary third-party APIs. |
25 | | -
|
26 | | ---- |
27 | | -## Configuration |
28 | | - |
29 | | -### Environment variables |
30 | | - |
31 | | -- `SKULK_TOKEN` — API token used to authenticate requests. |
32 | | -- `SKULK_BASE_URL` — Base URL for a Human Pattern Lab API instance (overridden by `--base-url`). |
33 | | - |
34 | | -Example: |
35 | | - |
36 | | -```bash |
37 | | -export SKULK_TOKEN="..." |
38 | | -export SKULK_BASE_URL="https://thehumanpatternlab.com/api" |
39 | | -skulk notes sync --dir ./src/labnotes/en |
40 | | -``` |
41 | | ---- |
42 | | - |
43 | | -## Why Skulk Exists |
44 | | - |
45 | | -Command-line tools no longer live in a human-only world. |
46 | | - |
47 | | -They’re run by: |
48 | | -- developers exploring and iterating |
49 | | -- scripts and CI pipelines |
50 | | -- automation layers and AI-assisted workflows |
51 | | - |
52 | | -Skulk was designed from the start to behave **predictably and honestly** in all of those contexts — without sacrificing human usability. |
53 | | - |
54 | | ---- |
55 | | - |
56 | | -## 🤖 AI-Forward (for Humans) |
57 | | - |
58 | | -Skulk follows **AI-forward engineering principles** — not for AIs, but for the people who build tools that increasingly interact with them. |
59 | | - |
60 | | -### Dual Output Modes |
61 | | - |
62 | | -By default, Skulk is human-readable: |
| 5 | +## Install (local dev) |
63 | 6 |
|
64 | 7 | ```bash |
65 | | -skulk notes sync |
| 8 | +npm install |
| 9 | +npm run dev -- --help |
66 | 10 | ``` |
67 | 11 |
|
68 | | -When `--json` is enabled: |
69 | | - |
70 | | -```bash |
71 | | -skulk --json notes sync |
72 | | -``` |
| 12 | +## Config |
73 | 13 |
|
74 | | -Skulk switches to machine-readable output: |
75 | | -- stdout contains **only valid JSON** |
76 | | -- no banners, emojis, or progress chatter |
77 | | -- errors go to stderr |
78 | | -- exit codes are deterministic |
| 14 | +- `HPL_API_BASE_URL` (default: `https://api.thehumanpatternlab.com`) |
79 | 15 |
|
80 | | -This makes Skulk safe to use in: |
81 | | -- scripts |
82 | | -- CI pipelines |
83 | | -- automation |
84 | | -- AI-assisted workflows |
| 16 | +## Commands (MVP) |
85 | 17 |
|
86 | | ---- |
| 18 | +- `hpl version` |
| 19 | +- `hpl capabilities` |
| 20 | +- `hpl health` |
| 21 | +- `hpl notes list [--limit N]` |
| 22 | +- `hpl notes get <slug> [--raw]` |
87 | 23 |
|
88 | | -## JSON Output Contract |
| 24 | +## JSON contract |
89 | 25 |
|
90 | | -Structured output is treated as a **contract**, not a courtesy. |
| 26 | +Add `--json` to emit machine-readable JSON only on stdout. |
91 | 27 |
|
92 | | -The repository includes a built-in verification: |
| 28 | +### Examples |
93 | 29 |
|
94 | 30 | ```bash |
95 | | -npm run json:check |
| 31 | +hpl capabilities --json |
| 32 | +hpl health --json |
| 33 | +hpl notes list --json |
| 34 | +hpl notes get the-invitation --json |
96 | 35 | ``` |
97 | | - |
98 | | -This command runs Skulk in `--json` mode and fails immediately if *any* non-JSON output appears on stdout. |
99 | | - |
100 | | ---- |
101 | | - |
102 | | -## Design & Philosophy |
103 | | - |
104 | | -Curious why Skulk works this way? |
105 | | -→ [DESIGN.md](./DESIGN.md) |
106 | | - |
107 | | ---- |
108 | | - |
109 | | -## Philosophy |
110 | | - |
111 | | -> Automation shouldn’t require guessing what a tool *meant* to say. |
112 | | -
|
113 | | -Skulk is boring in the best way: |
114 | | -predictable, explicit, and dependable. |
0 commit comments