veyce 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.
Files changed (3) hide show
  1. package/README.md +80 -19
  2. package/dist/cli.js +1 -1
  3. package/package.json +6 -3
package/README.md CHANGED
@@ -1,27 +1,80 @@
1
1
  # veyce
2
2
 
3
- Deterministic avatars from your own image library — like DiceBear, but the
4
- faces are real images served by a veyce avatar service.
5
-
6
- - **Any seed works.** Email, username, uuid, `"hello world"`: the same seed
7
- always gets the same image, and it never 404s.
8
- - **Exact ids work too.** Ask for `raul` and you get `raul`, or a 404.
9
- - **Both at once.** `{ id, seed }` gives you the id if it exists and falls
10
- back to the seed if it doesn't.
11
- - Zero dependencies, ~2 KB gzipped, ESM + CJS + types. Browser, Node 18+,
12
- Bun, Deno, edge runtimes. Optional React component and a CLI.
3
+ **The JavaScript client for [veyce](https://veyce.vercel.app) — a free avatar
4
+ API that serves GTA VI character art as profile pictures.** No API key, no
5
+ sign-up, permissive CORS. Give it an email or username and you get the same
6
+ face back for that person every time.
7
+
8
+ <p>
9
+ <img src="https://veyce.vercel.app/api/gta-vi?seed=ada%40example.com&size=96&format=png" width="72" height="72" alt="avatar for ada@example.com" />
10
+ <img src="https://veyce.vercel.app/api/gta-vi?seed=grace%40example.com&size=96&format=png" width="72" height="72" alt="avatar for grace@example.com" />
11
+ <img src="https://veyce.vercel.app/api/gta-vi?seed=linus&size=96&format=png" width="72" height="72" alt="avatar for linus" />
12
+ <img src="https://veyce.vercel.app/api/gta-vi?seed=alan%40turing.dev&size=96&format=png" width="72" height="72" alt="avatar for alan@turing.dev" />
13
+ <img src="https://veyce.vercel.app/api/gta-vi?seed=42&size=96&format=png" width="72" height="72" alt="avatar for 42" />
14
+ <img src="https://veyce.vercel.app/api/gta-vi?seed=noah&size=96&format=png" width="72" height="72" alt="avatar for noah" />
15
+ </p>
16
+
17
+ <sub>These images are live, loaded straight from the veyce API, one per seed:
18
+ <code>ada@example.com</code>, <code>grace@example.com</code>, <code>linus</code>,
19
+ <code>alan@turing.dev</code>, <code>42</code>, <code>noah</code>.</sub>
20
+
21
+ ## What this package is
22
+
23
+ `veyce` doesn't contain any images and doesn't generate any. It's a small
24
+ (~2 KB gzipped, zero-dependency) wrapper around the hosted veyce API at
25
+ `https://veyce.vercel.app`, which holds a curated library of GTA VI character
26
+ images (Jason, Lucia, Cal, Boobie, Raul, Real Dimez and more) and serves them
27
+ resized and cropped to a circle or square on request.
28
+
29
+ The package gives you:
30
+
31
+ - **A URL builder.** `url()` and `srcSet()` are plain string functions with no
32
+ network calls, so they're safe to use in render functions, templates and
33
+ server components.
34
+ - **Fetch helpers.** Download bytes, get a `data:` URI, or check which image a
35
+ seed lands on with a `HEAD` request.
36
+ - **Offline seed picks.** Fetch the image index once, then map seeds to images
37
+ locally and get the same answer the API would give.
38
+ - **A React `<Avatar>`** with `srcSet`, lazy loading and fixed dimensions so
39
+ the layout doesn't shift.
40
+ - **A CLI**: `npx veyce get --seed you@example.com`.
41
+
42
+ It runs in browsers, Node 18+, Bun, Deno and edge runtimes, and ships ESM, CJS
43
+ and TypeScript types.
13
44
 
14
45
  ```bash
15
46
  npm install veyce
16
47
  ```
17
48
 
49
+ ## Picking an avatar
50
+
51
+ There are two ways to ask for an image, and you can combine them.
52
+
53
+ **By seed.** Pass any string (an email, username, uuid or number). The same
54
+ seed always gets the same image, and a seed never 404s:
55
+
56
+ | seed | | seed | |
57
+ | --- | --- | --- | --- |
58
+ | `ada@example.com` | <img src="https://veyce.vercel.app/api/gta-vi?seed=ada%40example.com&size=96&format=png" width="48" height="48" alt="" /> | `linus` | <img src="https://veyce.vercel.app/api/gta-vi?seed=linus&size=96&format=png" width="48" height="48" alt="" /> |
59
+ | `grace@example.com` | <img src="https://veyce.vercel.app/api/gta-vi?seed=grace%40example.com&size=96&format=png" width="48" height="48" alt="" /> | `42` | <img src="https://veyce.vercel.app/api/gta-vi?seed=42&size=96&format=png" width="48" height="48" alt="" /> |
60
+
61
+ **By id.** Every image has a short readable id. Ask for one and you get exactly
62
+ that image, or a 404 if the id doesn't exist:
63
+
64
+ | `jason-mask` | `lucia-mask` | `raul` | `boobie-ike` | `real-dimez` |
65
+ | --- | --- | --- | --- | --- |
66
+ | <img src="https://veyce.vercel.app/api/gta-vi/jason-mask/96?format=png" width="56" height="56" alt="jason-mask" /> | <img src="https://veyce.vercel.app/api/gta-vi/lucia-mask/96?format=png" width="56" height="56" alt="lucia-mask" /> | <img src="https://veyce.vercel.app/api/gta-vi/raul/96?format=png" width="56" height="56" alt="raul" /> | <img src="https://veyce.vercel.app/api/gta-vi/boobie-ike/96?format=png" width="56" height="56" alt="boobie-ike" /> | <img src="https://veyce.vercel.app/api/gta-vi/real-dimez/96?format=png" width="56" height="56" alt="real-dimez" /> |
67
+
68
+ Browse every id in the [gallery](https://veyce.vercel.app/gallery), or call
69
+ `avatars.list()`.
70
+
18
71
  ## Quick start
19
72
 
20
73
  ```ts
21
74
  import { createAvatars } from "veyce";
22
75
 
23
76
  const avatars = createAvatars({
24
- // baseUrl defaults to https://veyce.vercel.app — pass your own to self-host
77
+ // baseUrl defaults to https://veyce.vercel.app
25
78
  defaults: { collection: "gta-vi", size: 96 },
26
79
  });
27
80
 
@@ -172,15 +225,23 @@ npx veyce list --collection gta-vi
172
225
  Requests go to `https://veyce.vercel.app` unless you pass `--base URL` or set
173
226
  `VEYCE_URL`. `veyce --help` lists every flag.
174
227
 
228
+ ## Self-hosting
229
+
230
+ The veyce service serves whatever images sit in its
231
+ `public/avatar/<collection>/<id>/` folders. If you run your own copy with your
232
+ own images, point the client at it with `createAvatars({ baseUrl })`,
233
+ `<Avatar baseUrl>`, or `--base` / `VEYCE_URL` on the CLI. Everything above
234
+ works the same way; only the collections and ids change.
235
+
175
236
  ## License
176
237
 
177
- MIT for the package code — see [LICENSE](LICENSE).
238
+ MIT for the package code; see [LICENSE](LICENSE).
178
239
 
179
- This package contains no images. It only builds URLs for, and fetches from, a
180
- veyce service that you or someone else hosts. The images served by any such
181
- service belong to their respective owners, not to this package; check the
182
- service's terms and the rights holder's before storing or redistributing them.
240
+ The package itself contains no images. The avatars served by
241
+ `https://veyce.vercel.app` are GTA VI artwork owned by Rockstar Games /
242
+ Take-Two Interactive, not by this package or its author. Check the rights
243
+ holder's terms before storing or redistributing them, and use your own images
244
+ on a self-hosted service if you need avatars you control.
183
245
 
184
- veyce is an independent project and is not affiliated with DiceBear, Gravatar,
185
- Rockstar Games or Take-Two Interactive. Product names are used only to describe
186
- compatibility or comparison.
246
+ veyce is an independent project and is not affiliated with or endorsed by
247
+ Rockstar Games, Take-Two Interactive, DiceBear or Gravatar.
package/dist/cli.js CHANGED
@@ -148,7 +148,7 @@ function createAvatars(config = {}) {
148
148
  }
149
149
 
150
150
  // src/cli.ts
151
- var HELP = `veyce \u2014 avatars from your image library
151
+ var HELP = `veyce \u2014 GTA VI character avatars from the veyce API
152
152
 
153
153
  Usage
154
154
  veyce url [options] print the avatar URL
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "veyce",
3
- "version": "0.1.0",
4
- "description": "Deterministic avatars from your own image library. Exact ids or any seed (email, username, uuid) mapped to the same image every time.",
3
+ "version": "0.1.1",
4
+ "description": "Client for the free veyce avatar API: GTA VI character avatars from a URL. Any seed (email, username, uuid) always gets the same face. URL builder, fetch helpers, React <Avatar> and CLI. No API key.",
5
5
  "keywords": [
6
6
  "avatar",
7
7
  "avatars",
8
- "identicon",
8
+ "avatar-api",
9
+ "gta-vi",
10
+ "gta6",
9
11
  "seed",
10
12
  "profile-picture",
11
13
  "deterministic",
@@ -13,6 +15,7 @@
13
15
  ],
14
16
  "license": "MIT",
15
17
  "author": "Mohamed Salah",
18
+ "homepage": "https://veyce.vercel.app",
16
19
  "type": "module",
17
20
  "sideEffects": false,
18
21
  "main": "./dist/index.cjs",