@headways/cli 0.4.2 → 1.1.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 CHANGED
@@ -1,9 +1,16 @@
1
1
  # @headways/cli
2
2
 
3
- The official CLI for [Headways](https://headways.ai) author skills, sync them to your team, and capture workflows directly from Claude Code.
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 configure
15
- # Prompts for your API key (sk_…). Validates and saves org automatically.
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 configure --token <key> # non-interactive
22
- headways configure --api-url http://localhost:3001 # local dev
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
- ### Skills
32
+ ### Authoring
30
33
 
31
34
  ```bash
32
- headways skills new # scaffold a new skill interactively
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> # ingest an existing file or directory
35
- headways skills push <slug> # sync local edits to the skill draft
36
- headways skills list # list skills in the active org
37
- headways skills capture # capture a workflow from Claude Code
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
- ### Sync
44
+ ### Runtime helpers (invoked by Claude Code hooks; rarely run by hand)
41
45
 
42
46
  ```bash
43
- headways sync start # register device + pull updates once
44
- headways sync start --daemon # poll every 60s for background updates
45
- headways sync status # show pending skill updates
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
- ### Other
52
+ ### Connections
50
53
 
51
54
  ```bash
52
- headways feedback <skillSlug> # submit feedback on a skill run
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 # creates ./<slug>/ with SKILL.md,
61
- # headways.yaml, capabilities.yaml,
62
- # hooks.yaml
63
- # Edit the skill
64
- vim <slug>/SKILL.md
65
- # Push as a draft
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
- Installed skill bundles land in `~/.claude/skills/<slug>/`. Config is stored in `~/.headways/config.json`.
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
 
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  apiRequest,
4
4
  rawRequest
5
- } from "./chunk-2INXZHRG.js";
6
- import "./chunk-UUFIIGTZ.js";
5
+ } from "./chunk-GN2N6M4B.js";
6
+ import "./chunk-COGZMSYS.js";
7
7
  export {
8
8
  apiRequest,
9
9
  rawRequest
@@ -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,
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getApiUrl,
4
4
  requireAuth
5
- } from "./chunk-UUFIIGTZ.js";
5
+ } from "./chunk-COGZMSYS.js";
6
6
 
7
7
  // src/lib/api.ts
8
8
  async function rawRequest(path, token, options = {}, apiUrl) {
@@ -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-UUFIIGTZ.js";
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,