askshepherd 0.1.42 → 0.1.44
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 +65 -214
- package/bin/shepherd-onboard.js +6914 -672
- package/bin/shepherd.js +957 -0
- package/package.json +8 -5
- package/skills/shepherd/SKILL.md +128 -0
- package/source-selection.cjs +3 -0
- package/wiki-readiness.cjs +106 -0
package/README.md
CHANGED
|
@@ -1,274 +1,125 @@
|
|
|
1
|
-
# AskShepherd
|
|
1
|
+
# AskShepherd CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
customers should use the Shepherd macOS app; the app bundles this same engine
|
|
5
|
-
and installs background sync/MCP without asking customers to run `npx`.
|
|
6
|
-
|
|
7
|
-
The npm package is `askshepherd`. The installed binary also exposes `shepherd`,
|
|
8
|
-
and the support CLI uses the package name:
|
|
9
|
-
|
|
10
|
-
```sh
|
|
11
|
-
claude "Run Shepherd customer onboarding with: npx -y askshepherd@latest agent. Ask me the onboarding questions, do not infer answers from local context, and continue through the follow-up commands it prints. After onboarding completes, ask whether to install Shepherd MCP for me into Codex, Claude Code, Cursor, any subset, or none; if I choose any, run npx -y askshepherd@latest mcp-login --install <targets>." --dangerously-skip-permissions
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
## Claude Code Onboarding Command
|
|
15
|
-
|
|
16
|
-
Give this to Claude Code:
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
claude "Run Shepherd customer onboarding with: npx -y askshepherd@latest agent. Ask me the onboarding questions, do not infer answers from local context, and continue through the follow-up commands it prints. After onboarding completes, ask whether to install Shepherd MCP for me into Codex, Claude Code, Cursor, any subset, or none; if I choose any, run npx -y askshepherd@latest mcp-login --install <targets>." --dangerously-skip-permissions
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The underlying `askshepherd agent` command defaults to the customer-facing production Shepherd cloud. In coding-agent shells, it gives the agent the public onboarding checklist and follow-up commands. In a normal interactive terminal, it does not print the checklist; it points the user to the direct terminal onboarding flow instead.
|
|
23
|
-
Claude Code onboarding asks short selection questions first: existing/new org, sources to connect, Messages skip/provide-handle, and whether to sync Coding Sessions from Codex/Claude Code. If Messages is selected, the agent runs `messages-chats`, opens a minimal searchable local webpage, and has the user select which contacts/groups to sync. If Coding Sessions is selected, onboarding installs a local LaunchAgent that syncs redacted session summaries, not full raw transcripts. Account creation/relinking always starts with Shepherd WorkOS auth. After onboarding completes, the agent asks whether to install Shepherd MCP for the signed-in customer into Codex, Claude Code, Cursor, any subset, or none.
|
|
24
|
-
Existing-organization joins are verified from Shepherd login and company email domain; the typed org name is not trusted by itself.
|
|
25
|
-
|
|
26
|
-
For experiments, pass a separate non-production API explicitly:
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
claude "Run Shepherd customer onboarding with: npx -y askshepherd@latest agent --api https://<non-prod-brain-api>. Ask me the onboarding questions, do not infer answers from local context, and continue through the follow-up commands it prints. After onboarding completes, ask whether to install Shepherd MCP for me into Codex, Claude Code, Cursor, any subset, or none; if I choose any, run npx -y askshepherd@latest mcp-login --install <targets> --api https://<non-prod-brain-api>." --dangerously-skip-permissions
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Human Terminal One-liner
|
|
3
|
+
Self-serve Shepherd onboarding and memory CLI.
|
|
33
4
|
|
|
34
5
|
```sh
|
|
35
6
|
npx -y askshepherd@latest
|
|
36
7
|
```
|
|
37
8
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- runs Shepherd WorkOS login/signup first
|
|
41
|
-
- asks for name, organization, and an optional local Messages handle
|
|
42
|
-
- creates or reuses the Shepherd customer account from the WorkOS-authenticated email
|
|
43
|
-
- creates or reuses the organization, including case-insensitive and close-name matches
|
|
44
|
-
- only reuses an existing organization when the authenticated account is allowed to join it
|
|
45
|
-
- prints Google Workspace domain-wide delegation setup for a Workspace super admin
|
|
46
|
-
- opens Slack authorization
|
|
47
|
-
- opens the Granola desktop app to Settings -> Connectors -> API keys
|
|
48
|
-
- collects the Granola API key after opening the Granola screen when Granola is enabled
|
|
49
|
-
- asks the user to grant or confirm macOS Full Disk Access before local Messages sync
|
|
50
|
-
- checks local Messages access and keeps prompting in interactive onboarding until Full Disk Access works
|
|
51
|
-
- opens a minimal searchable local webpage with contact/group names and only syncs the chats selected by the user
|
|
52
|
-
- sets up local macOS Messages raw sync with a background LaunchAgent scoped to the selected chats, including contact-name hydration for observed conversations
|
|
53
|
-
- optionally sets up local Codex/Claude Code coding-session summary sync with a background LaunchAgent
|
|
54
|
-
- starts raw polling/backfill for connected sources
|
|
55
|
-
- asks the customer-facing production cloud to schedule downstream processing; wiki ingestion, memory artifacts, and document summaries run in separate brain services, not in the local CLI
|
|
56
|
-
|
|
57
|
-
The command does not expose Railway, database, Redis, or internal service details to the user.
|
|
58
|
-
|
|
59
|
-
## Check Sync Status
|
|
9
|
+
If the Shepherd skill is already installed, give this one line to a coding agent:
|
|
60
10
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
```sh
|
|
64
|
-
npx -y askshepherd@latest status
|
|
65
|
-
npx -y askshepherd@latest status --json
|
|
11
|
+
```text
|
|
12
|
+
Use the Shepherd skill to onboard me to this repository before coding.
|
|
66
13
|
```
|
|
67
14
|
|
|
68
|
-
|
|
69
|
-
processing state, and local background sync health for Messages and Coding
|
|
70
|
-
Sessions.
|
|
15
|
+
If the agent does not already have the skill, give it this bootstrap line:
|
|
71
16
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`Explore` against the user's home directory, repositories, `~/.codex`,
|
|
75
|
-
`~/.claude`, or `~/.shepherd` for Shepherd setup. Use the npm status command
|
|
76
|
-
above; it performs the bounded local checks.
|
|
77
|
-
|
|
78
|
-
## Set Up Coding Agent Sessions
|
|
79
|
-
|
|
80
|
-
Use this when the user asks "Help me set up coding agent sessions" or "Enable
|
|
81
|
-
coding agent sessions locally for Shepherd":
|
|
82
|
-
|
|
83
|
-
```sh
|
|
84
|
-
npx -y askshepherd@latest agent --login
|
|
85
|
-
npx -y askshepherd@latest agent --add-sources coding-sessions --name "<name>" --org "<organization>"
|
|
86
|
-
npx -y askshepherd@latest agent --continue
|
|
87
|
-
npx -y askshepherd@latest status
|
|
17
|
+
```text
|
|
18
|
+
Set up Shepherd for me: run `npx -y askshepherd@latest agent-setup`, follow its prompts, ask me before connecting each source, then verify with `npx -y askshepherd@latest status`, `npx -y askshepherd@latest shepherd_wiki_status`, and `npx -y askshepherd@latest tools --json`.
|
|
88
19
|
```
|
|
89
20
|
|
|
90
|
-
The
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
filesystem for a Shepherd agent implementation.
|
|
94
|
-
|
|
95
|
-
## Customer MCP Login
|
|
21
|
+
The default command starts onboarding. It authenticates the Shepherd account,
|
|
22
|
+
creates or selects the customer org, connects selected sources, starts backend
|
|
23
|
+
processing, saves local state, and prepares CLI tool auth.
|
|
96
24
|
|
|
97
|
-
After
|
|
98
|
-
install the production MCP from the saved local onboarding session:
|
|
25
|
+
After install, use the `shepherd` command:
|
|
99
26
|
|
|
100
27
|
```sh
|
|
101
|
-
npx -y askshepherd@latest
|
|
28
|
+
npx -y askshepherd@latest agent-setup
|
|
29
|
+
shepherd login
|
|
30
|
+
shepherd onboard
|
|
31
|
+
shepherd continue
|
|
32
|
+
shepherd status
|
|
33
|
+
shepherd shepherd_wiki_status
|
|
34
|
+
shepherd tools --json
|
|
35
|
+
shepherd <tool_name> --args '<json_object>'
|
|
36
|
+
shepherd skill
|
|
102
37
|
```
|
|
103
38
|
|
|
104
|
-
|
|
105
|
-
production API and mints an MCP token for that exact customer account. If the
|
|
106
|
-
local onboarding session is unavailable, it falls back to Shepherd WorkOS auth
|
|
107
|
-
and still links only an existing onboarded customer account. It writes
|
|
108
|
-
`~/.shepherd/mcp.json` and asks where Shepherd MCP should be accessible. It can
|
|
109
|
-
install the MCP into:
|
|
39
|
+
## Onboarding
|
|
110
40
|
|
|
111
|
-
-
|
|
112
|
-
- Claude Code
|
|
113
|
-
- Cursor IDE and Cursor Agent
|
|
114
|
-
|
|
115
|
-
The saved MCP state includes:
|
|
116
|
-
|
|
117
|
-
- `mcpUrl`: `https://brain-api-customer-facing.up.railway.app/mcp`
|
|
118
|
-
- `token`: bearer token for MCP clients
|
|
119
|
-
- `account`: linked customer account metadata
|
|
120
|
-
- `authSource`: `local_onboarding` or `workos`
|
|
121
|
-
- `localAuth`: raw onboarding state reference when local auth was used
|
|
122
|
-
|
|
123
|
-
The installed MCP server is local npm first, remote brain second. For questions
|
|
124
|
-
like "what do I have set up on Shepherd?", "is Shepherd syncing?", or "help me
|
|
125
|
-
set up coding agent sessions", the MCP exposes local tools such as
|
|
126
|
-
`shepherd_status`, `shepherd_setup_coding_sessions`, and
|
|
127
|
-
`shepherd_enable_coding_sessions` that route agents to the local
|
|
128
|
-
`askshepherd status` / add-source flow. Production memory and wiki tools remain
|
|
129
|
-
remote Railway-backed tools for source recall and company-memory answers.
|
|
130
|
-
Those local MCP tools are also the permission boundary: an MCP client should not
|
|
131
|
-
use shell or file tools to inspect the user's folders or repositories for setup.
|
|
132
|
-
|
|
133
|
-
Use `--json` when an agent or setup script needs machine-readable endpoint and
|
|
134
|
-
header details.
|
|
135
|
-
|
|
136
|
-
Install an existing MCP login later:
|
|
41
|
+
One-line agent setup:
|
|
137
42
|
|
|
138
43
|
```sh
|
|
139
|
-
npx -y askshepherd@latest
|
|
44
|
+
npx -y askshepherd@latest agent-setup
|
|
140
45
|
```
|
|
141
46
|
|
|
142
|
-
|
|
143
|
-
onboarding session before configuring clients, so already-onboarded customers
|
|
144
|
-
do not need to sign in again. Local Messages continues syncing through its
|
|
145
|
-
LaunchAgent and cloud sources continue syncing through production pollers; MCP
|
|
146
|
-
auth only controls read access to that customer's production memory/wiki data.
|
|
147
|
-
|
|
148
|
-
Install targets can also be provided non-interactively:
|
|
47
|
+
Interactive first run:
|
|
149
48
|
|
|
150
49
|
```sh
|
|
151
|
-
npx -y askshepherd@latest
|
|
152
|
-
npx -y askshepherd@latest mcp-install --install all
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
After install, customers can immediately ask their coding agent questions like:
|
|
156
|
-
|
|
157
|
-
```text
|
|
158
|
-
Use Shepherd to catch me up on what the team discussed yesterday.
|
|
159
|
-
Use Shepherd to search Slack, Gmail, Messages, Granola, and the wiki for launch blockers.
|
|
160
|
-
Use Shepherd to find the last meeting where we discussed the enterprise pilot.
|
|
161
|
-
Use Shepherd to summarize open follow-ups from this week's memory.
|
|
162
|
-
Use Shepherd to tell me what coding agents already worked on in this repo.
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
The production MCP gives onboarded customers the same read/QA behavior that made
|
|
166
|
-
the internal Shepherd MCP useful: summary-first answers, wiki search/read, and
|
|
167
|
-
source drill-in. Internal local sync, admin, replay, write/delete, and cache
|
|
168
|
-
maintenance tools are not exposed to customers.
|
|
169
|
-
|
|
170
|
-
## Google Workspace Domain-wide Delegation
|
|
171
|
-
|
|
172
|
-
Business customers connect Google Workspace once as an admin. Employees do not create service accounts and do not each complete Google OAuth for Gmail, Calendar, Drive, Docs, Sheets, Slides, Tasks, or Contacts.
|
|
173
|
-
|
|
174
|
-
Customer-side setup in Google Admin Console:
|
|
175
|
-
|
|
176
|
-
```text
|
|
177
|
-
App name: Shepherd
|
|
178
|
-
Service account email: gigabrain-delegation@shepherd-gigabrain.iam.gserviceaccount.com
|
|
179
|
-
Domain-wide delegation OAuth Client ID: 118363960386741325727
|
|
50
|
+
npx -y askshepherd@latest
|
|
180
51
|
```
|
|
181
52
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
Shepherd must still enforce selected users and groups internally before impersonating or polling employee emails.
|
|
185
|
-
|
|
186
|
-
## Options
|
|
53
|
+
Agent-led setup:
|
|
187
54
|
|
|
188
55
|
```sh
|
|
189
|
-
|
|
190
|
-
--name <
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
--messages-handle <value> Messages phone number or Apple ID email
|
|
194
|
-
--messages-chat-ids <ids> Comma-separated chat IDs selected from messages-chats, or `all` to watch every current and future chat
|
|
195
|
-
--messages-backfill-days Local Messages backfill window, default all selected chat history
|
|
196
|
-
--api <url> Advanced: Shepherd API URL. Use only for non-production experiments or local/staging testing.
|
|
197
|
-
--no-google Skip Google Workspace (Gmail/Drive/Docs/Calendar/Sheets/Slides/Tasks/Contacts)
|
|
198
|
-
--no-slack Skip Slack
|
|
199
|
-
--no-granola Skip Granola
|
|
200
|
-
--no-open-granola Do not open the Granola API key screen
|
|
201
|
-
--no-messages Skip local Messages
|
|
202
|
-
--coding-sessions Opt in to local Codex/Claude Code session summary sync
|
|
203
|
-
--sources <list> Exact sources to connect: google,slack,granola,messages,coding-sessions,all
|
|
204
|
-
--add-sources <list> Same as --sources, named for second-time onboarding
|
|
205
|
-
--no-open Print auth URLs instead of opening the browser
|
|
56
|
+
shepherd login
|
|
57
|
+
shepherd onboard --name "<full_name>" --org "<organization>" --sources google,notion,slack,granola,messages,coding-sessions
|
|
58
|
+
shepherd continue
|
|
59
|
+
shepherd status
|
|
206
60
|
```
|
|
207
61
|
|
|
208
|
-
|
|
62
|
+
`shepherd continue` resumes after browser auth, Google Workspace delegation,
|
|
63
|
+
Granola key entry, Messages chat selection, or local sync setup.
|
|
64
|
+
|
|
65
|
+
## Tool Calls
|
|
209
66
|
|
|
210
|
-
|
|
211
|
-
Coding Sessions or by passing:
|
|
67
|
+
List tools:
|
|
212
68
|
|
|
213
69
|
```sh
|
|
214
|
-
|
|
70
|
+
shepherd tools --json
|
|
215
71
|
```
|
|
216
72
|
|
|
217
|
-
|
|
73
|
+
Call an exact Shepherd MCP tool:
|
|
218
74
|
|
|
219
75
|
```sh
|
|
220
|
-
|
|
76
|
+
shepherd <tool_name> --args '<json_object>'
|
|
221
77
|
```
|
|
222
78
|
|
|
223
|
-
The
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
Shepherd writes a concise `building/index.md` recent-work ledger plus detailed
|
|
228
|
-
session pages under `coding-sessions/` for MCP drill-in.
|
|
79
|
+
The CLI dynamically lists/calls the same production MCP memory/wiki/evidence
|
|
80
|
+
tools available to the authenticated customer, plus local setup/status tools.
|
|
81
|
+
Do not pass `--env` for normal customer setup or tool calls; the default is the
|
|
82
|
+
Production Customer `deploy` lane.
|
|
229
83
|
|
|
230
|
-
|
|
84
|
+
For authenticated `askshepherd.ai` accounts only, target another deployed
|
|
85
|
+
environment for tool listing, tool execution, and backend data together:
|
|
231
86
|
|
|
232
87
|
```sh
|
|
233
|
-
|
|
234
|
-
|
|
88
|
+
shepherd mcp-login --env canary --no-install
|
|
89
|
+
shepherd tools --env canary --json
|
|
90
|
+
shepherd <tool_name> --env customer-facing --args '<json_object>'
|
|
235
91
|
```
|
|
236
92
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
Local Messages sync on macOS needs Full Disk Access. During onboarding, Shepherd asks the user to grant or confirm Full Disk Access for:
|
|
240
|
-
|
|
241
|
-
- the app running onboarding, such as Terminal, iTerm, Claude Code, or Codex
|
|
242
|
-
- the Node.js binary used by the background LaunchAgent
|
|
243
|
-
|
|
244
|
-
The Messages selector validates access to `~/Library/Messages/chat.db`, opens System Settings -> Privacy & Security -> Full Disk Access if access is missing, and keeps checking in interactive onboarding until access works. Background sync install also checks that launchd can start the Messages agent. Contacts permission may also appear when Shepherd resolves local contact names. The background agent reloads Contacts on startup, watches AddressBook changes when available, and runs a periodic fallback sync so renamed contacts can hydrate prior ingested Messages rows for that customer account.
|
|
245
|
-
|
|
246
|
-
Open the local Messages chat selector:
|
|
93
|
+
Check wiki readiness explicitly before memory/wiki answers when setup just
|
|
94
|
+
finished or readiness is uncertain:
|
|
247
95
|
|
|
248
96
|
```sh
|
|
249
|
-
|
|
97
|
+
shepherd shepherd_wiki_status
|
|
250
98
|
```
|
|
251
99
|
|
|
252
|
-
|
|
100
|
+
If it returns `status: "wiki_not_ready"`, agents should report progress/ETA and
|
|
101
|
+
wait instead of answering from incomplete memory.
|
|
253
102
|
|
|
254
|
-
|
|
103
|
+
## Skill
|
|
255
104
|
|
|
256
|
-
|
|
105
|
+
Print the bundled agent skill:
|
|
257
106
|
|
|
258
107
|
```sh
|
|
259
|
-
|
|
108
|
+
shepherd skill
|
|
260
109
|
```
|
|
261
110
|
|
|
262
|
-
|
|
111
|
+
Install it into Codex:
|
|
263
112
|
|
|
264
113
|
```sh
|
|
265
|
-
|
|
114
|
+
shepherd skill --install codex
|
|
266
115
|
```
|
|
267
116
|
|
|
268
|
-
|
|
117
|
+
The skill teaches agents how to onboard users, check setup and wiki readiness,
|
|
118
|
+
use exact Shepherd tools, avoid local filesystem probing for Shepherd setup,
|
|
119
|
+
and handle broad memory questions with iMessage-agent-style evidence behavior.
|
|
269
120
|
|
|
270
|
-
|
|
121
|
+
## Runtime Internals
|
|
271
122
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
123
|
+
The package still ships the `shepherd-onboard` engine binary for local runtime
|
|
124
|
+
entrypoints used by MCP clients, Messages sync, Coding Sessions sync, and the
|
|
125
|
+
macOS app. The public user-facing CLI is `shepherd`.
|