@dev-adoption/cli 0.1.8

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 ADDED
@@ -0,0 +1,190 @@
1
+ # dai — Developer Adoption Intelligence CLI
2
+
3
+ `dai` is the terminal companion for the Developer Adoption Intelligence platform. It lets developers manage their stack, submit challenges, pull public AI Adoption Score proof, and check live rankings without leaving the terminal.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @dev-adoption/cli
9
+ # or
10
+ pnpm add -g @dev-adoption/cli
11
+ ```
12
+
13
+ Use the published npm package directly:
14
+
15
+ ```bash
16
+ npx -y @dev-adoption/cli@0.1.8 --help
17
+ ```
18
+
19
+ ## Quick start
20
+
21
+ ```bash
22
+ dai login
23
+ dai whoami
24
+ dai stack sync # reads package.json and pushes your public stack
25
+ dai rank # live public rankings from /api/v1/adoption
26
+ dai notifications # unread signals
27
+ dai digest # your personalized weekly digest
28
+ dai proof openai-api # public adoption proof for a tool
29
+ dai project draft --json # infer a project draft from the current repo
30
+ dai project publish --yes # publish the repo to tokens&
31
+ dai mcp serve # MCP server for Cursor/Codex
32
+ ```
33
+
34
+ ## Commands
35
+
36
+ | Command | Purpose |
37
+ | --- | --- |
38
+ | `dai login` | Device-code OAuth login. |
39
+ | `dai logout` | Clear saved credentials. |
40
+ | `dai whoami` | Show the signed-in account. |
41
+ | `dai stack add <tool>` | Add a tool to your public stack. |
42
+ | `dai stack remove <tool>` | Remove a tool from your stack. |
43
+ | `dai stack sync` | Sync local `package.json` into your stack. |
44
+ | `dai submit <challenge>` | Submit a challenge entry (use `--file` to attach). |
45
+ | `dai proof <tool-slug>` | Fetch public adoption proof from `/api/v1/adoption`. |
46
+ | `dai rank [tool-slug]` | Show live AI Adoption Score rankings or one tool rank. |
47
+ | `dai notifications` | List unread notifications. |
48
+ | `dai digest` | Print this week’s personalized digest. |
49
+ | `dai project draft` | Infer title, repo, stack, and missing fields from the current repo. |
50
+ | `dai project publish --yes` | Publish the current repo to tokens& after reviewing the draft. |
51
+ | `dai mcp serve` | Expose builder, enterprise-session, approval-only enterprise-motion drafts, and project-publishing context over MCP. |
52
+
53
+ ## Flags
54
+
55
+ - `--json` – emit raw JSON responses (great for piping into `jq`).
56
+ - `--api <url>` – override the API base URL (useful for self-hosted tenants).
57
+ - `--mode <auto|public|developer|enterprise>` – set the MCP persona mode explicitly.
58
+
59
+ ## Public score commands
60
+
61
+ ```bash
62
+ dai rank --api https://tokensand.com
63
+ dai rank openai-api --json
64
+ dai proof langsmith
65
+ ```
66
+
67
+ Rank and proof commands use the public adoption API. The CLI does not print cached placeholder ranks.
68
+
69
+ ## Cursor / Codex / Claude Code MCP
70
+
71
+ Install the public MCP config first to expose stack search, public perks, adoption evidence, builder briefs, and enterprise session briefs inside Cursor or Codex. Developer `build_brief` responses include best APIs, cost drivers, free credits/perks, adoption evidence, and dashboard sync status for builds such as customer agents. Generate a workflow config from the project page or project publish page when you want private saved stack, Build Packet, or project proof context.
72
+
73
+ Codex and Cursor do not inherit your Tokens& browser login. The MCP server decides what it can access from env/config:
74
+
75
+ - `DAI_TOKEN` unlocks private builder context.
76
+ - `DAI_MODE=enterprise` makes enterprise intent explicit.
77
+ - `DAI_ORGANIZATION_ID` and `DAI_ENTERPRISE_PROFILE` label enterprise workspace/profile context.
78
+ - `DAI_ENTERPRISE_TOKEN` is reserved for scoped enterprise credentials; do not paste browser cookies into MCP config.
79
+
80
+ Public tools work without `DAI_TOKEN`:
81
+
82
+ - `get_account_mode`
83
+ - `search_tools`
84
+ - `find_perks`
85
+ - `get_adoption_rank`
86
+ - `build_brief`
87
+ - `enterprise_session_brief`
88
+ - `draft_enterprise_session_motion`
89
+ - `draft_adoption_session`
90
+ - `draft_builder_invite_motion`
91
+ - `draft_icp_invite_batch`
92
+ - `draft_partner_onboarding_motion`
93
+ - `draft_partner_invite`
94
+ - `draft_adoption_proof_motion`
95
+
96
+ With `DAI_TOKEN`, the server also exposes private context:
97
+
98
+ - `dai://developer/context` and `dai://developer/context.md`
99
+ - `dai://developer/build-packet` and `dai://developer/build-packet.md`
100
+ - `get_context`
101
+ - `get_build_packet`
102
+ - `draft_project`
103
+ - `publish_project`
104
+ - approval-gated draft tools: `update_build_progress`, `attach_repo`, `record_launch_event`, `submit_stack_feedback`
105
+
106
+ ```bash
107
+ npx -y @dev-adoption/cli@0.1.8 mcp serve --api https://tokensand.com
108
+ # Add DAI_TOKEN=dai_xxx for private context tools.
109
+ ```
110
+
111
+ Enterprise mode:
112
+
113
+ ```bash
114
+ DAI_MODE=enterprise DAI_ENTERPRISE_PROFILE=redis npx -y @dev-adoption/cli@0.1.8 mcp serve --api https://tokensand.com --mode enterprise
115
+ ```
116
+
117
+ Ask the agent:
118
+
119
+ ```text
120
+ Use Tokens& build_brief for a customer support agent built with Codex. Which APIs should I use, what free credits are available, what are the main cost drivers, and will this build appear in my Tokens& dashboard?
121
+ ```
122
+
123
+ The public builder brief returns a stack/API plan, credit/perk plan, cost guardrails, adoption evidence, and a dashboard sync boundary. It does not create a project record by itself; builds appear in Tokens& after `DAI_TOKEN` plus `draft_project` and confirmed `publish_project`.
124
+
125
+ Ask the enterprise agent:
126
+
127
+ ```text
128
+ Use Tokens& enterprise_session_brief to analyze this Redis session: budget $45k, 180 registrations, 102 attended, 54 builders, 31 first successes, 14 retained, 9 proof projects. What are the cost per proof, best ICP, event/session format, and dashboard sync status?
129
+ ```
130
+
131
+ The enterprise promise is one loop: create a tracked developer session, invite the right builders, invite partner companies, and prove adoption. Use `enterprise_session_brief` for analysis, then use the draft-only tools to prepare the motion where the enterprise operator already works:
132
+
133
+ - `draft_enterprise_session_motion` / `draft_adoption_session`
134
+ - `draft_builder_invite_motion`
135
+ - `draft_icp_invite_batch`
136
+ - `draft_partner_onboarding_motion` / `draft_partner_invite`
137
+ - `draft_adoption_proof_motion`
138
+
139
+ These tools return approval-ready plans with `approvalRequired: true`, `persisted: false`, `externalWrites: []`, and a `dashboardConfirmationUrl`. Tokens& creates tracking, partner intake, ICP preview, and proof. It does not create Luma/Zoom/Eventbrite pages or send external invites without approval. The enterprise brief returns funnel rates, cost-per-activation/proof math, ranked ICP guidance, recommended session format/cadence, offer mechanics, event/proof definitions, and dashboard handoff links. It is read-only unless a scoped token is configured; project/build records appear in Tokens& after `DAI_TOKEN` plus `draft_project` and confirmed `publish_project`.
140
+
141
+ For `draft_adoption_session`, use `sourceProvider` as `luma`, `partiful`, `eventbrite`, `zoom`, or `manual`, and pass `sourceUrl` as the public event/source link. Do not ask users to paste Luma/Partiful/Eventbrite/Zoom API keys into the draft tool; private API sync belongs in dashboard integrations.
142
+
143
+ Claude Code:
144
+
145
+ ```bash
146
+ claude mcp add --transport stdio tokensand -- npx -y @dev-adoption/cli@0.1.8 mcp serve --api https://tokensand.com
147
+ ```
148
+
149
+ Hosts can use the pinned package specifier:
150
+
151
+ ```bash
152
+ npx -y @dev-adoption/cli@0.1.8 mcp serve --api https://tokensand.com
153
+ ```
154
+
155
+ Publish command for maintainers:
156
+
157
+ ```bash
158
+ cd packages/cli
159
+ npm publish --access public
160
+ ```
161
+
162
+ From Cursor or Codex, use:
163
+
164
+ ```text
165
+ Publish this repo to tokens& with repo, demo, stack, and build notes. Draft first, then publish after I confirm.
166
+ ```
167
+
168
+ The MCP server can read the latest Build Packet before coding, then draft from local `package.json`, README, git remote, homepage/demo hints, and dependencies. It returns the public project URL and social share kit after publish. Approval-gated draft tools do not write to Tokens& or external systems in V1.
169
+
170
+ ## One-command publish
171
+
172
+ ```bash
173
+ DAI_TOKEN=dai_xxx npx -y @dev-adoption/cli@0.1.8 project draft --json
174
+ DAI_TOKEN=dai_xxx npx -y @dev-adoption/cli@0.1.8 project publish --demo https://your-demo.example --yes
175
+ ```
176
+
177
+ `draft` is non-mutating. `publish --yes` creates the public project only when approved tools can be inferred or explicit tools are passed through MCP.
178
+
179
+ ## Configuration
180
+
181
+ Credentials are stored in `~/.dai/config.json`. The CLI writes only a short-lived bearer token and the last-known email; no adoption data is cached locally.
182
+
183
+ ## Developing
184
+
185
+ ```bash
186
+ cd packages/cli
187
+ node bin/dai.mjs --help
188
+ ```
189
+
190
+ Zero runtime dependencies so the CLI ships in a few kilobytes and works on locked-down developer boxes.
package/bin/dai.mjs ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { run } from '../src/index.mjs'
3
+
4
+ run(process.argv.slice(2)).catch((err) => {
5
+ console.error(err?.message ?? err)
6
+ process.exit(1)
7
+ })
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@dev-adoption/cli",
3
+ "version": "0.1.8",
4
+ "description": "Tokens& agent-ready CLI and MCP server for stack briefs, builder perks, enterprise session insights, Build Packets, and project proof.",
5
+ "bin": {
6
+ "dai": "bin/dai.mjs"
7
+ },
8
+ "main": "./src/index.mjs",
9
+ "type": "module",
10
+ "files": [
11
+ "bin",
12
+ "src",
13
+ "README.md"
14
+ ],
15
+ "scripts": {
16
+ "start": "node bin/dai.mjs"
17
+ },
18
+ "engines": {
19
+ "node": ">=18.0.0"
20
+ },
21
+ "keywords": [
22
+ "developer-adoption",
23
+ "tokensand",
24
+ "cli",
25
+ "dai",
26
+ "mcp",
27
+ "codex",
28
+ "cursor",
29
+ "claude-code",
30
+ "stack",
31
+ "builder-perks",
32
+ "build-packets",
33
+ "adoption-proof"
34
+ ],
35
+ "license": "MIT",
36
+ "homepage": "https://tokensand.com/agents/install",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/giolux1235/directory-ai-tools.git",
40
+ "directory": "packages/cli"
41
+ },
42
+ "bugs": {
43
+ "url": "https://github.com/giolux1235/directory-ai-tools/issues"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ }
48
+ }