@headways/cli 0.4.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -32
- package/dist/{api-5EKGGFQ6.js → api-H34ZX4FL.js} +2 -2
- package/dist/{chunk-UUFIIGTZ.js → chunk-COGZMSYS.js} +2 -0
- package/dist/{chunk-2INXZHRG.js → chunk-GN2N6M4B.js} +1 -1
- package/dist/{config-XQHAXREA.js → config-APIR4RCR.js} +3 -1
- package/dist/index.js +400 -143
- package/package.json +1 -1
- package/dist/chunk-XTEQBKIN.js +0 -409
- package/dist/sync-Q3OQUWOD.js +0 -16
package/README.md
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
# @headways/cli
|
|
2
2
|
|
|
3
|
-
The official CLI for [Headways](https://headways.ai)
|
|
3
|
+
The official CLI for [Headways](https://headways.ai). Two responsibilities:
|
|
4
|
+
|
|
5
|
+
1. **Skill authoring** — talk to the backend API: scaffold, push drafts, list, submit feedback.
|
|
6
|
+
2. **Claude Code runtime helpers** — small binaries that Claude Code hooks shell out to (`prime`, `emit`, `skill-run start`).
|
|
7
|
+
|
|
8
|
+
Anything that mutates this machine's state — installing skill bundles, syncing the catalog, editing `~/.claude/settings.json` — lives in the [Headways desktop app](https://headways.ai/download) (macOS for now). The desktop auto-installs this CLI under `~/.local/bin/headways` on first launch.
|
|
4
9
|
|
|
5
10
|
## Installation
|
|
6
11
|
|
|
12
|
+
The desktop app installs the CLI for you. For dev / local work:
|
|
13
|
+
|
|
7
14
|
```bash
|
|
8
15
|
npm install -g @headways/cli
|
|
9
16
|
```
|
|
@@ -11,63 +18,66 @@ npm install -g @headways/cli
|
|
|
11
18
|
## Setup
|
|
12
19
|
|
|
13
20
|
```bash
|
|
14
|
-
headways
|
|
15
|
-
#
|
|
21
|
+
headways login
|
|
22
|
+
# Browser SSO. Saves credentials + org to ~/.headways/config.json.
|
|
16
23
|
```
|
|
17
24
|
|
|
18
|
-
Options:
|
|
19
|
-
|
|
20
25
|
```bash
|
|
21
|
-
headways
|
|
22
|
-
headways
|
|
23
|
-
headways configure status # show saved key + org
|
|
24
|
-
headways configure clear # remove credentials
|
|
26
|
+
headways config status # show saved token + org + URLs
|
|
27
|
+
headways config clear # remove credentials
|
|
25
28
|
```
|
|
26
29
|
|
|
27
30
|
## Commands
|
|
28
31
|
|
|
29
|
-
###
|
|
32
|
+
### Authoring
|
|
30
33
|
|
|
31
34
|
```bash
|
|
32
|
-
headways skills new # scaffold a new skill
|
|
35
|
+
headways skills new # scaffold a new skill (creates ./<slug>/)
|
|
33
36
|
headways skills new --slug <slug> --headline "<headline>" # non-interactive
|
|
34
|
-
headways skills import <path>
|
|
35
|
-
headways skills push <slug>
|
|
36
|
-
headways skills list
|
|
37
|
-
headways skills
|
|
37
|
+
headways skills import <path> # ingest an existing file or directory
|
|
38
|
+
headways skills push <slug> # push local edits as a draft
|
|
39
|
+
headways skills list # list skills in the active org
|
|
40
|
+
headways skills feedback <slug> # submit feedback on a skill
|
|
41
|
+
headways skills guide # authoring reference (run before creating a skill)
|
|
38
42
|
```
|
|
39
43
|
|
|
40
|
-
###
|
|
44
|
+
### Runtime helpers (invoked by Claude Code hooks; rarely run by hand)
|
|
41
45
|
|
|
42
46
|
```bash
|
|
43
|
-
headways
|
|
44
|
-
headways
|
|
45
|
-
headways
|
|
46
|
-
headways accept <skill> # install a pending update
|
|
47
|
+
headways prime # print workflow context for AI agents
|
|
48
|
+
headways emit --hook <namespace>.<name> # emit a skill-run event
|
|
49
|
+
headways skill-run start # create a run from a UserPromptSubmit hook
|
|
47
50
|
```
|
|
48
51
|
|
|
49
|
-
###
|
|
52
|
+
### Connections
|
|
50
53
|
|
|
51
54
|
```bash
|
|
52
|
-
headways
|
|
53
|
-
headways org use <slug> # switch active org
|
|
55
|
+
headways connections list # list MCP connector authorizations
|
|
54
56
|
```
|
|
55
57
|
|
|
56
58
|
## Creating a skill from scratch
|
|
57
59
|
|
|
58
60
|
```bash
|
|
59
61
|
cd ~/my-skills
|
|
60
|
-
headways skills new
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
#
|
|
64
|
-
|
|
65
|
-
#
|
|
66
|
-
headways skills push <slug>
|
|
67
|
-
# Publish via the web UI when ready
|
|
62
|
+
headways skills new # creates ./<slug>/ with SKILL.md,
|
|
63
|
+
# headways.yaml, capabilities.yaml,
|
|
64
|
+
# hooks.yaml
|
|
65
|
+
vim <slug>/SKILL.md # edit
|
|
66
|
+
headways skills push <slug> # push as draft
|
|
67
|
+
# Then publish via the web UI at app.headways.ai/skills/<slug>
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
Once published, the skill shows up in the desktop app's Library view with an **Install** button.
|
|
71
|
+
|
|
72
|
+
## Where things live
|
|
73
|
+
|
|
74
|
+
| Path | Purpose |
|
|
75
|
+
|---|---|
|
|
76
|
+
| `~/.headways/config.json` | API token, org, URLs |
|
|
77
|
+
| `~/.headways/installed/<slug>.json` | Local install manifests (written by the desktop) |
|
|
78
|
+
| `~/.headways/runs/<session_id>` | Active run id per Claude Code session (written by `skill-run start`) |
|
|
79
|
+
| `~/.claude/skills/<slug>/` | Materialized skill bundles (written by the desktop) |
|
|
80
|
+
| `~/.claude/settings.json` | Claude Code hook wiring (written by the desktop) |
|
|
71
81
|
|
|
72
82
|
## Local development
|
|
73
83
|
|
|
@@ -8,6 +8,7 @@ var HEADWAYS_DIR = join(homedir(), ".headways");
|
|
|
8
8
|
var CONFIG_FILE = join(HEADWAYS_DIR, "config.json");
|
|
9
9
|
var CATALOG_FILE = join(HEADWAYS_DIR, "catalog.json");
|
|
10
10
|
var INSTALLED_DIR = join(HEADWAYS_DIR, "installed");
|
|
11
|
+
var RUNS_DIR = join(HEADWAYS_DIR, "runs");
|
|
11
12
|
var CLAUDE_SKILLS_DIR = join(homedir(), ".claude", "skills");
|
|
12
13
|
function readConfig() {
|
|
13
14
|
if (!existsSync(CONFIG_FILE)) return {};
|
|
@@ -43,6 +44,7 @@ export {
|
|
|
43
44
|
CONFIG_FILE,
|
|
44
45
|
CATALOG_FILE,
|
|
45
46
|
INSTALLED_DIR,
|
|
47
|
+
RUNS_DIR,
|
|
46
48
|
CLAUDE_SKILLS_DIR,
|
|
47
49
|
readConfig,
|
|
48
50
|
writeConfig,
|
|
@@ -5,18 +5,20 @@ import {
|
|
|
5
5
|
CONFIG_FILE,
|
|
6
6
|
HEADWAYS_DIR,
|
|
7
7
|
INSTALLED_DIR,
|
|
8
|
+
RUNS_DIR,
|
|
8
9
|
getApiUrl,
|
|
9
10
|
getAppUrl,
|
|
10
11
|
readConfig,
|
|
11
12
|
requireAuth,
|
|
12
13
|
writeConfig
|
|
13
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-COGZMSYS.js";
|
|
14
15
|
export {
|
|
15
16
|
CATALOG_FILE,
|
|
16
17
|
CLAUDE_SKILLS_DIR,
|
|
17
18
|
CONFIG_FILE,
|
|
18
19
|
HEADWAYS_DIR,
|
|
19
20
|
INSTALLED_DIR,
|
|
21
|
+
RUNS_DIR,
|
|
20
22
|
getApiUrl,
|
|
21
23
|
getAppUrl,
|
|
22
24
|
readConfig,
|