Skip to content

codemountains/barestash

Repository files navigation

Barestash

Development Environment

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 install

Manual shell entry:

nix develop

Checks:

just format
just lint
just check
just test
just test-e2e
just coverage
just typecheck
nix flake check
nix develop -c nixfmt --check flake.nix

Local development commands:

just barestash --help
just dev-api
just deploy-api ENV=staging DRY_RUN=1
just dev-cli
just reset-api-state

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=production. 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 docs

Format Nix files with:

nix fmt

Update the pinned Nix inputs with:

nix flake update
nix flake check

If flakes are not enabled globally for manual nix commands, run them with:

nix --extra-experimental-features "nix-command flakes" develop

About

Receive webhooks, stash requests, and stream events to your CLI or AI agents.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages