@zenera/cli 1.1.45 → 1.1.46

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/dist/archive.js CHANGED
@@ -67,8 +67,9 @@ export function excluded(rel, isDir, opts = {}) {
67
67
  }
68
68
  // The credentials never travel, in any form and behind no flag. What the
69
69
  // project needs is described by `.env.example`, which `export` synthesizes
70
- // from the names in this file.
71
- if (rel === ENV_FILE) {
70
+ // from the names in this file. Its variants (`.env.test`, `.env.local`, what
71
+ // `ZEN_ENV_FILE` names) are credentials just the same.
72
+ if (rel === ENV_FILE || (rel.startsWith(`${ENV_FILE}.`) && rel !== ENV_EXAMPLE)) {
72
73
  return 'env';
73
74
  }
74
75
  if (name === '.lock') {
@@ -41,8 +41,8 @@ export const pack = {
41
41
  '',
42
42
  'Leaves behind what belongs to this machine: sessions/, .tmp/, .git/,',
43
43
  'node_modules/, lock files, any *.zip at the top of the project, and',
44
- `.env. The names in .env become a ${ENV_EXAMPLE} with no values, so the`,
45
- 'other end knows what to fill in.',
44
+ `.env and .env.test. Unless the project keeps its own ${ENV_EXAMPLE}, the names in .env`,
45
+ 'become one with no values, so the other end knows what to fill in.',
46
46
  '',
47
47
  'Vectors travel by default — memory has no other source, and a rag',
48
48
  'index without its lance/ tree looks built and cannot search.',
@@ -79,7 +79,8 @@ export const pack = {
79
79
  const collected = collect(dir, { vectors, memory });
80
80
  const extra = new Map();
81
81
  const env = join(dir, ENV_FILE);
82
- if (existsSync(env)) {
82
+ // A project's own `.env.example` is the curated one and travels as is.
83
+ if (existsSync(env) && !existsSync(join(dir, ENV_EXAMPLE))) {
83
84
  extra.set(ENV_EXAMPLE, envExample(readFileSync(env, 'utf8')));
84
85
  }
85
86
  const healthy = await sound(dir, found.name, ctx.json);
package/dist/scaffold.js CHANGED
@@ -127,13 +127,17 @@ function modelSection(ref, options) {
127
127
  *
128
128
  * `gitignore` cannot have its dot in the repository: npm strips a `.gitignore`
129
129
  * out of a published tarball, and git would read this one as rules about
130
- * `packages/cli/templates/` rather than as content. `env` cannot have its dot
131
- * for a plainer reason — this repository ignores `.env` everywhere, as every
132
- * repository should, so the template would never be committed at all.
130
+ * `packages/cli/templates/` rather than as content. The `env` files cannot have
131
+ * their dot for a plainer reason — this repository ignores `.env` and `.env.*`
132
+ * everywhere, so the templates would never be committed at all. In the project
133
+ * `.env` and `.env.test` are ignored, being credentials; `.env.example` holds
134
+ * no values and is meant to be shared.
133
135
  */
134
136
  const DOTFILES = {
135
137
  gitignore: '.gitignore',
136
138
  env: '.env',
139
+ 'env.example': '.env.example',
140
+ 'env.test': '.env.test',
137
141
  };
138
142
  /** The name a template file lands under. */
139
143
  function target(name) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenera/cli",
3
- "version": "1.1.45",
3
+ "version": "1.1.46",
4
4
  "description": "Command-line front end for @zenera/neo: agentic projects you can run, share and commit.",
5
5
  "keywords": [
6
6
  "agents",
@@ -54,9 +54,9 @@
54
54
  "@google/genai": "^2.30.0",
55
55
  "@inkjs/ui": "^2.0.0",
56
56
  "@openrouter/sdk": "^1.4.25",
57
- "@zenera/engine": "^1.1.45",
58
- "@zenera/neo": "^1.1.45",
59
- "@zenera/view": "^1.1.45",
57
+ "@zenera/engine": "^1.1.46",
58
+ "@zenera/neo": "^1.1.46",
59
+ "@zenera/view": "^1.1.46",
60
60
  "google-auth-library": "^10.0.0",
61
61
  "ink": "^7.1.1",
62
62
  "openai": "^6.0.0",
@@ -14,15 +14,12 @@
14
14
  # It is in .gitignore, and should stay there. Everything else in the project is
15
15
  # meant to be read, copied and shared; this is the one file that is not.
16
16
  #
17
+ # ZEN_ENV_FILE, set in the shell, names another file to read instead of this
18
+ # one — `.env.test`, say — relative to the project.
19
+ #
17
20
  # A credential *file* — GOOGLE_APPLICATION_CREDENTIALS — may be named by a path
18
21
  # relative to this directory. It is mounted into the sandbox where the agent
19
22
  # can read it, which is worth knowing before you point at one.
20
23
 
21
- # OPENAI_API_KEY=
22
24
  # ACME_API_TOKEN=
23
25
  # ACME_BASE_URL=https://api.example.test
24
-
25
- # Which model `zen meta` runs the meta agent on, for this project only. A zen
26
- # ref — `vertex/gemini-3.8-flash`, `openai/gpt-5.6-sol` — not a provider's wire
27
- # name. `zen meta model` shows where the answer came from.
28
- # ZENERA_META_MODEL=
@@ -0,0 +1,12 @@
1
+ # The names this project's environment needs, with no values.
2
+ #
3
+ # Copy it to .env and fill it in:
4
+ #
5
+ # cp .env.example .env
6
+ #
7
+ # .env is git-ignored and holds the real values; this file is committed, so it
8
+ # says which variables a clone has to supply without saying what they are. Add
9
+ # a name here whenever you add one to .env or .env.test.
10
+
11
+ # ACME_API_TOKEN=
12
+ # ACME_BASE_URL=
@@ -0,0 +1,12 @@
1
+ # This project's environment for test chats: the Test tab in Zenera Lite.
2
+ #
3
+ # Read instead of .env, not on top of it: Zenera Lite runs test chats with
4
+ # ZEN_ENV_FILE=.env.test, and only one file is ever read. So everything a test
5
+ # chat needs goes here — a sandbox account's token, a staging or mock base url.
6
+ # Edits reach the next test chat turn; nothing has to be restarted.
7
+ #
8
+ # It is in .gitignore, like .env: a test credential is still a credential.
9
+ # Name any variable you add here in .env.example as well.
10
+
11
+ # ACME_API_TOKEN=
12
+ # ACME_BASE_URL=https://staging.example.test
@@ -14,8 +14,9 @@ memory/.lock
14
14
  # Scratch, inside the workspace so the sandbox can reach it.
15
15
  .tmp/
16
16
 
17
- # Credentials.
17
+ # Credentials, and the ones test chats use instead.
18
18
  .env
19
+ .env.test
19
20
 
20
21
  # A rag index commits everything except its vectors: they are binary, they are
21
22
  # large, and `zen rag <subject> restore` rebuilds them from the copies of the