@consultancy-outfit/ai-draftsman-cli 0.0.0-stage → 1.1.1
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 +104 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5740 -0
- package/package.json +42 -4
package/README.md
CHANGED
|
@@ -1,3 +1,105 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AI Draftsman CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Standalone Node.js/TypeScript CLI for the AI Draftsman platform.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js 20+
|
|
8
|
+
- npm
|
|
9
|
+
|
|
10
|
+
## Install dependencies
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Run from source
|
|
17
|
+
|
|
18
|
+
Interactive default flow, Claude-Code style:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm run dev
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The CLI now defaults to:
|
|
25
|
+
- backend URL: `https://dev-api.aidraftsman.ai/`
|
|
26
|
+
- frontend URL: `https://dev-b2b.aidraftsman.ai/`
|
|
27
|
+
- browser login if you are not authenticated yet
|
|
28
|
+
- agent/model selection launcher after login, instead of asking for a base URL
|
|
29
|
+
|
|
30
|
+
Examples:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm run dev -- auth login
|
|
34
|
+
npm run dev -- auth status
|
|
35
|
+
npm run dev
|
|
36
|
+
npm run dev -- agents list
|
|
37
|
+
npm run dev -- agents run AGENT_ID --message "Summarize this project"
|
|
38
|
+
npm run dev -- chat complete --model gpt-4o-mini --message "Hello"
|
|
39
|
+
npm run dev -- conversations create --agent AGENT_ID
|
|
40
|
+
npm run dev -- conversations send CONVERSATION_ID --message "Continue the work"
|
|
41
|
+
npm run dev -- messages list CONVERSATION_ID
|
|
42
|
+
npm run dev -- session exec --model agent:AGENT_ID --message "Plan the next step"
|
|
43
|
+
npm run dev -- session start --model agent:AGENT_ID --durable
|
|
44
|
+
npm run dev -- session resume CONVERSATION_ID --model agent:AGENT_ID
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Build
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm run build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Install globally on your system
|
|
54
|
+
|
|
55
|
+
From npm:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install -g @consultancy-outfit/ai-draftsman-cli
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Or from this project folder:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm install
|
|
65
|
+
npm run build
|
|
66
|
+
npm install -g .
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Then use either command:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
aidraftsman --help
|
|
73
|
+
ad --help
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Windows PowerShell examples
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
npm install
|
|
80
|
+
npm run build
|
|
81
|
+
npm install -g .
|
|
82
|
+
ad
|
|
83
|
+
ad auth login
|
|
84
|
+
ad agents list
|
|
85
|
+
ad session start --model agent:AGENT_ID --durable
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Notes
|
|
89
|
+
|
|
90
|
+
- `session start --durable` creates a durable conversation when the model is `agent:<id>`.
|
|
91
|
+
- `session resume <conversationId> --model agent:<id>` continues by sending MCP messages to that conversation.
|
|
92
|
+
- Current `--stream` support is terminal-style rendering built on one-shot responses, not full token streaming yet.
|
|
93
|
+
|
|
94
|
+
## Images
|
|
95
|
+
|
|
96
|
+
Attach images (png, jpg, gif, webp; up to 5 MB each) in any of these ways:
|
|
97
|
+
|
|
98
|
+
```powershell
|
|
99
|
+
ad -i screenshot.png "what is wrong with this layout?" # interactive, first prompt
|
|
100
|
+
ad -p -i a.png -i b.png "compare these two" # print mode
|
|
101
|
+
ad "match this design: @mockup.png" # an @path to an image is attached too
|
|
102
|
+
ad chat complete --model agent:AGENT_ID --image shot.png --message "describe this"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The gateway must accept OpenAI-style `image_url` content parts, and the chosen model must support vision.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|