npm.io
0.1.10 • Published yesterdayCLI

@dev-adoption/cli

Licence
MIT
Version
0.1.10
Deps
0
Size
141 kB
Vulns
0
Weekly
0

dai — Developer Adoption Intelligence CLI

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.

Install

npm install -g @dev-adoption/cli
# or
pnpm add -g @dev-adoption/cli

Use the published npm package directly:

npx -y @dev-adoption/cli@0.1.9 --help

Quick start

dai login
dai whoami
dai stack sync                 # reads package.json and pushes your public stack
dai rank                       # live public rankings from /api/v1/adoption
dai notifications              # unread signals
dai digest                     # your personalized weekly digest
dai proof openai-api           # public adoption proof for a tool
dai project draft --json       # infer a project draft from the current repo
dai project publish --yes      # publish the repo to tokens&
dai mcp serve                  # MCP server for Cursor/Codex

Commands

Command Purpose
dai login Device-code OAuth login.
dai logout Clear saved credentials.
dai whoami Show the signed-in account.
dai stack add <tool> Add a tool to your public stack.
dai stack remove <tool> Remove a tool from your stack.
dai stack sync Sync local package.json into your stack.
dai submit <challenge> Submit a challenge entry (use --file to attach).
dai proof <tool-slug> Fetch public adoption proof from /api/v1/adoption.
dai rank [tool-slug] Show live AI Adoption Score rankings or one tool rank.
dai notifications List unread notifications.
dai digest Print this week’s personalized digest.
dai project draft Infer title, repo, stack, and missing fields from the current repo.
dai project publish --yes Publish the current repo to tokens& after reviewing the draft.
dai mcp serve Expose builder, enterprise-session, approval-only enterprise-motion drafts, and project-publishing context over MCP.

Flags

  • --json – emit raw JSON responses (great for piping into jq).
  • --api <url> – override the API base URL (useful for self-hosted tenants).
  • --mode <auto|public|developer|enterprise> – set the MCP persona mode explicitly.

Public score commands

dai rank --api https://tokensand.com
dai rank openai-api --json
dai proof langsmith

Rank and proof commands use the public adoption API. The CLI does not print cached placeholder ranks.

Cursor / Codex / Claude Code MCP

Install the public MCP config first to expose stack search, public perks, adoption evidence, builder briefs, and enterprise session briefs inside Codex, Cursor, or Claude Code. 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.

Fastest Codex install:

codex mcp add tokensand -- npx -y @dev-adoption/cli@latest mcp serve --api https://tokensand.com
codex mcp list

Then start a new Codex session and ask: Use Tokens& get_account_mode, then build_brief for this repo.

From the CLI, generate host config or run the doctor:

dai mcp install codex
dai mcp install codex --write
dai mcp doctor

Codex and Cursor do not inherit your Tokens& browser login. The MCP server decides what it can access from env/config:

  • DAI_TOKEN unlocks private builder context.
  • DAI_MODE=enterprise makes enterprise intent explicit.
  • DAI_ORGANIZATION_ID and DAI_ENTERPRISE_PROFILE label enterprise workspace/profile context.
  • DAI_ENTERPRISE_TOKEN is reserved for scoped enterprise credentials; do not paste browser cookies into MCP config.

Public tools work without DAI_TOKEN:

  • get_account_mode
  • search_tools
  • find_perks
  • get_adoption_rank
  • build_brief
  • enterprise_session_brief
  • draft_enterprise_session_motion
  • draft_adoption_session
  • draft_builder_invite_motion
  • draft_icp_invite_batch
  • draft_partner_onboarding_motion
  • draft_partner_invite
  • draft_adoption_proof_motion

With DAI_TOKEN, the server also exposes private context:

  • dai://developer/context and dai://developer/context.md
  • dai://developer/build-packet and dai://developer/build-packet.md
  • get_context
  • get_build_packet
  • publish_agent_skill
  • draft_project
  • publish_project
  • approval-gated draft tools: update_build_progress, attach_repo, record_launch_event, submit_stack_feedback
npx -y @dev-adoption/cli@0.1.9 mcp serve --api https://tokensand.com
# Add DAI_TOKEN=dai_xxx for private context tools.

Enterprise mode:

DAI_MODE=enterprise DAI_ENTERPRISE_PROFILE=redis npx -y @dev-adoption/cli@0.1.9 mcp serve --api https://tokensand.com --mode enterprise

Ask the agent:

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?

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. Agent Skills can be shipped from the agent with publish_agent_skill: call once with a public skillUrl to parse a draft, review it with the user, then call again with confirm: true to create the Tokens& draft.

Ask the enterprise agent:

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?

The enterprise promise is one loop: get customers using your product by creating a tracked developer session, inviting the right builders, inviting partner companies, and proving adoption. Use enterprise_session_brief for analysis, then use the draft-only tools to prepare the motion where the enterprise operator already works:

  • draft_enterprise_session_motion / draft_adoption_session
  • draft_builder_invite_motion
  • draft_icp_invite_batch
  • draft_partner_onboarding_motion / draft_partner_invite
  • draft_adoption_proof_motion

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.

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.

Claude Code:

claude mcp add --transport stdio tokensand -- npx -y @dev-adoption/cli@0.1.9 mcp serve --api https://tokensand.com

Hosts can use the pinned package specifier:

npx -y @dev-adoption/cli@0.1.9 mcp serve --api https://tokensand.com

Publish command for maintainers:

cd packages/cli
npm publish --access public

From Cursor or Codex, use:

Publish this repo to tokens& with repo, demo, stack, and build notes. Draft first, then publish after I confirm.

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.

One-command publish

DAI_TOKEN=dai_xxx npx -y @dev-adoption/cli@0.1.9 project draft --json
DAI_TOKEN=dai_xxx npx -y @dev-adoption/cli@0.1.9 project publish --demo https://your-demo.example --yes

draft is non-mutating. publish --yes creates the public project only when approved tools can be inferred or explicit tools are passed through MCP.

Configuration

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.

Developing

cd packages/cli
node bin/dai.mjs --help

Zero runtime dependencies so the CLI ships in a few kilobytes and works on locked-down developer boxes.

Keywords