drivethrough-cli 0.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/LICENSE +21 -0
- package/README.md +58 -0
- package/bin/dt.mjs +19 -0
- package/dist/main.mjs +26476 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tim Diehl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Drivethrough
|
|
2
|
+
|
|
3
|
+
Agent-first hosting. Say what you want. Stay in the car.
|
|
4
|
+
|
|
5
|
+
If you're an AI agent (or setting one up), start here:
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npx drivethrough-cli agent-setup
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That writes a `SKILL.md` and `AGENTS.md` teaching your agent the full workflow,
|
|
12
|
+
and prints the MCP config snippet for MCP-capable clients.
|
|
13
|
+
|
|
14
|
+
## Quick start
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npx drivethrough-cli login # device flow — approve in the browser
|
|
18
|
+
npx drivethrough-cli deploy . # deploys ./dist if present, else the directory
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Sites are **private by default**. Share one with a guest link:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
npx drivethrough-cli share my-site
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## MCP server
|
|
28
|
+
|
|
29
|
+
Run the stdio MCP server for agent tooling:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"drivethrough": { "command": "npx", "args": ["-y", "drivethrough-cli", "mcp"] }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
No local shell (claude.ai chat, mobile)? Use the hosted server instead:
|
|
40
|
+
`https://mcp.drivethrough.dev/mcp` (OAuth, approved once in the browser).
|
|
41
|
+
|
|
42
|
+
## Agent-friendly by design
|
|
43
|
+
|
|
44
|
+
- Every command supports `--json` (machine-readable, non-interactive).
|
|
45
|
+
- Commands are idempotent — re-running a deploy ships a new version, re-running
|
|
46
|
+
login on a logged-in machine succeeds quietly.
|
|
47
|
+
- Errors are structured with a `code`, a human `message`, and a `next` step so
|
|
48
|
+
agents can self-correct.
|
|
49
|
+
|
|
50
|
+
Declare site behavior (forms, RSVPs, leads) in a `drivethrough.json` at the
|
|
51
|
+
project root — the platform provisions the database and owns the write path.
|
|
52
|
+
Run `npx drivethrough-cli agent-setup --skill` for the full guide.
|
|
53
|
+
|
|
54
|
+
## Links
|
|
55
|
+
|
|
56
|
+
- Dashboard: <https://drivethrough.dev>
|
|
57
|
+
- Installed commands are `drivethrough` and `dt` (the npm package is
|
|
58
|
+
`drivethrough-cli`; the plain name was taken).
|
package/bin/dt.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Dual-mode launcher. The published tarball ships only dist/ (bundled by
|
|
3
|
+
// scripts/build.mjs); the monorepo has no build step and runs TypeScript
|
|
4
|
+
// source via tsx. Source presence picks the mode, so a stale dist/ can
|
|
5
|
+
// never shadow src/ during development.
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
9
|
+
|
|
10
|
+
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
const srcEntry = path.join(here, "..", "src", "main.ts");
|
|
12
|
+
|
|
13
|
+
if (existsSync(srcEntry)) {
|
|
14
|
+
const { register } = await import("tsx/esm/api");
|
|
15
|
+
register();
|
|
16
|
+
await import(pathToFileURL(srcEntry).href);
|
|
17
|
+
} else {
|
|
18
|
+
await import("../dist/main.mjs");
|
|
19
|
+
}
|