Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CLI checks
on:
pull_request:
push:
branches: [master]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
node: [22, 24]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run check
- run: npm run test:package
42 changes: 42 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish CLI to npm
on:
workflow_dispatch:
inputs:
version:
description: Exact version already committed on master
required: true
type: string
channel:
description: npm distribution tag
required: true
default: next
type: choice
options: [next, latest]
permissions:
contents: read
concurrency:
group: cli-npm-release
cancel-in-progress: false
jobs:
publish:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
environment: npm
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: https://registry.npmjs.org
- name: Verify requested release
env:
RELEASE_VERSION: ${{ inputs.version }}
run: node --input-type=module -e "import fs from 'node:fs'; import assert from 'node:assert/strict'; assert.equal(JSON.parse(fs.readFileSync('package.json')).version, process.env.RELEASE_VERSION);"
- run: npm ci
- name: Publish implementation and alias
env:
RELEASE_CHANNEL: ${{ inputs.channel }}
run: npm run release:publish -- --tag "$RELEASE_CHANNEL"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
artifacts/
*.tgz
*.tsbuildinfo
.env
Expand Down
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# DealMachine CLI

This repository owns the public `@dealmachine/cli` package, the `dealmachine` npm alias, and the existing agent plugin assets. Start with [development](docs/development.md), [releases](docs/releases.md), and the [Command reference](docs/commands.md).

Use `codex/` task branches and PRs into `master`. Inspect Git status before editing and preserve unrelated work. Node.js 22.18 or newer is recommended for development; the shipped CLI supports Node.js 18 and newer.

Public Commands live in `src/commands`; HTTP, configuration and output helpers live in `src/lib`. Keep ESM `.js` import extensions in TypeScript. The repository builds independently with `npm ci` and `npm run check`. No Next checkout, database or API credentials are needed for those checks.

Do not copy private beta Commands, private references, application credentials or backend source from Next into this public repository. Next's private CLI extends the installed npm artifact. Keep the public artifact guard and packed-install check passing. The bundled CLI Playbook lives at `playbook/PLAYBOOK.md`; the existing MCP-oriented agent plugin lives under `skills/dealmachine`. They have different execution surfaces.

Use the existing behavioral tests for changed Commands. Run `npm run check` and `npm run test:package` for packaging or release changes. Cold-start published/deployed evaluations contact external services and are separate release verification.

Set versions with `npm run release:version -- <version>` so the canonical package, alias and lockfile agree. A release requires an explicit channel and approved release scope. Publishing the CLI does not deploy the API, MCP server, docs site or Next app.

Call CLI capabilities Commands, API capabilities Endpoints, and distributable agent instructions Playbooks. Write concrete copy and do not add em dashes to docs or comments.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# DealMachine CLI

Maintainers: [agent instructions](AGENTS.md), [development](docs/development.md), [current Command reference](docs/commands.md), and [npm releases](docs/releases.md).

DealMachine CLI (`dm`) -- property intelligence from the command line.

A standalone Commander.js CLI that talks to the DealMachine REST API. Provides **17 command groups** covering agent guidance, authentication, property search, people lookup, enrichment, comps, list management, and developer utilities. Compiles to a single ESM bundle via `tsc`.
A standalone Commander.js CLI that talks to the DealMachine REST API. Provides Commands for authentication, property and people research, enrichment, lists, prospects, tags, webhooks, mail and developer utilities. Compiles to ESM JavaScript via `tsc`.

This package has **zero** `@dealmachine/*` dependencies -- it is a self-contained binary that communicates exclusively through the public API.

Expand Down Expand Up @@ -106,15 +108,15 @@ The canonical implementation package is `@dealmachine/cli`. The `dealmachine` pa
### From source

```bash
cd packages/cli
cd dealmachine-cli
npm run build
node dist/index.js whoami
```

### Link for local development

```bash
cd packages/cli
cd dealmachine-cli
npm link
dm --version
```
Expand Down Expand Up @@ -256,7 +258,7 @@ dm agents playbook --json
dm agents skill # alias
```

The public CLI source keeps its bundled Playbook at `playbook/PLAYBOOK.md`. Monorepo builds can also copy `packages/playbooks/playbook/SKILL.md`. The build writes the selected source to `dist/agents/dealmachine-playbook.md`, so the command works from a published CLI package as well as a local source checkout.
The public CLI source keeps its bundled Playbook at `playbook/PLAYBOOK.md`. The build writes the selected source to `dist/agents/dealmachine-playbook.md`, so the command works from a published CLI package as well as a local source checkout.

#### `dm agents install claude-code`

Expand Down Expand Up @@ -423,7 +425,7 @@ Output:
Credit Usage
──────────────────────────────────────────────────
Plan: Pro
Cycle: Mar 1, 2026 — Mar 31, 2026
Cycle: Mar 1, 2026 : Mar 31, 2026

Credits: 4,200 / 10,000 (42%)
Remaining: 5,800
Expand Down Expand Up @@ -1135,7 +1137,7 @@ Batches larger than 250 items are automatically chunked with progress spinners.
## Project Structure

```
packages/cli/
dealmachine-cli/
scripts/
copy-agent-assets.mjs # Bundles the Playbook Markdown into dist/agents
src/
Expand Down Expand Up @@ -1201,7 +1203,7 @@ For distribution as a standalone binary without npm:

```bash
# Build
cd packages/cli
cd dealmachine-cli
npm run build

# The entire dist/ directory is the distributable artifact
Expand Down
Loading
Loading