drexler 0.1.0 → 0.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 +146 -32
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,84 +1,198 @@
|
|
|
1
1
|
# Drexler
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/drexler)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://bun.sh)
|
|
6
|
+
|
|
3
7
|
CLI chat with **Drexler**, a corporate-executive AI persona who speaks in broken third-person and treats every conversation like a hostile takeover. Built with Bun + TypeScript. Talks to OpenRouter's Gemma 4 31B model (paid).
|
|
4
8
|
|
|
5
9
|
> "Drexler usually charge consulting fee for this. Today, pro bono. You welcome."
|
|
6
10
|
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Quickstart
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
bun add -g drexler
|
|
17
|
+
drexler
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
That's it. First launch prompts for an OpenRouter API key (free at <https://openrouter.ai/keys>) and remembers it. Subsequent launches skip the prompt.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
7
24
|
## Install
|
|
8
25
|
|
|
9
|
-
|
|
26
|
+
### 1. Install Bun (skip if already installed)
|
|
27
|
+
|
|
28
|
+
Bun ≥ 1.1 is required. Install once per machine:
|
|
29
|
+
|
|
30
|
+
| Platform | Command |
|
|
31
|
+
| --------------- | -------------------------------------------------------------------- |
|
|
32
|
+
| **macOS/Linux** | `curl -fsSL https://bun.sh/install \| bash` |
|
|
33
|
+
| **Homebrew** | `brew install oven-sh/bun/bun` |
|
|
34
|
+
| **Windows** | `powershell -c "irm bun.sh/install.ps1 \| iex"` |
|
|
35
|
+
| **npm** | `npm install -g bun` |
|
|
36
|
+
|
|
37
|
+
Verify: `bun --version` → should print `1.1.0` or higher.
|
|
38
|
+
|
|
39
|
+
### 2. Install Drexler globally
|
|
10
40
|
|
|
11
41
|
```bash
|
|
12
42
|
bun add -g drexler
|
|
13
43
|
```
|
|
14
44
|
|
|
15
|
-
|
|
45
|
+
This installs the `drexler` command into `~/.bun/bin/drexler`. Make sure `~/.bun/bin` is on your `$PATH` (Bun's installer does this automatically; if not, add `export PATH="$HOME/.bun/bin:$PATH"` to your shell rc).
|
|
46
|
+
|
|
47
|
+
### 3. Run it
|
|
16
48
|
|
|
17
49
|
```bash
|
|
18
50
|
drexler
|
|
19
51
|
```
|
|
20
52
|
|
|
21
|
-
|
|
53
|
+
On first run you'll see:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
Drexler notice no API key on file. Even CEO need credentials.
|
|
57
|
+
Get free key at: https://openrouter.ai/keys
|
|
58
|
+
Enter OpenRouter API key:
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Paste the key, hit return. Drexler saves it to `~/.config/drexler/config.json` (mode `0600`) and boots into the chat. Done.
|
|
62
|
+
|
|
63
|
+
---
|
|
22
64
|
|
|
23
|
-
|
|
65
|
+
## Update
|
|
24
66
|
|
|
25
67
|
```bash
|
|
26
68
|
bun update -g drexler
|
|
27
69
|
```
|
|
28
70
|
|
|
29
|
-
|
|
71
|
+
## Uninstall
|
|
30
72
|
|
|
31
73
|
```bash
|
|
32
74
|
bun remove -g drexler
|
|
33
75
|
rm -rf ~/.config/drexler # optional: wipe stored key + settings
|
|
34
76
|
```
|
|
35
77
|
|
|
36
|
-
|
|
78
|
+
---
|
|
37
79
|
|
|
38
|
-
|
|
39
|
-
git clone https://github.com/showOS/Drexler.git && cd Drexler
|
|
40
|
-
bun install
|
|
41
|
-
bun run start
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Optional: `cp .env.example .env` and paste the key into `OPENROUTER_API_KEY=...` to skip the first-run prompt.
|
|
80
|
+
## Usage
|
|
45
81
|
|
|
46
|
-
|
|
82
|
+
### Flags
|
|
47
83
|
|
|
48
|
-
|
|
49
|
-
|
|
84
|
+
| flag | what |
|
|
85
|
+
| --------------------------------- | ----------------------------------------------------------------- |
|
|
86
|
+
| `--model <31b\|26b\|vendor/name>` | switch model (alias or full OpenRouter id, e.g. `google/gemma-4-31b-it`) |
|
|
87
|
+
| `--persona <path>` | load a custom persona markdown file instead of bundled `drexler.md` |
|
|
88
|
+
| `--theme <apollo\|amber\|mono>` | color theme (default `apollo`) |
|
|
89
|
+
| `--version`, `-v` | print version |
|
|
90
|
+
| `--help`, `-h` | print usage |
|
|
50
91
|
|
|
51
|
-
|
|
92
|
+
### Slash commands (inside the REPL)
|
|
52
93
|
|
|
53
|
-
| cmd
|
|
54
|
-
|
|
|
55
|
-
| `/help`
|
|
56
|
-
| `/clear`
|
|
57
|
-
| `/exit`
|
|
58
|
-
| `/synergy`
|
|
59
|
-
| `/model`
|
|
60
|
-
| `/history`
|
|
94
|
+
| cmd | what it do |
|
|
95
|
+
| -------------- | ------------------------------------------------ |
|
|
96
|
+
| `/help` | list directives |
|
|
97
|
+
| `/clear` | shred conversation history (system prompt pinned) |
|
|
98
|
+
| `/exit` | meeting adjourned |
|
|
99
|
+
| `/synergy` | SYNERGY! |
|
|
100
|
+
| `/model` | show current model, or `/model 26b` to switch |
|
|
101
|
+
| `/history` | message count + approx tokens |
|
|
102
|
+
| `/regenerate` | re-roll last response |
|
|
103
|
+
| `/save [path]` | archive conversation as markdown |
|
|
61
104
|
|
|
62
105
|
`Ctrl+C` exits gracefully with an in-character farewell.
|
|
63
106
|
|
|
107
|
+
---
|
|
108
|
+
|
|
64
109
|
## Configuration
|
|
65
110
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
111
|
+
Drexler reads config in this priority (later wins):
|
|
112
|
+
|
|
113
|
+
1. `~/.config/drexler/config.json` — written on first run
|
|
114
|
+
2. Environment variables
|
|
115
|
+
3. CLI flags
|
|
116
|
+
|
|
117
|
+
### Environment variables
|
|
118
|
+
|
|
119
|
+
| var | purpose |
|
|
120
|
+
| -------------------- | ---------------------------------------------------- |
|
|
121
|
+
| `OPENROUTER_API_KEY` | API key (overrides config file) |
|
|
122
|
+
| `DREXLER_MODEL` | model id or alias |
|
|
123
|
+
| `DREXLER_THEME` | `apollo` / `amber` / `mono` |
|
|
124
|
+
| `XDG_CONFIG_HOME` | override config dir (default `~/.config/drexler`) |
|
|
125
|
+
| `NO_COLOR` | disable colors entirely |
|
|
126
|
+
|
|
127
|
+
### Config file
|
|
128
|
+
|
|
129
|
+
`~/.config/drexler/config.json`:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"apiKey": "sk-or-v1-...",
|
|
134
|
+
"model": "google/gemma-4-31b-it",
|
|
135
|
+
"maxHistory": 50,
|
|
136
|
+
"personaPath": "/optional/path/to/custom-persona.md",
|
|
137
|
+
"theme": "apollo"
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Default `maxHistory`: 50 messages.
|
|
142
|
+
|
|
143
|
+
---
|
|
69
144
|
|
|
70
145
|
## Models
|
|
71
146
|
|
|
72
|
-
|
|
73
|
-
|
|
147
|
+
| alias | id | notes |
|
|
148
|
+
| ------ | ----------------------------------- | ------------------------------ |
|
|
149
|
+
| `31b` | `google/gemma-4-31b-it` | primary (paid) |
|
|
150
|
+
| `26b` | `google/gemma-4-26b-a4b-it` | fallback, auto-retry on 429 |
|
|
151
|
+
|
|
152
|
+
Pass `--model vendor/name:tag` for any other OpenRouter-compatible model.
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## From source (development)
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
git clone https://github.com/showOS/Drexler.git
|
|
160
|
+
cd Drexler
|
|
161
|
+
bun install
|
|
162
|
+
cp .env.example .env # then edit, paste key into OPENROUTER_API_KEY=
|
|
163
|
+
bun run start
|
|
164
|
+
```
|
|
74
165
|
|
|
75
|
-
|
|
166
|
+
### Tests + typecheck
|
|
76
167
|
|
|
77
168
|
```bash
|
|
78
169
|
bun test
|
|
79
170
|
bun run typecheck
|
|
80
171
|
```
|
|
81
172
|
|
|
173
|
+
### Releasing a new version
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
npm version patch # bumps package.json, commits, tags
|
|
177
|
+
git push --follow-tags # CI publishes to npm automatically
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The `.github/workflows/publish.yml` workflow runs typecheck + tests + `npm publish --provenance` on every `v*` tag push.
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Troubleshooting
|
|
185
|
+
|
|
186
|
+
| symptom | fix |
|
|
187
|
+
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
188
|
+
| `command not found: drexler` | Add `~/.bun/bin` to `$PATH`, or restart shell |
|
|
189
|
+
| `command not found: bun` | Install Bun (see [Install](#install) section above) |
|
|
190
|
+
| `API key rejected by OpenRouter` | Update key: `rm ~/.config/drexler/config.json` and re-run `drexler`, or export `OPENROUTER_API_KEY` |
|
|
191
|
+
| Garbled box-drawing characters | Use a UTF-8 terminal with a Nerd Font (e.g. iTerm2, Alacritty, WezTerm) |
|
|
192
|
+
| Want to switch themes mid-session | `drexler --theme amber` (or `mono`) on next launch |
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
82
196
|
## License
|
|
83
197
|
|
|
84
|
-
MIT.
|
|
198
|
+
MIT — see [LICENSE](./LICENSE).
|