Skip to content

stash CLI: eql install shouldn't require a stash.config.ts; support standalone --database-url + document URL precedence #581

Closed

Description

@coderdan

Background

Follow-up design work that came out of the #578 / #579 fixes. eql install coupled EQL installation to scaffolding-and-loading a stash.config.ts, which is what produced the standalone-npx crash (#579). But eql install only ever needs a database URL — it reads nothing else off the config that isn't otherwise available (config.databaseUrl + a client path that has a default).

Enhancement

Decouple eql install from the config, and make the database URL sourcing explicit and documented.

  • Config is optional for eql install. Resolve the URL directly (--database-url → DATABASE_URL → supabase status → prompt) via resolveDatabaseUrl. A standalone npx stash eql install --database-url ... then works in a bare project with zero dependencies. An existing stash.config.ts is still authoritative (later commands rely on it); without one, a config is offered as a convenience, not required.
  • --database-url is a one-shot signal. When passed explicitly, eql install leaves the project untouched — no stash.config.ts and no encryption client are scaffolded.
  • Document the resolution precedence. Make the order discoverable: on resolveDatabaseUrl (JSDoc), in stash manifest (registry descriptor), and in stash --help. Order (first wins): --database-url flag → DATABASE_URL env → supabase status → interactive prompt. stash.config.ts is not a separate tier — its default databaseUrl re-runs the same chain.

Status

Implemented in #580 (alongside the #578 / #579 fixes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions