-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
52 lines (47 loc) · 2.63 KB
/
Copy path.env.example
File metadata and controls
52 lines (47 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Credentials for the SCRIPTS in scripts/ — never for the browser.
#
# Copy to .env (gitignored) and fill in. Every script here reads these from the
# environment, loads this file itself, and never prints a value.
#
# cp .env.example .env
# node scripts/index-passages.js --lang fr --push
# node scripts/create-book-agents.js --push
# node scripts/measure-tokens.js
#
# ── Why this file exists, and why it is not the deploy config ─────────────
# There are two credentials in this project and they must never be confused:
#
# 1. THIS file: a WRITE key. It creates the index, pushes records, and creates
# and publishes agents. It can also delete an index. It lives only on a
# maintainer's machine, in a gitignored .env, and is used only by scripts run
# by hand. It never reaches a browser, a build, or CI.
#
# 2. public/shared/config.js: a SEARCH-ONLY key. It is served to every visitor,
# so it is public by construction — "secret" is the wrong word for it and
# treating it as one is how it ends up somewhere worse. It is generated on the
# deploy runner from the DEMO_CONFIG_JS repository variable and is the ONLY
# credential the deployed site carries.
#
# A write key was once live in the browser config for about a day, on an
# application holding 95 indices of unrelated production data. That is what this
# split is for. Before putting any key in config.js, introspect its ACLs and
# confirm it is search-only.
#
# ── The keys ─────────────────────────────────────────────────────────────
# The Algolia application to write to. Same app as the deployed demo.
ALGOLIA_APP_ID=
# A key with addObject + editSettings on that app, and permission to create and
# publish agents. Scope it to the demo index if your plan allows it; an admin key
# is far more than these scripts need.
ALGOLIA_WRITE_API_KEY=
# Which language's index to write. index-passages.js REQUIRES this — as --lang or
# here — and derives everything from it: the index name (en is the unsuffixed
# public_domain_books, every other language is public_domain_books_<lang>), which
# records go there, and which settings it gets. There is no default, deliberately:
# this application holds ~95 unrelated production indices.
# ALGOLIA_INDEX_LANG=fr
# Optional, and read by create-book-agents.js only — which index the shelf-search
# tool points at. Defaults to public_domain_books.
# ALGOLIA_INDEX_NAME=public_domain_books
# Optional. Defaults to https://agent-studio.eu.algolia.com.
# AGENT_STUDIO_HOST=