inkless 0.0.0-stage → 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 +65 -2
- package/bin/inkless.js +10 -0
- package/console-dist/assets/BlueprintTool-CLWuM21a.js +4226 -0
- package/console-dist/assets/index-CIqLZU6s.js +33 -0
- package/console-dist/assets/index-Dv7Gg9qm.css +1 -0
- package/console-dist/favicon.svg +11 -0
- package/console-dist/index.html +18 -0
- package/native/linux/rfcomm.py +84 -0
- package/native/macos/build/InklessBluetooth.app/Contents/Info.plist +26 -0
- package/native/macos/build/InklessBluetooth.app/Contents/MacOS/InklessBluetooth +0 -0
- package/native/macos/build/InklessBluetooth.app/Contents/_CodeSignature/CodeResources +115 -0
- package/package.json +60 -4
- package/skills/inkless/SKILL.md +213 -0
- package/src/core/bits.js +143 -0
- package/src/core/blueprint/demos.js +119 -0
- package/src/core/blueprint/geometry.js +232 -0
- package/src/core/blueprint/index.js +100 -0
- package/src/core/blueprint/layout.js +210 -0
- package/src/core/blueprint/mesh.js +101 -0
- package/src/core/blueprint/methods.js +95 -0
- package/src/core/blueprint/remesh.js +250 -0
- package/src/core/blueprint/slice.js +134 -0
- package/src/core/blueprint/unfold.js +185 -0
- package/src/core/design/codes.js +39 -0
- package/src/core/design/filters.js +109 -0
- package/src/core/design/render.js +317 -0
- package/src/core/design/schema.js +132 -0
- package/src/core/formats/fit.js +46 -0
- package/src/core/formats/index.js +210 -0
- package/src/core/formats/library.js +341 -0
- package/src/core/formats/share.js +65 -0
- package/src/core/index.js +15 -0
- package/src/core/printers/hp6.js +160 -0
- package/src/core/printers/index.js +14 -0
- package/src/core/printers/pm290.js +115 -0
- package/src/core/session.js +56 -0
- package/src/node/artwork.js +33 -0
- package/src/node/cli.js +430 -0
- package/src/node/console/actions.js +30 -0
- package/src/node/console/client.js +68 -0
- package/src/node/console/paths.js +8 -0
- package/src/node/console/server.js +286 -0
- package/src/node/design.js +99 -0
- package/src/node/formats.js +39 -0
- package/src/node/frames.js +93 -0
- package/src/node/index.js +6 -0
- package/src/node/kit.js +12 -0
- package/src/node/skill.js +44 -0
- package/src/node/transports/index.js +21 -0
- package/src/node/transports/linux.js +52 -0
- package/src/node/transports/macos.js +81 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Juan Cruz Fortunatti
|
|
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
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/apresmoi/inkless/main/docs/assets/inkless-hero.webp" width="1280" alt="Labels printed with inkless: a parts bin label, a name badge, a Wi-Fi QR, a 3D pen piece and a cable flag.">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
# inkless
|
|
6
|
+
|
|
7
|
+
Print stickers and labels on cheap Bluetooth thermal printers from your terminal or your
|
|
8
|
+
coding agent. No ink, no vendor app, no account.
|
|
9
|
+
|
|
10
|
+
[Website](https://inkless.sh) · [Label designer](https://inkless.sh/label/) · [Docs](https://inkless.sh/introduction/) · [GitHub](https://github.com/apresmoi/inkless)
|
|
11
|
+
|
|
12
|
+
## Printers
|
|
13
|
+
|
|
14
|
+
| Printer | Paper |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| **PM290** (also sold as Labelnize, TYPONOS) | 48 mm print on 54 mm sticker rolls, any length |
|
|
17
|
+
| **HP6-C** | 36 x 12 mm labels on 12 mm tape |
|
|
18
|
+
|
|
19
|
+
macOS and Linux, Node 22 or newer. Pair the printer in your Bluetooth settings and close its
|
|
20
|
+
phone app first. On macOS a small background app holds the Bluetooth link and asks for
|
|
21
|
+
permission the first time; on Linux inkless uses BlueZ.
|
|
22
|
+
|
|
23
|
+
## Use
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx inkless preview photo.jpg # the exact black-and-white result as a PNG
|
|
27
|
+
npx inkless check # the printer answers; nothing prints
|
|
28
|
+
npx inkless print photo.jpg # prints, then waits until the printer says done
|
|
29
|
+
npx inkless print "Hello\nworld" --size 48x20
|
|
30
|
+
npx inkless formats # 15 ready-made label formats
|
|
31
|
+
npx inkless print --format parts-bin --set name="M4 NUTS" --set bin=12
|
|
32
|
+
npx inkless blueprint duck.glb --method unfold --size 120 --out duck.json
|
|
33
|
+
npx inkless console # the label designer on a local page
|
|
34
|
+
npx inkless help # every command and option
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- `print` and `preview` take an image, a text file, quoted text, `-` for stdin, or a
|
|
38
|
+
[design file](https://inkless.sh/reference/design-format/) (JSON, one page per label).
|
|
39
|
+
- `--printer hp6 --address <MAC>` targets the HP6-C. It forgets its pairing whenever its
|
|
40
|
+
phone app connects, so select it by address (`npx inkless printers` lists them).
|
|
41
|
+
- `--style floyd|atkinson|ordered|threshold` picks how a photo's grays become dots.
|
|
42
|
+
- Nothing is retried on its own; a print succeeds only when the printer reports it finished.
|
|
43
|
+
|
|
44
|
+
## With your coding agent
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
npx inkless skill install # any coding agent that reads skills
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The agent drafts a label, opens it with `inkless console show label.json`, and waits with
|
|
51
|
+
`inkless console wait` while you adjust it in the browser. It prints only after you press
|
|
52
|
+
Approve.
|
|
53
|
+
|
|
54
|
+
## As a library
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
import { renderDesign, getPrinter, runSession, listFormats, fillFormat } from "inkless"; // browser-safe
|
|
58
|
+
import { makeBlueprint, loadModel } from "inkless/blueprint"; // 3D pen blueprints
|
|
59
|
+
import { openTransport } from "inkless/node"; // Bluetooth from Node
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`renderDesign` turns a design into the exact dots each page burns, `getPrinter(id).buildJob`
|
|
63
|
+
turns dots into that printer's bytes, and `runSession` sends them over any transport with
|
|
64
|
+
`write`, `onData` and `mtu`.
|
|
65
|
+
|
|
66
|
+
MIT licensed.
|
package/bin/inkless.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { main } from "../src/node/cli.js";
|
|
3
|
+
|
|
4
|
+
main(process.argv.slice(2)).then((code) => {
|
|
5
|
+
if (code) process.exitCode = code;
|
|
6
|
+
}, (error) => {
|
|
7
|
+
console.error(`inkless: ${error.message}`);
|
|
8
|
+
if (error.usage) console.error("run inkless help for usage");
|
|
9
|
+
process.exitCode = 1;
|
|
10
|
+
});
|