Barestash uses Nix flakes with direnv and nix-direnv for the local development environment.
Prerequisites:
- Nix with flakes support
- direnv with a shell hook enabled
- nix-direnv
Initial setup:
direnv allow
just installManual shell entry:
nix developChecks:
just ci
just ci-full
just fix
just nix-checkIndividual recipes are also available:
just format
just lint
just check
just test
just test-e2e
just coverage
just typecheck
just nix-fmtLocal development commands:
just barestash --help
just dev-api
just dev-api-fresh
just deploy-api --env staging --dry-run
just dev-cli
just reset-api-state
just d1-query "SELECT id, mode FROM endpoints LIMIT 5;"just dev-api starts the API Worker with Wrangler local D1/R2/Durable Object
bindings persisted under apps/api/.wrangler/state. Run just reset-api-state
to delete that directory and reset local D1, R2, and Durable Object state. See
docs/local-cloudflare-development.md
for local migration and inspection commands.
just deploy-api --env <staging|production> deploys the API Cloudflare
infrastructure for operators. Production deploys require
--confirm. See docs/api-deployment.md.
Use just recipes as the canonical project command surface. Recipes may wrap
pnpm scripts internally, but day-to-day command examples should prefer just.
Codex local environment configuration lives in
.codex/environments/environment.toml. Its setup script runs just install,
and its configured actions enter the Nix dev shell before running the same
just recipes shown above.
Search recipes:
rg -n "temporary endpoint|private endpoint|events stream" requirements docs
rg -n "new Hono|app\\.get|app\\.post|/v1" apps/api packages
rg -n "runCli|barestash|auth|endpoints|events|tokens" apps/cli packages
rg -n "describe\\(|it\\(" apps packages
rg -n "authorization|cookie|x-barestash-secret|token|secret" apps packages requirements docsFormat Nix files with:
just nix-fmtUpdate the pinned Nix inputs with:
nix flake update
just nix-checkIf flakes are not enabled globally for manual nix commands, run them with:
nix --extra-experimental-features "nix-command flakes" develop