# Specific Docs > Specific enables any coding agent to define infrastructure for the code it writes. Start building locally and deploy to production in minutes. # Welcome Source: https://docs.specific.dev/ Specific can be used with any programming language or framework, and doesn't require integrating any SDKs. Simply connect your preferred coding agent and build whatever you can dream up. Your coding agent will define the infrastructure it needs from us and write code to integrate with it. **[Quickstart](/quickstart)** Hand setup to your agent with one prompt, or clone an example project **[Installation](/installation)** Install Specific for your own project and get started building **[Coding agents](/coding-agents)** Connect Claude Code, Cursor, or Codex and let it build with Specific **[How Specific works](/concepts/how-it-works)** The mental model: one config file, every environment ### Building with Specific As you are building, a development environment is automatically created for your app, providing the best possible environment for rapid iteration. When you are happy with what you've built, you can deploy to production with a single command to our secure and scalable infrastructure. Specific provides all the building blocks your coding agent needs to build anything: - **[Frontend and backend services](/guides/services)** with support for any programming language and framework - **[Postgres databases](/guides/postgres)** with zero-downtime migrations and automatic scaling - **[Real-time sync](/guides/sync)** to build collaborative applications directly from Postgres - **[Object storage](/guides/storage)** for files and media with infinite scaling - **[Crons](/guides/crons)**, **[durable workflows](/guides/temporal)**, **[caches](/guides/redis)**, and **[volumes](/guides/volumes)** - **[Secrets management](/guides/secrets-and-config)** with secure storage and injection into your services - **[Preview environments](/guides/previews)** and **[SQL-queryable observability](/guides/observability)** once deployed Best of all, Specific is completely free for local development and dead simple to get started with. --- # Coding agents Source: https://docs.specific.dev/coding-agents Specific is designed to be operated by coding agents. Your agent writes the code *and* defines the infrastructure to run it, with the same `specific.hcl` and the same CLI. This page covers how to connect an agent and how agents consume Specific's documentation. ## Connect your agent Inside your project, run: ```bash specific init ``` This writes Specific usage instructions into the right place for your agent, auto-detected from your project (or pass `--agent` explicitly): | Agent | What's written | | ----- | -------------- | | Claude Code (`claude`) | Instructions appended to `CLAUDE.md`, plus permissions for `specific docs` and `specific check` in `.claude/settings.local.json`. | | Codex (`codex`) | Instructions appended to `AGENTS.md`. | | Cursor (`cursor`) | A rule file at `.cursor/rules/specific.mdc`. | | Other (`other`) | Instructions appended to `AGENTS.md`. | ```bash specific init --agent claude cursor ``` It also adds `.specific` and `specific.local` to `.gitignore`. From then on, the agent knows to define infrastructure in `specific.hcl`, validate with `specific check`, run everything with `specific dev`, and consult `specific docs` when it needs details. ## Docs built into the CLI The CLI ships its own LLM-optimized documentation, so agents never depend on stale training data or web access: ```bash specific docs # the documentation index specific docs services # a specific topic specific docs integrations/nextjs # framework-specific guidance specific docs migrations/supabase # migrating from other platforms ``` The docs are nested and cross-linked; agents navigate them by path. They ship with the CLI binary, so they always match the installed version. ## Agent skill For agents that support skills, a Specific skill is available at [docs.specific.dev/skill.md](https://docs.specific.dev/skill.md). It contains the product summary, install command, and essential commands: enough for an agent to bootstrap itself, install the CLI, and pull deeper documentation via `specific docs`. ## This documentation site Every page on docs.specific.dev is also available to agents and LLM tools: - [`/llms.txt`](https://docs.specific.dev/llms.txt) - an index of all pages for LLM consumption, and [`/llms-full.txt`](https://docs.specific.dev/llms-full.txt) for the full content. - Append `.md` to any page URL for clean markdown. - An MCP server at `https://docs.specific.dev/mcp` lets agents search and read these docs directly; the "Connect to MCP" menu on every page has install commands for Claude Code, Cursor, Codex, and VS Code. - The page actions on every page offer copy-as-markdown and open-in-ChatGPT/Claude shortcuts. ## Agents operating remotely Specific runs fully headless, so agents in remote environments like OpenClaw or Hermes can install the CLI, build, and deploy without a human at the machine. See the [OpenClaw setup instructions](/for-ai/openclaw) for a ready-to-use prompt that configures such an environment. Two pieces make this work: - **Tunnels**: an agent on a machine you can't browse from can still show you the running app. `specific dev --tunnel` exposes public services at `https://.tunnel.spcf.app`. - **Agent registration**: `specific login --agent` registers the CLI itself as an agent (WorkOS agent registration) with no browser and no human. The agent can create one project and deploy immediately; the account is deleted after 48 hours unless the user claims it with `specific claim`. - **Device-code login**: logging in without a browser works via the device-code flow. `specific deploy` and `specific login` print an authorization link and code, and `specific login --device-code ` completes it. ## What stays the human's job - Confirming the CLI installation. - DNS changes for [custom domains](/guides/domains) - the CLI prints the records, but you configure them at your registrar. - Production management in the [dashboard](https://dashboard.specific.dev): scaling, secrets rotation, domain removal, billing. --- # Specific vs Convex Source: https://docs.specific.dev/compare/convex Convex is a backend platform that replaces your database, server, and real-time layer with a single proprietary runtime. You write mutations, queries, and actions in Convex's format, and your data lives in Convex's document-oriented store. Specific takes a different approach: your coding agent defines standard infrastructure in a config file, and your code stays portable by building on open-source technology like PostgreSQL. If you're looking for a Convex alternative without the proprietary data store and runtime, here's how the two compare. | | Convex | Specific | |---|---|---| | **Data model** | Proprietary document store | Standard PostgreSQL | | Query language | Convex query/mutation functions | Standard SQL through Postgres | | Backend logic | Convex actions (JS/TS only) | Any stack, standard backend code without lock-in | | Real-time | Reactive queries through SDK | Built-in sync engine that works with any stack | | Code portability | Tightly coupled to Convex runtime | Standard code with no vendor lock-in | | Storage | Convex file storage API | S3-compatible, any S3 client | | Open-source foundation | Proprietary data store and runtime | Standard protocols like PostgreSQL and S3 | | Agent integration | Not designed for agents | Agent-first | ## Designed for coding agents Convex targets human developers writing backend logic in its proprietary format: mutations, queries, and actions that follow Convex-specific conventions. This is a workflow optimized for humans reading Convex documentation. Specific is built so that coding agents define infrastructure, deploy services, and debug issues through a config file and CLI. This is the workflow agents are best at: writing configuration, running commands, and interpreting structured output. ## Built on open-source, not proprietary infrastructure Convex uses a proprietary document store and runtime that is not open-source. Your data lives in a system controlled by a single vendor, with no standard tooling ecosystem around it. Specific builds on battle-tested open-source technology: standard PostgreSQL for your data, S3-compatible storage, and Redis for caching. These are systems with decades of community support, tooling, and portability. If you ever need to move, your data and your knowledge transfer with you. ## No vendor-specific code in your application With Convex, your backend logic is written as Convex mutations, queries, and actions, a format that only runs on the Convex runtime. Your application code is tightly coupled to one platform. With Specific, you write a normal code using any programming language and stack, whatever fits your project. Your code is standard and portable. If you switch infrastructure providers, your application code still works. ## Any language, not just TypeScript Convex backend functions must be written in JavaScript or TypeScript. If your project needs a different language Convex can't accommodate that. Specific supports any language or framework. Your services can run Node.js, Python, Go, Rust, or anything else. Pick the right tool for the job. ## Common questions ### Is Specific a good alternative to Convex? If you want your data in standard PostgreSQL, your backend in any language, and no coupling to a vendor runtime, yes. If you specifically want Convex's reactive query model and are happy in its TypeScript-only runtime, Convex does that well. The core difference is portability: with Specific, your code and data would survive leaving the platform. ### Does Specific have real-time sync like Convex? Yes. Specific has a [built-in sync engine](/guides/sync) powered by Electric that streams Postgres changes to clients over plain HTTP. Unlike Convex's SDK-bound subscriptions, it works with any language and framework. ### Can I migrate from Convex to Specific? There's no automated migration: Convex mutations, queries, and actions are coupled to its runtime, so they need rewriting as standard backend code against Postgres. That rewrite is work a coding agent handles well, and it's the last time your backend logic is tied to a platform. **[Quickstart](/quickstart)** Clone an example project and get familiar with Specific **[Installation](/installation)** Install Specific for your own project and get started building --- # Specific vs Fly.io Source: https://docs.specific.dev/compare/fly Fly.io gives you fast, low-level infrastructure: Machines (microVMs) around the world, volumes, and a per-app `fly.toml`, with Managed Postgres, Upstash Redis, and Tigris object storage as separate offerings you attach. Specific operates a level higher: the application stack (services, Postgres, storage, Redis, sync, Temporal) is one integrated config file that a coding agent writes and operates. If you're weighing Fly.io alternatives that trade low-level control for an integrated, agent-first platform, here's how the two compare. | | Fly.io | Specific | |---|---|---| | Abstraction | Infrastructure primitives (Machines, volumes) | Application building blocks | | Agent integration | Human-oriented CLI and config | Agent-first CLI with structured feedback | | Infrastructure definition | Per-app `fly.toml`, resources attached separately | Full stack in one config file, wired automatically | | Local development | No unified local environment | `specific dev` runs the full stack locally, no Docker | | Database | Managed Postgres (attached per app) | Managed Postgres with zero-downtime migrations built in | | Object storage | Tigris integration | Built-in S3-compatible storage (also Tigris) | | Caching | Upstash for Redis | Built-in managed Redis | | Real-time | Not included | Built-in sync engine | | Durable workflows | Not included | Built-in managed Temporal | ## Building blocks, pre-assembled On Fly, you compose the pieces yourself: launch an app, create a Postgres cluster, add Upstash Redis, connect Tigris storage, and wire the credentials between them. Each piece is solid, and the control is real, but the assembly is yours to design, script, and maintain. Specific pre-assembles the same shape of stack. A `postgres`, `storage`, or `temporal` block plus a reference like `postgres.main.url` in a service's `env` is the entire integration: credentials, addresses, and wiring resolve automatically in every environment. That assembly work is exactly the part coding agents get wrong on primitive-level platforms, and exactly what Specific's config makes trivial. ## The same code runs locally Fly's development model is cloud-first: `fly launch` and `fly deploy` get you running in production quickly, but there's no unified way to run your app with its databases and storage on your own machine. `specific dev` runs the whole stack locally without Docker: real Postgres, an S3-compatible storage server, Redis, and a Temporal dev server, using the same config and references as production. Your agent can build, run, and verify features end to end before anything is deployed. ## Common questions ### Is Specific a good alternative to Fly.io? If what you're building is a full-stack application and you want the platform to assemble and operate the infrastructure (especially if a coding agent is doing the building), yes. If you need low-level control (choosing regions, tuning Machines, running custom global topologies), Fly's primitives are the better fit. ### Both use Tigris for object storage. What's the difference? The provider is the same; the integration isn't. On Fly, Tigris is an add-on you create and wire up per app. On Specific, a one-line `storage` block gives you credentials injected into your services, plus a local S3-compatible server in `specific dev`, so the same code runs against local storage in development and Tigris in production. ### Does Specific let me pick regions like Fly does? Not yet. Today all Specific deployments run in a single region (AWS eu-central-1), and region selection is on our roadmap. Fly's global Machine placement is a genuine differentiator, so if per-region control or multi-region distribution is a hard requirement right now, Fly is the right tool. **[Quickstart](/quickstart)** Clone an example project and get familiar with Specific **[Installation](/installation)** Install Specific for your own project and get started building --- # Specific vs Railway Source: https://docs.specific.dev/compare/railway Railway is a deployment platform with a polished dashboard: you create services and databases in the UI, connect a repo, and Railway builds and runs it. Specific takes a different approach: your entire stack (services, databases, storage, workflows) is defined in a single config file that your coding agent writes, versioned with your code. If you're looking for a Railway alternative where infrastructure lives in code instead of a dashboard, here's how the two compare. | | Railway | Specific | |---|---|---| | Agent integration | Dashboard-first | Agent-first | | Infrastructure definition | Services and databases created in the dashboard | Full topology in one agent-writable config file | | Config as code | Build/deploy settings for a single service (`railway.json`) | Everything: services, databases, storage, workflows | | Local development | Docker-based (`railway dev`), or cloud resources with injected env vars (`railway run`) | `specific dev` runs the full stack locally, no Docker | | Database | Postgres, MySQL, Redis, MongoDB | Managed Postgres with zero-downtime migrations, managed Redis | | Object storage | Storage buckets | Built-in S3-compatible storage | | Real-time | Not included | Built-in sync engine | | Durable workflows | Not included | Built-in managed Temporal | ## Infrastructure as code, not clicks On Railway, the source of truth is the dashboard: services, databases, and their wiring are created and connected there. The `railway.json` config file covers build and deploy settings for a single service, not the topology itself. With Specific, the config file is the whole system: every service, database, storage bucket, and workflow engine, plus how they connect. That makes infrastructure reviewable in pull requests, reproducible across environments, and, most importantly, writable by a coding agent. Your agent adds a Postgres database by writing four lines of HCL and running `specific check`, not by clicking through a dashboard it can't see. ## Local development without Docker Railway's local story is either `railway run`, which injects your cloud environment variables into a local process (your app runs locally, the resources stay in the cloud), or the Docker-based `railway dev`. `specific dev` runs everything on your machine with no Docker at all: real Postgres from bundled binaries, an S3-compatible storage server, Redis, and a Temporal dev server, wired to your services with the same references production uses. Your agent can start the stack, test end to end, and read the logs, entirely offline. ## Building blocks beyond deploys Railway covers services, databases, and storage well. For real-time sync you'd assemble your own layer, and for durable background workflows you'd run and manage your own engine. Specific ships both as one-line blocks: a [sync engine](/guides/sync) that streams Postgres changes to clients over HTTP, and [managed Temporal](/guides/temporal) for durable workflows, with a local dev server and an auto-provisioned Temporal Cloud namespace in production. ## Common questions ### Is Specific a good alternative to Railway? If you want your whole stack defined in code, a full local development environment, and infrastructure a coding agent can manage end to end, yes. If you prefer configuring services visually in a dashboard, or need MySQL or MongoDB specifically, Railway serves that well. ### Can't I get config-as-code on Railway? Partially. Railway's `railway.json`/`railway.toml` configures how a single existing service builds and deploys. Creating services, databases, and their connections still happens in the dashboard. A community-maintained Terraform provider can drive Railway's API to fill that gap, but it brings Terraform's own overhead with it: state files to manage, provider wiring, and still no local development environment ([how Specific compares to Terraform](/compare/terraform)). In Specific, the config file covers all of it natively. ### How does local development actually differ? Railway's options are running against cloud resources with injected env vars, or a Docker-based local mode. Specific runs real local instances (Postgres, S3-compatible storage, Redis, Temporal) from bundled binaries with no Docker daemon, using the same config and references as production. **[Quickstart](/quickstart)** Clone an example project and get familiar with Specific **[Installation](/installation)** Install Specific for your own project and get started building --- # Specific vs Render Source: https://docs.specific.dev/compare/render Render is a mature deployment platform: web services, background workers, cron jobs, managed Postgres, and a Redis-compatible key-value store, with Blueprints (`render.yaml`) for declaring services in code. Specific shares the services-plus-databases shape but is built for a different workflow: a coding agent defines the whole stack in one config file, runs it locally, and deploys it. If you're evaluating Render alternatives with a real local development story and agent-first tooling, here's how the two compare. | | Render | Specific | |---|---|---| | Agent integration | Dashboard-first, YAML for sync | Agent-first CLI with structured feedback | | Infrastructure definition | Blueprints (`render.yaml`) | Single HCL config file | | Local development | No local environment | `specific dev` runs the full stack locally, no Docker | | Database | Managed Postgres, Key Value (Redis-compatible) | Managed Postgres with zero-downtime migrations, managed Redis | | Object storage | Not included | Built-in S3-compatible storage | | Real-time | Not included | Built-in sync engine | | Durable workflows | Workflows (public beta, TypeScript/Python SDK) | Managed Temporal, any Temporal SDK language | | Preview environments | Multi-service previews | Preview environments with isolated infrastructure | ## A feedback loop agents can act on Render's Blueprints are genuine infrastructure-as-code, and that's the right direction. The difference is the loop around the file. Render syncs `render.yaml` when you push, and errors surface in the dashboard's deploy view, where a human reads them. Specific is designed for the agent to close the loop itself: `specific check` validates the config (and database migrations) instantly before anything runs, `specific dev` tests the result locally, and every CLI command returns structured output the agent can parse and act on. Mistakes are caught in seconds at the terminal, not minutes later in a dashboard. ## A local environment, not just a deploy target Render doesn't provide a local development environment; you assemble your own databases and services for development and keep them in sync with production by hand. With Specific, `specific dev` starts your entire stack locally with no Docker: real Postgres, S3-compatible storage, Redis, and a Temporal dev server, wired with the same config and references as production. What works locally works when you deploy. ## Storage, sync, and workflows included Render covers compute and data, and its Workflows product (in public beta) adds durable task orchestration, defined through the Render SDK in TypeScript or Python. Object storage still means bringing a third party, and real-time still means building your own layer. Specific ships the full set as config blocks: [S3-compatible object storage](/guides/storage) that works with any S3 client, a [sync engine](/guides/sync) streaming Postgres changes over HTTP, and [managed Temporal](/guides/temporal) for durable workflows, with an auto-provisioned Temporal Cloud namespace in production. Temporal is the open-source standard for durable execution: SDKs for TypeScript, Python, Go, Java, .NET, and PHP, workflows that can pause for days or run for months, and workflow code that runs against any Temporal server rather than being written to a platform SDK. ## Common questions ### Is Specific a good alternative to Render? If you want a local dev environment that mirrors production, built-in object storage, sync, and durable workflows, and infrastructure a coding agent can operate end to end, yes. Render remains a solid choice for dashboard-managed deployments of services and databases, with mature autoscaling and static site hosting. ### Render has Blueprints. Isn't that the same as Specific's config file? They're the closest analogue among deploy platforms, but they cover different ground. `render.yaml` declares services and databases for the cloud; Specific's config also drives the local environment, wires references between resources (connection strings, URLs, credentials resolve automatically), and covers storage, sync, and Temporal. And the validation loop (`specific check`) is built for agents to consume directly. ### How do Render Workflows compare to Temporal on Specific? Render Workflows (public beta) defines tasks with the Render SDK in TypeScript or Python, with automatic retries and task runs of up to 24 hours. Temporal on Specific is the open-source durable execution standard: SDKs in six languages, workflows that can pause for days or months, and code that runs against any Temporal server, so your workflow logic isn't tied to either Render or Specific. ### Does Render include object storage? No, you'd pair it with an external provider. Specific includes S3-compatible storage as a one-line `storage` block, served locally in dev and by managed storage in production. **[Quickstart](/quickstart)** Clone an example project and get familiar with Specific **[Installation](/installation)** Install Specific for your own project and get started building --- # Specific vs Supabase Source: https://docs.specific.dev/compare/supabase Supabase is a popular backend-as-a-service that bundles Postgres, auth, real-time subscriptions, and storage behind a client-side SDK. This means you need to lock your code into their SDK. Specific takes a different approach: instead of routing everything through an SDK, your coding agent defines the infrastructure it needs in a configuration file, and your code uses standard tools to interact with it. If you're evaluating Supabase alternatives that deploy your whole stack instead of just the backend, here's how the two compare. | | Supabase | Specific | |---|---|---| | Agent integration | Not designed for agents | Agent-first | | Frontend deployment | Not included | Full service deployment | | Backend services | Only TypeScript edge functions | Any language and any framework | | Database access | Via `supabase-js` SDK or REST API | Standard Postgres connection, any ORM | | Auth | Built-in (Supabase Auth) | Use any auth library or service of your choosing; protected environments for internal apps | | Real-time | SDK-based subscriptions | Built-in sync engine that works with any stack | | Storage | SDK-based file storage | S3-compatible, any S3 client | | Local development | Supabase CLI (Docker-based) | `specific dev` (no Docker) | ## Designed for coding agents Supabase is built around a web dashboard and SDK documentation aimed at human developers. Setting up a project, configuring auth providers, and managing storage policies all happen through the dashboard. Specific is designed from the ground up so that coding agents can define, deploy, and troubleshoot your entire infrastructure. Your agent writes a config file, runs CLI commands, and gets structured feedback it can act on. No dashboard clicks needed to make infrastructure changes. Your infrastructure stays in sync with your code. ## No SDK required Supabase routes most interactions through its `supabase-js` SDK, like database queries, auth, file uploads, and real-time subscriptions. Your application code becomes tightly coupled to this SDK. Specific exposes standard interfaces: a Postgres database, S3-compatible endpoints, and environment variables. You use whatever stack you prefer with no lock-in. ## Full-stack deployment, not just backend Supabase focuses on the backend layer. For your frontend, custom backend services, and background workers, you still need a separate deployment platform and need to manage the integration yourself. Specific deploys your entire stack, including frontend, backend API, and workers, from a single configuration. Everything is defined together and deployed together. ## Any language, any framework Supabase Edge Functions run Deno. If your backend needs a different runtime, you're on your own. With Specific, your services can be Node.js, Python, Go, Rust, or anything else. You pick the stack, Specific runs it. ## Common questions ### Is Specific a good alternative to Supabase? If you want full-stack deployment (frontend, backend, and workers together), backend code in any language, and plain Postgres access with no SDK in between, yes. If you mainly want Supabase's bundled auth and are comfortable building on `supabase-js`, Supabase is a fine choice. The difference is coupling: Specific exposes standard interfaces your code would keep using anywhere. ### Does Specific include auth like Supabase? No built-in auth service, by design. You bring any auth library or provider ([Better Auth](https://www.better-auth.com/), WorkOS, Clerk, or your own), declare its keys as [secrets](/guides/secrets-and-config), and own your user data in your Postgres database. For internal tools and staging, a [protected environment](/guides/protected) puts sign-in for your organization's members in front of every public endpoint, with no application code. ### Can I keep using my existing Postgres tools? Yes. Specific gives you a standard Postgres connection string, so every ORM, migration tool, `psql`, and backup workflow works unchanged. There's no REST layer or SDK between your code and your database. **[Quickstart](/quickstart)** Clone an example project and get familiar with Specific **[Installation](/installation)** Install Specific for your own project and get started building --- # Specific vs Terraform Source: https://docs.specific.dev/compare/terraform Terraform is an infrastructure-as-code tool for defining cloud resources in HCL. It only manages infrastructure, it doesn't build, deploy, or run your application. You need to set up a local dev environment, pick providers, wire them together, and build a deployment pipeline. Specific provides all this so you can focus on building your application instead of managing infrastructure. | | Terraform | Specific | |---|---|---| | Agent integration | Not designed for agents | Agent-first with built-in context | | Local development | No local dev environment | `specific dev` runs everything locally | | Infrastructure | Assemble and wire providers yourself | Built-in Postgres with sync engine, object storage, Redis | | Application deployment | Separate CI/CD needed | Full build and deploy pipeline | | Automatic deploys | Requires external CI/CD setup | Built-in GitHub integration | | State management | State files you must store and manage | Handled automatically, no state files | ## Local development that matches production Terraform has no local development story. If you want to develop against a database, storage, or cache locally, you're on your own setting that up and keeping it in sync with your Terraform definitions. With Specific, `specific dev` starts your entire stack in a single command: databases, storage, Redis, and your services. The local environment uses the same config as production, so what works locally works when you deploy. Even better, your agent can run `specific dev` itself and test your entire app end-to-end. ## Building blocks that fit together With Terraform, you pick a cloud provider, find the right provider plugins, configure each resource, and wire them together with references, outputs, and data sources. Getting a database, storage bucket, and application to talk to each other takes dozens of lines of configuration across multiple files. Specific provides the building blocks your application needs and they work together out of the box. Connection strings, credentials and wiring are automatically configured by your coding agent and handled by our deployment pipeline. ## Built for coding agents Terraform was built for human operators managing cloud infrastructure. It assumes your agent will know how to write correct configurations for any provider and you will have to set up your own workflows to manage state files and deployment pipelines. Specific is designed for coding agents. The CLI provides structured feedback that agents can act on and ships with built-in documentation context so your agent can define infrastructure, deploy, and troubleshoot without leaving the terminal. ## From code to production, including GitHub deploys Terraform stops at infrastructure provisioning. To actually build and deploy your application, you need a separate CI/CD pipeline, container registry, and deployment tooling. Specific handles the full pipeline: build, deploy, and run. Connect your GitHub repository and get automatic deploys on every push. No separate CI/CD to configure, no container registry to manage. ## No state files to manage Terraform tracks every resource in a state file. You need to store this state somewhere safe, set up locking so concurrent runs don't corrupt it, and deal with drift when someone changes infrastructure outside of Terraform. Specific manages all state internally. There are no state files to store, lock, or reconcile. ## Common questions ### Is Specific an alternative to Terraform? For application infrastructure, yes: services, databases, storage, caching, workflows, and the pipeline that builds and deploys them. Terraform remains the right tool for managing arbitrary cloud resources (DNS zones, IAM policies, VPCs across any provider); Specific deliberately covers the application layer instead of everything. ### Is specific.hcl the same language as Terraform? Both use HCL syntax, so the config feels familiar to anyone (human or agent) who has written Terraform. The schema is different: instead of provider resources, you declare application building blocks like `service`, `postgres`, and `storage`, and Specific handles the wiring between them. ### Can my coding agent write the config? That's the core design goal. The config is small enough to hold in context, `specific check` validates every change, and the CLI ships docs your agent can read with `specific docs`. Agents go from prompt to deployed infrastructure without a human in the loop. **[Quickstart](/quickstart)** Clone an example project and get familiar with Specific **[Installation](/installation)** Install Specific for your own project and get started building --- # Specific vs Vercel Source: https://docs.specific.dev/compare/vercel Vercel is a deployment platform optimized for frontend frameworks, especially Next.js. It handles builds, edge functions, and CDN distribution well. But for infrastructure beyond the frontend, like databases, object storage, background workers, and service-to-service communication, you need to assemble third-party services and manage them separately. Specific provides all of these as composable building blocks, defined in a single config file by your coding agent. | | Vercel | Specific | |---|---|---| | Agent integration | Dashboard-first | Agent-first | | Frontend deployment | Optimized for Next.js/React | Any framework, any language (including Next.js) | | Backend services | Serverless/edge functions | Full services (long-running, any runtime) | | Database | Third-party integrations | Built-in managed Postgres | | Object storage | Third-party (Vercel Blob) | Built-in S3-compatible storage | | Caching | Third-party (Vercel KV) | Built-in managed Redis | | Real-time | Not included | Built-in sync engine | | Background jobs | Limited cron, no long-running | Full worker services | | Infrastructure definition | Dashboard + framework config | Config file, agent-writable | ## Agent-first, not dashboard-first Vercel's primary interface is a web dashboard with git-based deployments configured through the UI. Project settings, environment variables, and domain configuration all live in the dashboard. This works for human developers, but it's a dead end for coding agents. Specific is designed so that coding agents define and manage everything through a config file and CLI commands. Infrastructure changes are a config edit away, not a dashboard click. Your agent gets structured feedback from every command, making it easy to iterate, troubleshoot, and deploy without leaving the terminal. ## Full-stack infrastructure, not just frontend Vercel focuses on the frontend layer and relies on third-party integrations for databases, storage, and queues. Each integration comes with its own dashboard, billing, SDK, and documentation. Your coding agent needs to understand multiple platforms to build a full application. Specific provides all the building blocks in one place: services, Postgres databases, S3-compatible storage, Redis, and a real-time sync engine. Everything is defined in a single config file and managed through a single CLI. One platform for your agent to learn, one place to troubleshoot. ## Not limited to serverless or specific frameworks Vercel is optimized for Next.js and serverless functions with execution time limits and cold starts. If your backend needs long-running processes, WebSocket connections, or a language other than JavaScript, you hit the edges of what Vercel supports. Specific deploys full services like backend APIs, background workers, and WebSocket servers in any language. There are no execution time limits or cold starts. Your services run as long-running processes with the resources they need. ## Local development parity Vercel doesn't provide a unified local development environment for your full stack. You run `next dev` for the frontend, but databases, storage, and other services need to be managed separately, often pointing at remote development instances or running Docker containers manually. With Specific, `specific dev` starts everything in a single command: databases, storage, Redis, and your services. The local environment uses the same config as production, so what works locally works when you deploy. ## Common questions ### Is Specific an alternative to Vercel for Next.js apps? Yes. A Next.js app deploys as a regular [service](/guides/services), with no framework lock-in. If your project is a pure frontend and nothing else, Vercel's edge network specialization serves that case well. Specific fits when the app is more than a frontend: an API, a database, workers, storage, all deployed together from one config. ### Does Specific support serverless functions? No, and deliberately: services are long-running processes with no execution time limits and no cold starts. For scheduled work, use the built-in [`cron` block](/guides/crons); for background processing, run a worker service. ### Do I still get preview deployments? Yes. Specific supports [preview environments](/guides/previews) with isolated copies of your infrastructure, including database branches with real data. **[Quickstart](/quickstart)** Clone an example project and get familiar with Specific **[Installation](/installation)** Install Specific for your own project and get started building --- # Dashboard Source: https://docs.specific.dev/concepts/dashboard The [dashboard](https://dashboard.specific.dev) is where you observe and manage everything you've deployed. Log in with the same account you use for `specific deploy`; your projects and environments appear automatically after the first deployment. ## What you can do - **Service overview** - architecture visualization, per-service status, logs, metrics, and scaling. - **Deployments** - view and track deployments across environments. - **Database** - browse tables, run queries, and manage your Postgres databases. - **Storage** - browse bucket contents and generate external S3 credentials. - **Secrets and config** - update values in place; they take effect on the next deployment. - **Crons** - inspect scheduled jobs and their runs, or trigger one with **Run now**. - **Workflows** - the Temporal Web UI for your [Temporal](/guides/temporal) engines: monitor workflow executions, task queues, and workflow state. - **Analytics** - traffic analytics for your services. - **Jobs** - run [one-off commands](/guides/jobs) against a deployed service. - **Custom domains** - add, list, and remove [domains](/guides/domains). - **Protected environments** - require sign-in for every public endpoint in an environment, so only members of your organization can reach it; see [Protected environments](/guides/protected). - **Automatic membership** - in the organization settings, verify an email domain so teammates who sign up with it join the organization without an invite. - **GitHub integration** - deploy automatically on every push and get [preview environments](/guides/previews) per pull request. - **Pause project** - stop every environment while keeping the data; see [Pausing a project](/concepts/deployments#pausing-a-project). Logs and metrics are also queryable from the CLI; see [Observability](/guides/observability). ## The local dashboard Local development has the same dashboard: `specific dev` launches a local mirror of it, usually at `http://localhost:3000` (the exact URL is printed at startup, and each [instance](/concepts/local-development#multiple-instances) run with `--key` gets its own). It drops the features that don't apply locally, like deployments, domains, and scaling, and keeps everything you need while building: the architecture view, database browser, storage browser, crons, and workflows. --- # Deployments Source: https://docs.specific.dev/concepts/deployments `specific deploy` takes your project from local development to a fully running production environment: provisioning infrastructure, building your code, and rolling out services with a single command. ```bash specific deploy ``` ## First deploy The first `specific deploy` walks you through a short setup: 1. **Login** - your browser opens to authenticate with Specific Cloud. The session is saved for future deploys. 2. **Project selection** - choose an existing project or create a new one. The project is saved to `.specific/project.json` so subsequent deploys skip this step. 3. **Deploy** - your project is built, infrastructure is provisioned, and services go live. After that, deploys are a single command with no prompts (unless new secrets or config values need to be set). ## The pipeline 1. **Authentication** Verifies you are logged in to Specific Cloud. If not, your browser opens for login. 2. **Local build testing** Runs your build commands locally to catch errors before deploying, giving fast feedback without waiting for a cloud build. 3. **Upload** Your project code is uploaded to Specific Cloud. 4. **Cloud builds** Your code is built in the cloud based on the [`build` blocks](/guides/builds) in `specific.hcl`. Multiple builds run in parallel, and dependencies are cached for faster rebuilds. 5. **Secrets and config** If any [secrets or config values](/guides/secrets-and-config) are missing for the target environment, you are prompted to enter them. You can enter values while builds are still running. 6. **Resource provisioning** Databases, object storage, Redis, sync engines, and Temporal namespaces are provisioned as needed. Resources are created once and reused across deploys. 7. **Service rollout** Services are rolled out with zero downtime: new instances must pass their [health checks](/guides/services#health-checks) before receiving traffic. [Deploy hooks](/guides/services#deploy-hooks) run at this stage: `pre_deploy` before the service starts (a failed hook aborts the deployment), `post_deploy` after it's live. [Reshape migrations](/guides/reshape) are started before the rollout and completed after it succeeds. 8. **Active** The deployment is live. Public URLs for your services are displayed in the terminal. :::info If any step fails, the deployment is aborted and the error is shown in the terminal. Fix the issue and run `specific deploy` again. ::: ## Removing resources Deleting a block from `specific.hcl` and deploying removes it from the environment, but nothing that might hold data is destroyed automatically: - A **service** without volumes is deleted outright: it has no state. - **Databases**, **storage buckets**, **Temporal namespaces**, **volumes**, **secrets** and **configs** are kept and marked **orphaned**. They stay provisioned (and billed) with their data intact. Add the block back to the config and deploy to keep using the existing resource — a re-added database, for example, comes back with all of its tables. - Removing a service that has volumes deletes the service but keeps its volumes as orphans. Orphaned resources are listed on the environment's overview in the [dashboard](/concepts/dashboard), where you can delete each one permanently along with all of its data. Until you do, the resource is not touched. ## Public URLs Services with `endpoint { public = true }` get a public HTTPS URL on a managed `*.spcf.app` domain, shown in the terminal when the deploy completes. TLS is handled automatically. Services without a public endpoint are only reachable internally by other services. To serve a service from a domain you own, see [Custom domains](/guides/domains). ## Environments A project can have multiple environments (for example, `production` and `staging`), each with its own resources, secrets, and config. Target one with `specific deploy --environment `, and list them with `specific status`. [Preview environments](/guides/previews) are ephemeral environments created per pull request or with `specific deploy --preview`. ## Managing production Once deployed, the [dashboard](/concepts/dashboard) is your window into the project: logs and metrics, deployment history, database management, secrets, scaling, custom domains, and more. To deploy automatically on every push, connect your GitHub repository in the dashboard's settings. Turn off **Allow deployments from CLI** in an environment's settings to block direct `specific deploy` runs against it, for example on production. Attempts are rejected before a deployment is created. Automatic GitHub deployments, promotion from another environment, and redeploys from the dashboard continue normally, so you can require that production only changes through GitHub or by promoting a tested staging environment. The setting does not prescribe whether your GitHub workflow uses pull requests, direct pushes, or another process. It is on by default for compatibility with existing workflows. Automatic GitHub deploys honor the same commit-message skip instructions as GitHub Actions: `[skip ci]`, `[ci skip]`, `[no ci]`, `[skip actions]`, `[actions skip]`, or a final `skip-checks: true` trailer. Hyphenated variants such as `[skip-ci]` are accepted too. These instructions do not prevent an explicit redeploy from the dashboard. ## Pausing a project A project can be paused from its settings page in the [dashboard](/concepts/dashboard). Pausing applies to every environment in the project and keeps all of its data. While a project is paused: - All services, Redis instances, and sync engines are stopped, and cron schedules are paused. - Schedules in the project's managed [Temporal](/guides/temporal) namespaces are paused too, except ones you paused yourself. Workflows that were already running wait for a worker and continue where they left off when the project is resumed. - Public URLs return a page saying the project is paused. - Databases, object storage, volumes, secrets, and configuration are kept. Redis contents are not kept, because Redis is in-memory only. - Storage is still billed. Service compute and database compute are not. Temporal workflows left open still count toward active storage. - Deployments are rejected. `specific deploy` stops before creating a deployment, redeploys and scaling are unavailable in the dashboard, and pushes to a connected GitHub repository are skipped. Resume the project from the same settings page. Services start again with their previous configuration, schedules resume, and deployments are accepted again. --- # How Specific works Source: https://docs.specific.dev/concepts/how-it-works Specific is infrastructure-as-code designed for coding agents. Your infrastructure is defined in a single `specific.hcl` file alongside your application code: how to build, run, and deploy the full system, in both development and production. Specific is fully generic: it works with any programming language and framework, without SDKs. All connection details reach your code through environment variables. ## One file, every environment A typical `specific.hcl`: ```hcl specific.hcl build "app" { base = "node" command = "npm run build" } service "web" { build = build.app command = "npm start" endpoint { public = true } env = { PORT = port DATABASE_URL = postgres.main.url } dev { command = "npm run dev" } pre_deploy { command = "npm run db:migrate" } } postgres "main" {} ``` The same file drives every environment your project runs in: - **[`specific dev`](/concepts/local-development)** runs everything locally (Postgres, services, sync engines) with connection details injected automatically. No `.env` files. - **[`specific deploy`](/concepts/deployments)** builds the code, provisions managed infrastructure, and rolls out services to Specific Cloud. A project can have multiple deployed environments (production, staging, [previews](/guides/previews)), all defined by the same file. References like `postgres.main.url` resolve to the right value in each environment: a local database during development, a managed one per deployed environment. ## Building blocks | Block | What it defines | | ----- | --------------- | | [`build`](/guides/builds) | How to produce artifacts: managed base environments or custom Dockerfiles. | | [`service`](/guides/services) | Long-running processes: web apps, APIs, workers. | | [`cron`](/guides/crons) | Scheduled jobs with per-run logs and metrics. | | [`postgres`](/guides/postgres) | Managed PostgreSQL databases, with optional [Reshape](/guides/reshape) zero-downtime migrations and [real-time sync](/guides/sync). | | [`storage`](/guides/storage) | S3-compatible object storage. | | [`redis`](/guides/redis) | Redis-compatible caches (Valkey). | | [`temporal`](/guides/temporal) | Managed Temporal workflow engines for durable workflows. | | [`secret` / `config`](/guides/secrets-and-config) | Parameterized sensitive and environment-specific values. | | `volume` | [Persistent directories](/guides/volumes) inside services. | | `environment` | Per-environment [config overrides](/guides/secrets-and-config#environment-overrides). | ## The workflow Whether you're a human or a coding agent, working with Specific follows the same loop: 1. Create or edit `specific.hcl`. 2. Run `specific check` to validate the configuration - always, after every change. 3. Run `specific dev` to run the system locally, and `specific exec -- ` for one-off commands like migrations and seeding. 4. Run `specific deploy` to ship it. After deploying, manage the project from the [dashboard](https://dashboard.specific.dev): logs and metrics, scaling, database browsing, secrets, and custom domains. ## Designed for coding agents Your coding agent writes and maintains `specific.hcl`: you describe what you want to build, and the agent defines the infrastructure alongside the code. The CLI ships its own LLM-optimized documentation (`specific docs`), and `specific init` wires it into your agent's context. See [Coding agents](/coding-agents). --- # Local development Source: https://docs.specific.dev/concepts/local-development `specific dev` starts everything your project needs locally with a single command: databases, caches, object storage, real-time sync, durable workflows, and application services. ```bash specific dev ``` Specific reads `specific.hcl` and: 1. Installs and starts all required resources (Postgres, Redis, storage, sync, Temporal). 2. Starts your application services, using their `dev` commands where defined. 3. Launches the [local dashboard](/concepts/dashboard#the-local-dashboard). All connection details (database URLs, S3 credentials, ports) are injected into your services as environment variables. No `.env` files needed. The terminal output includes the URL of every service and the local dashboard. ## Ports Every service and resource gets its own local port, assigned automatically at startup. The local dashboard usually lands at `http://localhost:3000` with services on the ports next to it, and the exact URLs are printed when `specific dev` starts. Running several instances at once is fine; each gets its own set of ports. Reference ports with `port` (or `endpoint..port`) in `specific.hcl` and read them from the environment in your code. ## Config file watching While `specific dev` is running, changes to `specific.hcl` are detected automatically. As your coding agent updates the configuration, the environment reloads: new services start, removed services stop, and resource changes take effect without a manual restart. ## Service logs Each service's stdout and stderr are written to a per-service log file: ``` .specific/keys//logs/.log ``` Without `--key`, the path is `.specific/keys/default/logs/.log`. Each line is prefixed with an ISO-8601 timestamp and the stream it came from: ``` [2026-05-06T14:23:11.482Z] [stdout] Listening on port 3001 [2026-05-06T14:23:11.500Z] [stderr] warning: deprecated API ``` This makes logs easy for you or your coding agent to read or grep when debugging, instead of watching the live `specific dev` output: ```bash tail -f .specific/keys/default/logs/api.log grep -i error .specific/keys/default/logs/api.log ``` Each file is capped at 1 MB. When a service produces more output, the file is truncated to the most recent ~512 KB on a line boundary, so the path is stable and always contains the latest logs. ## One-off commands Use `specific exec` to run commands with a service's environment: migrations, seeds, scripts. If `specific dev` is running, it reuses the running resources; otherwise it starts what's needed temporarily: ```bash specific exec api -- npm run db:migrate ``` Use `specific psql` for an interactive database session, and `specific clean` to wipe local data for a fresh start. See the [CLI reference](/reference/cli). ## Multiple instances Run isolated dev environments side by side with `--key`. Each instance gets its own data and its own ports: ```bash specific dev --key feature-auth ``` Each instance stores its state under `.specific/keys//`, so databases and other data are fully isolated. **Automatic git worktree detection:** when working in a git worktree, Specific uses the worktree name as the instance key automatically; no `--key` flag needed. ## Tunnel mode Expose your local services to the internet with `--tunnel`. Each public service gets a publicly reachable URL, useful for sharing work, testing webhooks, or letting a remote agent reach your machine: ```bash specific dev --tunnel ``` Services are available at: ``` https://.tunnel.spcf.app ``` --- # Blume Docs Source: https://docs.specific.dev/examples/blume **[Live Demo](https://docs.specific.dev)** View this Blume site Blume builds static documentation by default. Server features such as its MCP endpoint and Ask AI require an Astro server adapter. Specific can run the standalone server produced by Blume's Node adapter without a platform-specific adapter. ## Configure Blume Enable server output and the Node adapter in `blume.config.ts`. This example also enables the optional MCP endpoint at `/mcp`. ```ts blume.config.ts import { defineConfig } from "blume"; export default defineConfig({ ai: { mcp: { enabled: true }, }, deployment: { output: "server", adapter: "node", site: "https://docs.example.com", }, }); ``` ## Configure Specific Place `specific.hcl` at the root of the Blume project: ```hcl specific.hcl build "docs" { base = "node" command = "pnpm run build" } service "docs" { build = build.docs command = "node dist/server/entry.mjs" endpoint { public = true health_check { path = "/" } } env = { PORT = port HOST = "0.0.0.0" } dev { command = "pnpm exec blume dev --port $PORT" env = { PORT = port } } } ``` The build produces Blume's standalone Node server. Specific binds it to the assigned port, exposes it publicly, and waits for the root health check before sending traffic. ## Run and deploy **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Blume Docs example ``` Your agent installs the CLI, adds the configuration above to your Blume project, runs it locally, and walks you through deploying. **Manual** 1. **Install dependencies** ```bash pnpm install ``` 2. **Run locally** ```bash specific dev ``` Open the docs URL printed in the terminal. Changes to Markdown, components, and configuration reload automatically. 3. **Deploy** ```bash specific deploy ``` Specific builds the site, starts the Node server, verifies the health check, and prints the production URL. Blume sites that do not use MCP, Ask AI, or other request-time features can use static output instead. The Node adapter is only required for server output. --- # Cache Source: https://docs.specific.dev/examples/cache **[Live Demo](https://cache-counter.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-cache-counter)** View on GitHub
![Cache service diagram](/images/examples/cache.png) ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Cache example ``` Your agent installs the CLI, clones the example, runs it locally, and walks you through deploying. **Manual** 1. **Install the CLI and clone** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-cache-counter npm install ``` 2. **Start the development server** ```bash specific dev ``` Open the URL shown in the output to see the counter increment on each visit. 3. **Deploy to production** ```bash specific deploy ``` --- # Database Source: https://docs.specific.dev/examples/database **[Live Demo](https://notes.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-notes-api)** View on GitHub
![Database service diagram](/images/examples/database.png) ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Database example ``` Your agent installs the CLI, clones the example, runs it locally, and walks you through deploying. **Manual** 1. **Install the CLI and clone** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-notes-api npm install ``` 2. **Start the development server** ```bash specific dev ``` Open the URL shown in the output to access the API. 3. **Deploy to production** ```bash specific deploy ``` --- # Database with Sync Source: https://docs.specific.dev/examples/database-with-sync **[Live Demo](https://realtime-click.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-realtime-click-counter)** View on GitHub
![Database with Sync service diagram](/images/examples/database-sync.png) ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Database with Sync example ``` Your agent installs the CLI, clones the example, runs it locally, and walks you through deploying. **Manual** 1. **Install the CLI and clone** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-realtime-click-counter npm install ``` 2. **Start the development server** ```bash specific exec web -- npm run db:migrate specific dev ``` Open the `web` service URL printed in the terminal (usually http://localhost:3001) to view the app. 3. **Deploy to production** ```bash specific deploy ``` --- # Durable Workflows Source: https://docs.specific.dev/examples/durable-workflows **[Live Demo](https://workflows.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-workflows)** View on GitHub
![Durable Workflows service diagram](/images/examples/workflows.png) ## How it works - **Development**: Runs a local Temporal server automatically via `specific dev` - **Production**: Connects to Temporal Cloud using configs and secrets ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Durable Workflows example ``` Your agent installs the Specific and Temporal CLIs, clones the example, runs it locally, and walks you through deploying. **Manual** 1. **Install prerequisites** Install the Temporal CLI from https://docs.temporal.io/cli ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-workflows npm install ``` 2. **Start the development server** ```bash specific dev ``` Open the URL shown in the output to schedule tasks and view their status. 3. **Deploy to production** Then deploy: ```bash specific deploy ``` You will automatically be prompted to input secrets and config values for a Temporal Cloud API Key, namespace and address. --- # Hello World Source: https://docs.specific.dev/examples/hello-world **[Live Demo](https://hello.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-hello-api)** View on GitHub
![Hello World service diagram](/images/examples/hello-world.png) ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Hello World example ``` Your agent installs the CLI, clones the example, runs it locally, and walks you through deploying. **Manual** 1. **Install the CLI and clone** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-hello-api ``` 2. **Start the development server** ```bash specific dev ``` Open the URL shown in the output to see the API response. 3. **Deploy to production** ```bash specific deploy ``` --- # Microservices Source: https://docs.specific.dev/examples/microservices **[Live Demo](https://microservices.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-microservices)** View on GitHub
![Microservices service diagram](/images/examples/microservices.png) - **Gateway** - Public-facing service that aggregates data from internal services - **Users** - Internal service that returns user data - **Products** - Internal service that returns product data ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Microservices example ``` Your agent installs the CLI, clones the example, runs it locally, and walks you through deploying. **Manual** 1. **Install the CLI and clone** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-microservices npm install ``` 2. **Start the development server** ```bash specific dev ``` Open the gateway URL shown in the output to see aggregated data from the internal services. 3. **Deploy to production** ```bash specific deploy ``` --- # Object Storage Source: https://docs.specific.dev/examples/object-storage **[Live Demo](https://file-storage.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-file-storage)** View on GitHub
![Object Storage service diagram](/images/examples/object-storage.png) ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Object Storage example ``` Your agent installs the CLI, clones the example, runs it locally, and walks you through deploying. **Manual** 1. **Install the CLI and clone** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-file-storage npm install ``` 2. **Start the development server** ```bash specific dev ``` Open the URL shown in the output to access the file manager. 3. **Deploy to production** ```bash specific deploy ``` --- # Secrets and Configs Source: https://docs.specific.dev/examples/secrets-and-configs **[Live Demo](https://secrets.spcf.app)** Try it in your browser **[Source Code](https://github.com/specific-dev/examples/tree/main/node-secrets)** View on GitHub
![Secrets and Configs service diagram](/images/examples/secrets.png) ## Get started **Coding agent** Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following https://start.specific.dev, using the Secrets and Configs example ``` Your agent installs the CLI, clones the example, runs it locally, prompts you for the secret and config values, and walks you through deploying. **Manual** 1. **Install the CLI and clone** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-secrets npm install ``` 2. **Start the development server** ```bash specific dev ``` You will be automatically prompted to input the secret and config values. Visit the URL in the output to see them in action. 3. **Deploy to production** ```bash specific deploy ``` --- # Alerts Source: https://docs.specific.dev/guides/alerts Every deployed service gets a set of default alerts. They are evaluated every minute from the same telemetry you can query with `specific query`, they drive the badge on **Alerts** in the sidebar, and on paid plans they notify you when they fire. You'll find them under **Alerts** in the dashboard; nothing needs to be configured. ## The default alerts | Alert | Severity | Applies to | Fires when | | ----- | -------- | ---------- | ---------- | | Elevated 5xx responses | critical | public services | at least 5% of requests in the last 5 minutes returned a 5xx status, given at least 20 requests, for 2 consecutive minutes. Counts every 5xx the ingress saw, whether your app or the platform produced it. | | Restarts and out-of-memory kills | critical | all services | a container of the service was restarted in the last 10 minutes: after crashing, after being killed for exceeding its memory limit, or after failing its liveness check, including a container stuck in a crash loop. Instances replaced by a deployment are not restarts. | | Slow responses | warning | public services | at least 5% of requests in the last 10 minutes took 3× longer than their route usually does, longer than the route's p99 over the past day, and over 1 second, given at least 100 requests. See [how slow responses are judged](#how-slow-responses-are-judged). | | Health-check failures | warning | all services | a running container failed a readiness or liveness probe in the last 10 minutes. Startup-probe failures and probes against instances that are shutting down or whose container was just restarted are ignored (a restart is the restarts alert's to report). | "Public services" are the ones reachable through the platform ingress (the ones with a domain); only those have request data. Preview environments get the same alerts, but never send notifications and are left out of the badge. There is deliberately no alert on error-level log lines: log severity is your application's own semantics, and apps legitimately log errors that are not problems. ## How alerts are evaluated Each alert is one SQL query over the [observability views](/guides/observability#schema) that returns a single number, compared against a threshold. It runs every minute (every five minutes for slow responses) with the same access as `specific query`, so it only ever sees your own environment's data. Open an alert in the dashboard to see the exact query. Paste it into `specific query` and you get the same value the alert saw: ```bash specific query "$(pbpaste)" ``` Every evaluation is recorded, so an alert's page graphs exactly the values that were checked, and you can read the same numbers yourself from `observability.alert_evaluations`: ```sql SELECT Timestamp, Value, State FROM observability.alert_evaluations WHERE ServiceName = 'web' AND AlertName = 'http-p99-latency' AND Timestamp > now() - INTERVAL 6 HOUR ORDER BY Timestamp ``` An alert is either **ok** or **firing**. It resolves once its value has stayed under the threshold for a while, 10 minutes for the request alerts and 30 for the restart and health-check alerts, rather than on the first clear evaluation: a service that fails a health check every twenty minutes is one incident, not a new alert each time. The condition line on the alert's page shows both the threshold and that window. ## How slow responses are judged The slow-responses alert measures **time to first byte** at the ingress: how long the platform waited for your service to start responding. Streamed responses and slow client downloads don't count against you, and requests that never reached your service (a client that gave up while sending its request, for instance) are ignored. Only successful responses and redirects count: a slow 404 is almost always a scanner probing for files that don't exist, and errors are reported by the 5xx alert. Rather than comparing to a fixed number, it compares each route to itself. A request is "slow" if it took at least 3× that route's own p90 over the trailing 24 hours, longer than the route's p99 over the same 24 hours, and at least a second. The alert fires when more than 5% of a window's requests were slow by that definition. A report page that always takes ten seconds is therefore not an alert, and neither is a long-poll that holds for twenty seconds whenever there is nothing new: it is 3× the route's p90 on a busy day, but never beyond the route's p99. A page that is suddenly slower than it has been, is. Routes are templated (`/api/users/{id}`, `/assets/{file}.svg`), so IDs and asset file names don't fragment the history. ## The badge **Alerts** in the sidebar carries a badge counting what is firing across the project, and nothing else: one firing critical alert colours the badge red, a firing warning colours it orange, and a project with nothing firing has no badge at all. The count is everything firing, not just the criticals, and it is never shortened. Click it for the alerts behind it. ## Notifications On Pro and above, a firing alert sends a notification within a minute of firing, with what fired, where, the numbers behind it (for example the failing routes and the request counts of that window, or the exit reason of a restarted container), and a link to the alert. Resolving sends no notification; an alert that keeps firing through brief recoveries is one notification, and one that fires again after resolving notifies at most once every 30 minutes. Where alerts go is set up under **Alert notifications** in organization settings. A destination is a name and a list of email addresses, webhooks, or both; the organization's members are suggested as you type, and everyone starts on the default email destination. Which destinations an alert uses is decided on the alert's own page, from the **Notifications** button in its header. The default destination reaches every alert; a destination you add reaches no alert until you switch it on there, so adding an on-call address never pages for everything at once. Switching every destination off is how you silence an alert. ### Webhooks In a destination, open **Webhook** and choose **Add webhook**. Enter a public HTTPS URL and an optional signing secret. Save it, then enable the destination from the alert's **Notifications** menu. Specific sends a JSON POST when the alert fires. The endpoint must return a 2xx status within 10 seconds. Redirects are not followed; private and reserved addresses are rejected. The payload uses version `1`. `X-Specific-Event-Id` matches `id`: ```json { "version": 1, "id": "alev_example", "type": "alert.fired", "createdAt": "2026-10-18T12:00:00.000Z", "data": { "eventKind": "fired", "alertName": "http-5xx", "alertTitle": "Elevated 5xx responses", "severity": "critical", "projectName": "Example", "environmentName": "main", "serviceName": "api", "summary": "10% of requests returned a 5xx status over the last 5 minutes", "facts": ["Requests: 100"], "startedAt": "Oct 18, 2026, 12:00 UTC", "alertUrl": "https://dashboard.specific.dev/projects/example/env/main/alerts/api/http-5xx" } } ``` Failed deliveries are retried with exponential backoff, up to five attempts total. A failure at one destination can repeat delivery to others. Deduplicate by event ID and return a 2xx for events already processed. With a signing secret, `X-Specific-Signature` is `sha256=` followed by the hex HMAC-SHA256 of `timestamp + "." + rawRequestBody`, using that secret. `X-Specific-Timestamp` is Unix seconds, refreshed on each attempt. Verify against the original body bytes, compare signatures in constant time and reject timestamps more than five minutes from your clock. ## Investigating an alert An alert's page has what you need to decide whether it matters: - **The graph** of the alert's value over the last six hours, with the threshold marked. - **A per-route breakdown** for the request-based alerts, so you can tell a spike that has passed from a route that is still slow or failing. - **History**: every time the alert fired or resolved, with the facts captured at that moment. - **A prompt** you can copy into your coding agent that carries the alert's context and its query. For the same investigation from the CLI, a few starting points: ```sql -- What fired across this environment in the last 7 days SELECT ServiceName, AlertName, count() AS fires FROM observability.alert_evaluations WHERE Outcome = 'value' AND State = 'firing' AND Timestamp > now() - INTERVAL 7 DAY GROUP BY ServiceName, AlertName ORDER BY fires DESC ``` ```sql -- The slowest routes of a service in the last hour (time to first byte) SELECT SpanAttributes['http.method'] AS method, SpanAttributes['http.route'] AS route, count() AS requests, round(quantile(0.9)(1000 * toFloat64OrZero(SpanAttributes['nginx.upstream_header_time']))) AS p90_ms FROM observability.traces WHERE Source = 'ingress' AND ServiceName = 'web' AND Timestamp > now() - INTERVAL 1 HOUR GROUP BY method, route ORDER BY p90_ms DESC LIMIT 10 ``` ```sql -- Why the health checks failed SELECT Timestamp, ResourceAttributes['k8s.pod.name'] AS pod, Body FROM observability.events WHERE ServiceName = 'web' AND LogAttributes['k8s.event.reason'] = 'Unhealthy' AND Timestamp > now() - INTERVAL 1 HOUR ORDER BY Timestamp DESC ``` ```sql -- Which instances restarted in the last day, and why they last exited SELECT ResourceAttributes['service.instance.id'] AS instance, max(Value) - min(Value) AS restarts, (SELECT argMax(Attributes['reason'], TimeUnix) FROM observability.metrics WHERE MetricName = 'k8s.container.status.last_terminated_reason' AND ResourceAttributes['service.instance.id'] = instance AND Value = 1) AS last_exit FROM observability.metrics WHERE ServiceName = 'web' AND MetricName = 'k8s.container.restarts' AND TimeUnix > now() - INTERVAL 1 DAY GROUP BY instance HAVING restarts > 0 ``` See [Observability](/guides/observability) for the full schema of these views. --- # Builds Source: https://docs.specific.dev/guides/builds Builds define how to produce artifacts. Services and crons reference builds. ```hcl specific.hcl build "api" { base = "node" command = "npm run build" } ``` ## Configuration One of the following is required (mutually exclusive): - `base` - base environment: `"node"`, `"python"`, `"go"`, `"rust"`, or `"java"`. For anything else, use a custom Dockerfile. - `dockerfile` - path to a custom Dockerfile, relative to `specific.hcl`. Optional fields: - `command` - build command to run after dependencies are installed (for example, `npm run build` or `go build -o api`). Only valid with `base`, not with `dockerfile`. - `root` - working directory for build commands, relative to `specific.hcl`. Defaults to `"."`. Sets the `WORKDIR` in the generated Dockerfile; services that reference this build inherit its root, and dependency detection looks here. - `context` - Docker build context scope, relative to `specific.hcl`. Defaults to `"."`. Controls what files are available to `COPY` and what's included in the deployment tarball. - `env` - environment variables available during the build, passed as Docker build args. See [Build-time environment variables](#build-time-environment-variables). ## Automatic dependency installation Specific detects your dependency manager (from the lockfile) and installs dependencies before running your build command. Installs are cached, so rebuilds are fast when only source code changes. For projects that only need dependencies installed, omit `command`: ```hcl specific.hcl build "api" { base = "node" } ``` Run `specific docs builds` for the exact per-base detection and install behavior. ## Build-time environment variables Use `env` to pass variables during the build step. This is useful for frameworks like Next.js that inline environment variables at build time. ```hcl specific.hcl build "web" { base = "node" command = "npm run build" env = { NEXT_PUBLIC_API_URL = "https://${service.api.public_url}/v1" NODE_ENV = "production" } } ``` Supported reference types: - String literals (for example, `"production"`). - `service..public_url` - the public domain of another service. - String interpolation with `${service..public_url}`. Since `public_url` doesn't include a scheme, use interpolation to compose full URLs. Other references (secrets, config, databases) are not available at build time. ## Monorepos Use `root` to set where build commands run. This applies to both the build command and dependency detection: ```hcl specific.hcl build "backend" { base = "node" root = "packages/backend" command = "npm run build" } build "frontend" { base = "node" root = "packages/frontend" command = "npm run build" } ``` ### `root` vs `context` The two are orthogonal: - `root` = where commands run (working directory). - `context` = what files are available (Docker build context / tarball scope). By default, `context` is the `specific.hcl` directory. Set it only to widen the scope, for example to include shared libraries in a parent directory: ```hcl specific.hcl # specific.hcl is in apps/myapp/, but shared libs are in libs/ build "api" { base = "node" root = "packages/api" context = "../" # Include parent dir so shared libs are available } ``` ## Custom Dockerfile For full control over the build, provide your own Dockerfile instead of `base`: ```hcl specific.hcl build "api" { dockerfile = "Dockerfile" } ``` When using a custom Dockerfile: - `command` is not allowed - define build steps in the Dockerfile itself. - `context` still controls the Docker build context. - `env` vars are passed as Docker build args; consume them with `ARG` instructions. - The service `command` still overrides the container `CMD` at runtime. ```hcl specific.hcl build "web" { dockerfile = "docker/Dockerfile.prod" context = "." env = { NEXT_PUBLIC_API_URL = service.api.public_url NODE_ENV = "production" } } ``` ```dockerfile Dockerfile FROM node:22.23.4-slim ARG NEXT_PUBLIC_API_URL ARG NODE_ENV WORKDIR /app COPY . . RUN npm ci && npm run build CMD ["npm", "start"] ``` ## Local development The `dev` block overrides the build command during `specific dev`. If no `dev` block is defined, the build is skipped in development; most dev servers (like `npm run dev`) handle building themselves. ```hcl specific.hcl build "spa" { base = "node" command = "npm run build" dev { command = "npm run build:watch" } } ``` For compiled languages (Go, Rust, Java), a `dev` block is almost always needed; without it, no binary is produced locally. Use a tool that rebuilds on file changes: ```hcl specific.hcl build "api" { base = "go" command = "go build -o api ./cmd/api" dev { command = "go run ./cmd/api" } } ``` ## Production During `specific deploy`, builds run in the cloud in parallel, after a local test run catches errors early. See [Deployments](/concepts/deployments) for the full pipeline. --- # Crons Source: https://docs.specific.dev/guides/crons A cron is a scheduled job: like a service, but instead of running continuously it runs a command on a recurring schedule. Each execution is a tracked **run** with its own logs and metrics. ```hcl specific.hcl build "worker" { base = "node" command = "npm run build" } cron "daily-cleanup" { build = build.worker command = "npm run cleanup" schedule = "0 2 * * *" # 02:00 UTC every day env = { DATABASE_URL = postgres.main.url } } postgres "main" {} ``` A cron is shaped like a service: it has its own `build` (or `image`), `command`, `env`, and `root`. To share code between a long-running service and a cron, point both at the same `build` block. ## Configuration - `schedule` (required) - when to run. Either a standard 5-field cron expression (`minute hour day-of-month month day-of-week`, interpreted in **UTC**) or a macro: `@hourly`, `@daily`, `@weekly`, `@monthly`, `@yearly`. - `build` - reference to a `build` block. Mutually exclusive with `image`. - `image` - a pre-existing container image. Mutually exclusive with `build`. - `command` - the command to run on each tick. Required when using `build`. - `root` - working directory for the command, relative to `specific.hcl`. Defaults to the referenced build's `root`. Builds place their context at `/app` in the image, so `root = "apps/web"` runs the command in `/app/apps/web`; `root` must stay inside the build's `context`. - `env` - environment variables, using the same references as services (`postgres.*`, `secret.*`, `config.*`, `service..private_url`, interpolated strings, and so on). - `dev` - a `{ command, env }` block to override the command and env when running the cron locally. Crons don't serve network traffic, so they cannot declare `endpoint`, `volume`, or `health_check` blocks. ### Schedule examples ```hcl schedule = "0 2 * * *" # 02:00 every day schedule = "*/15 * * * *" # every 15 minutes schedule = "0 9 * * 1" # 09:00 every Monday schedule = "@hourly" # top of every hour schedule = "@daily" # midnight every day ``` ### Image-based crons A cron can run a pre-existing image instead of a build: ```hcl specific.hcl cron "hourly-sync" { image = "python:3.12" command = "python /app/sync.py" schedule = "@hourly" } ``` ## Local development Crons do **not** fire on their schedule during `specific dev`, since that would be surprising while iterating. Instead, trigger a cron manually, exactly like a one-off command: ```bash specific exec daily-cleanup # runs the cron's own command specific exec daily-cleanup -- npm run cleanup:dry-run # run a different command ``` The command runs with the cron's resolved environment variables and working directory, with databases and other resources started, the same way `specific exec ` works. Crons are also listed in the [local dashboard](/concepts/dashboard#the-local-dashboard) (`specific dev` prints its URL) under **Crons**. ## Production When deployed, each cron runs on its schedule in the cloud. Every execution is a tracked run: - Runs are visible in the [dashboard](https://dashboard.specific.dev) under **Crons → (cron) → runs**. - Each run has its own logs and CPU/memory metrics, collected the same way as services. - Overlapping runs are allowed - if a run is still going when the next is due, the next one starts anyway. - You can trigger a run on demand with the **Run now** button. --- # Custom domains Source: https://docs.specific.dev/guides/domains By default, every public service gets a managed `*.spcf.app` URL. To serve a service from a domain you own, attach a custom domain to it. ## Attach a custom domain Deploy the service first, then run: ```bash specific domain add ``` For example: ```bash specific domain add web api.example.com ``` The command prints the DNS records to configure at your registrar. The DNS change is the one step Specific can't do for you. By default the command targets the environment linked in your project directory (set by the most recent `specific deploy`). To target a different environment, pass `--environment`: ```bash specific domain add web api.example.com --environment staging ``` ## DNS records The output includes two options; pick one based on what your DNS provider supports: - **CNAME** - recommended for subdomains (`api.example.com`, `app.example.com`). Points the subdomain at `ingress.specific.dev`. - **A record** - recommended for apex domains (`example.com`), since most DNS providers don't allow CNAMEs at the zone apex. Points the domain at one of three Specific ingress IPs (any one works; the output shows one). TLS certificates are issued automatically via Let's Encrypt once DNS resolves to Specific's ingress. There is no separate verification step: configure DNS and wait a few minutes. ## Confirming the domain Adding a domain registers it with Specific, but doesn't verify that DNS is configured correctly or that TLS has been issued. To verify end-to-end once DNS is configured: ```bash curl https:// ``` ## Managing domains in the dashboard Custom domains can also be added, listed, and removed in the [dashboard](https://dashboard.specific.dev). The dashboard is currently the only way to **remove** a custom domain; there is no `specific domain remove` command. ## Common questions ### Can I attach several domains to one service? Yes. Run `specific domain add` once per domain. A domain can only be attached to one service at a time; adding a domain that is already in use on Specific returns an error. ### How do I serve both `example.com` and `www.example.com`? Add them as two domains on the same service: an A record for the apex and a CNAME for `www`. Redirecting one to the other is up to your application. ### Do custom domains work in every environment? A domain is attached to a service in one environment, so staging and production can each have their own. Custom domains are available on paid plans; see [pricing](https://specific.dev/pricing). ### How long until the domain works? Usually a few minutes after the DNS record is in place: Specific issues the certificate as soon as the domain resolves to its ingress. DNS changes themselves can take longer to propagate, depending on the record's previous TTL. ### Do certificates renew automatically? Yes. Certificates are issued and renewed through Let's Encrypt without any action on your side, as long as the DNS record keeps pointing at Specific. --- # Frameworks and ORMs Source: https://docs.specific.dev/guides/frameworks Specific has no SDK and no framework adapters. A service is a build and a command, and everything it needs (ports, database URLs, secrets) arrives as environment variables. That is enough for almost any stack, and your coding agent will usually get a new framework running without help. A few tools have a step that is easy to get wrong the first time. Each section below covers one of them: the working configuration, and the trap it avoids. ## Next.js A Next.js app is one service that builds with `next build` and serves with `next start`. Next.js reads `PORT` from the environment, so the same commands work under `specific dev` and in production. ```hcl specific.hcl build "web" { base = "node" command = "npm run build" } service "web" { build = build.web command = "npm start" endpoint { public = true } env = { PORT = port DATABASE_URL = postgres.main.url } dev { command = "npm run dev" } } postgres "main" {} ``` **The trap: environment variables during the build.** `next build` executes application code to pre-render pages. Values from `specific.hcl`, such as `DATABASE_URL` or secrets, are not available during the build, so a page that connects to the database at build time fails the build. Make sure that code runs at request time instead: - Mark pages and layouts that need the database as dynamic (`export const dynamic = "force-dynamic"`), or fetch inside route handlers and server actions rather than at module scope. - Create database clients lazily, inside the function that uses them, not at import time. `NEXT_PUBLIC_*` variables are inlined into the client bundle at build time. They must be fixed values (a committed `.env` file or a string literal in the build's `env` block), never references to secrets or configs. ## Prisma Generate the client during the build, run migrations in a `pre_deploy` hook, and give Prisma both connection strings: ```hcl specific.hcl build "api" { base = "node" command = "npx prisma generate && npm run build" } service "api" { build = build.api command = "node dist/index.js" endpoint { public = true } env = { PORT = port DATABASE_URL = postgres.main.url DIRECT_URL = postgres.main.direct_url } pre_deploy { command = "npx prisma migrate deploy" } dev { command = "npm run dev" } } postgres "main" {} ``` ```prisma prisma/schema.prisma datasource db { provider = "postgresql" url = env("DATABASE_URL") directUrl = env("DIRECT_URL") } ``` **The traps.** Without `prisma generate` in the build command, the client does not exist when your code compiles. Without `DIRECT_URL`, migrations run through the connection pooler, which Prisma's migration engine does not support; `postgres..direct_url` bypasses it (see [Postgres](/guides/postgres)). And a `pre_deploy` hook is what makes a failed migration stop the deploy before new code serves traffic. In development, run Prisma commands through `specific exec` so they see the same `DATABASE_URL` as the running service: ```bash specific exec api -- npx prisma migrate dev --name add_users_table specific exec api -- npx prisma db seed ``` Reuse one `PrismaClient` instance (the usual `globalThis` singleton) so hot reloading does not open a new connection pool on every change. You do not need Prisma Studio: the local dashboard that `specific dev` serves has a database viewer and editor. ## Drizzle Read the connection string from the environment, and decide up front how migrations run: ```hcl specific.hcl build "api" { base = "node" command = "npm run build" } postgres "main" {} service "api" { build = build.api command = "node dist/index.js" endpoint { public = true } env = { PORT = port DATABASE_URL = postgres.main.url } dev { command = "npm run dev" } pre_deploy { command = "npx drizzle-kit migrate" } } ``` ```typescript drizzle.config.ts import { defineConfig } from "drizzle-kit"; export default defineConfig({ schema: "./src/db/schema.ts", out: "./drizzle", dialect: "postgresql", dbCredentials: { url: process.env.DATABASE_URL! }, }); ``` **The trap: `push` is not `migrate`.** `drizzle-kit push` applies schema changes straight to the local database and writes no migration files, so a schema change made with `push` alone never reaches production. Run `drizzle-kit generate` after every schema change and commit the files; `pre_deploy` then applies them with `migrate`. ```bash specific exec api -- npx drizzle-kit push # local iteration only specific exec api -- npx drizzle-kit generate # after every schema change ``` Specific recommends [Reshape](/guides/reshape) for schema migrations instead: it applies migrations automatically during `specific dev` and keeps the old and new schema available while a deploy rolls out. Drizzle then works purely as the query layer. Drizzle Studio is not needed; the local dashboard has a database viewer. ## Python In production, `base = "python"` builds the image and installs dependencies. In development, `specific dev` runs your command directly, so it has to point at a virtual environment you created: ```bash python3 -m venv .venv .venv/bin/pip install -r requirements.txt ``` ```hcl specific.hcl build "api" { base = "python" } service "api" { build = build.api command = "uvicorn app:app --host 0.0.0.0 --port $PORT" endpoint { public = true } env = { PORT = port DATABASE_URL = postgres.main.url } dev { command = ".venv/bin/uvicorn app:app --host 0.0.0.0 --port $PORT --reload" } } postgres "main" {} ``` **The trap: the dev command does not activate anything.** Service commands run in a plain shell, so `python app.py` in `dev` uses the system Python and misses your dependencies. Use the binary inside the virtual environment (`.venv/bin/python`, `.venv/bin/uvicorn`), or `source .venv/bin/activate && ...`. In a monorepo, `root` sets the working directory and the `.venv` path is relative to it. Framework commands that work, production and dev: - **Flask**: `flask run --host 0.0.0.0 --port $PORT` with `FLASK_APP` in `env`; add `--reload` in `dev`. - **FastAPI**: `uvicorn app:app --host 0.0.0.0 --port $PORT`, as above. - **Django**: `gunicorn myproject.wsgi --bind 0.0.0.0:$PORT` in production, `python manage.py runserver 0.0.0.0:$PORT` in `dev`, and `python manage.py migrate` in a `pre_deploy` hook. Imports resolve normally because `specific dev` sets the working directory to the service's `root` (or the project root), so `from myapp.utils import ...` and `python -m myapp` both work. ## Something else? Any language works the same way: a `build` with a `base` or a Dockerfile, a `command`, and `PORT` from the environment. See [Builds](/guides/builds) for the managed base images and [Services](/guides/services) for endpoints, health checks, and deploy hooks. If your agent hits a repeatable trap with another tool, `specific feedback "..."` (once enabled in your user settings) is the fastest way to get it onto this page. --- # Jobs Source: https://docs.specific.dev/guides/jobs A **job** is a single execution of a user-supplied command inside a one-off container built from the currently-running service. The container uses the same image, environment variables, and resources as the service's live deployment; only the command is different. Jobs are the remote equivalent of [`specific exec`](/reference/cli#specific-exec). Where `specific exec` runs a one-off command against your local dev environment, a job runs against the deployed service in production (or any other environment). Use them for ad-hoc, on-demand work such as: - One-off data backfills or corrections. - Reconciling state, purging a cache, or replaying a queue. - Running a debugging or diagnostic script against production data. :::info **Don't use jobs for database migrations.** Migrations should run in a [`pre_deploy` hook](/guides/services#deploy-hooks) so they're tied to the deployment lifecycle: the hook runs before the new service version starts, and if it fails, the deployment is aborted before any traffic reaches the new code. Jobs are decoupled from deployments and have no such safety net. ::: ## Running a job Open the [dashboard](https://dashboard.specific.dev), navigate to a service, and open the **Jobs** tab. Click **Run job**, fill in an optional name and a command, and submit. You are redirected to the job's detail page, where you can watch its state and stream logs in real time. The command runs in a shell, so pipes and `&&` work. Because the job is built from the service's live deployment, it always sees the same secrets, configs, and resource bindings as the running service. There is no drift between what the service runs with and what the job runs with. Re-running a previous job pre-fills the modal with its name and command, convenient for replaying a task after fixing a bug. ## Lifecycle A job transitions through the following states: 1. `pending` - the job has been recorded. 2. `queued` - the job's workflow has been started. 3. `running` - the job container is running. 4. One of: - `succeeded` - the command exited with code `0`. - `failed` - the command exited with a non-zero code, or the underlying infrastructure rejected the job. - `cancelled` - the job was cancelled via the dashboard before it finished. ## Caveats - **The service must be deployed.** A job builds its container from the service's live deployment; if the service has never been deployed, the job fails with a clear error. - **No retries on failure.** If the command exits non-zero, the job is marked `failed`. Start a new job (or re-run) to try again. - **Single container only.** Sidecars and init containers are not replicated - only the primary container runs. - **Concurrent jobs are allowed.** Multiple jobs can run at the same time against the same service; be mindful of shared state. - **Volume contention.** If the service mounts a single-writer volume and runs on different underlying hardware than the job, the job can fail to schedule. - **Job records are cleaned up one hour after completion.** Logs remain queryable for the standard [retention window](/guides/observability#schema). --- # Observability Source: https://docs.specific.dev/guides/observability Every deployed environment streams logs and metrics into a queryable store. Use `specific query` to run SQL against this data when debugging production incidents, investigating regressions, or doing ad-hoc analytics. If a Reshape application logs `function ... does not exist`, `type ... does not exist`, or `operator does not exist`, inspect [schema-qualified references](/guides/reshape#troubleshooting-missing-functions-types-or-operators) before installing extensions or changing the connection string. These failures can happen after a successful deployment when an affected query first runs. ## Running a query ```bash # Inline specific query "SELECT count() FROM observability.logs" # Against a specific environment specific query --environment staging "SELECT * FROM observability.logs LIMIT 5" # From a file via stdin cat queries/p99.sql | specific query # Machine-readable output for agents and scripts specific query --format jsonl "SELECT Timestamp, Body FROM observability.logs LIMIT 5" ``` Flags: | Flag | Description | | ---- | ----------- | | `-e, --environment ` | Target environment by name or ID (defaults to the current one). Run `specific status` to list environments. | | `--db ` | Run the query against one of the environment's **Postgres databases** (read-only) instead of the observability store. The SQL is standard Postgres, and the schema is your application's tables; see [Postgres](/guides/postgres). | | `--format ` | Output format. Defaults to `table` on a terminal, `jsonl` when piped. | Queries are automatically scoped to the selected environment: you can't see data from other environments and don't need to filter on environment yourself. Queries are read-only: `INSERT`, `UPDATE`, `DELETE`, and DDL are rejected. Each query is capped at 30 seconds of execution time, returns at most 100,000 rows, and the SQL string is limited to 50,000 characters. The `table` format truncates wide values for readability. Agents and scripts should use `jsonl`, `json`, or `csv` for complete, untruncated values. Notices are printed to stderr so stdout remains parseable. ## Choosing an environment `specific query` runs against exactly one environment. Run `specific status` to discover every environment and its ID. The output has two sections: - **Environments** - long-lived environments such as `production` and `staging`. - **Preview environments** - ephemeral environments created for pull requests (plus any manually created previews), each with its name, `env_...` ID, PR number and title, deployed URL, and expiry. Preview environments stream logs and metrics exactly like long-lived ones. To inspect one, pass its name or ID to `--environment`; that's the only way to reach a preview's data, since queries are auto-scoped: ```bash specific query --environment preview-a1b2c3d4 \ "SELECT Timestamp, ServiceName, Body FROM observability.logs WHERE SeverityNumber >= 17 ORDER BY Timestamp DESC LIMIT 50" ``` ## Schema Four views are exposed in the `observability` database: `logs`, `metrics`, `traces` and `events`. Column names follow OpenTelemetry's ClickHouse exporter conventions and are **case-sensitive**, so use `SeverityText`, `ServiceName`, and `ResourceAttributes` exactly as shown. If unsure, run `DESCRIBE observability.logs`. ### observability.logs Unified log stream from services. Retention: up to 30 days (your plan may restrict how far back queries can read; a cutoff prints a note on stderr). | Column | Type | Notes | | ------ | ---- | ----- | | `Timestamp` | DateTime64(9) | When the log was emitted; supports time arithmetic (`Timestamp > now() - INTERVAL 1 HOUR`). | | `ServiceName` | String | Service that emitted the log. | | `SeverityText` | String | | | `SeverityNumber` | UInt8 | | | `Body` | String | The log message. | | `LogAttributes` | Map(String, String) | Per-event attributes. | | `ResourceAttributes` | Map(String, String) | Resource labels (for example, `service.name`, `deployment.environment.name`). | | `TraceId` | String | Distributed-tracing trace ID, if present. | | `SpanId` | String | Distributed-tracing span ID, if present. | Also exposed but rarely queried directly: `EnvironmentId`, `ProjectId` (used for auto-scoping), `TraceFlags`. ### observability.metrics Unified metrics from services. Retention: up to 90 days. | Column | Type | Notes | | ------ | ---- | ----- | | `TimeUnix` | DateTime64(9) | Measurement timestamp; supports time arithmetic. | | `MetricName` | String | For example, `container.cpu.time` (see below). | | `MetricType` | String | `'gauge'` or `'sum'`. | | `Value` | Float64 | Measured value. | | `ServiceName` | String | Service that emitted the metric. | | `Attributes` | Map(String, String) | Metric dimensions. | | `ResourceAttributes` | Map(String, String) | Resource labels. | ### Service metrics Emitted for every running service container: | Metric | Type | Notes | | ------ | ---- | ----- | | `container.cpu.time` | sum | Cumulative CPU seconds; rate it for utilization. | | `container.cpu.usage` | gauge | Current CPU usage in cores. | | `container.cpu.limit_utilization` | gauge | Fraction of CPU limit used (0–1). | | `container.memory.working_set` | gauge | Memory in active use (bytes), the right number for "is this service close to OOM". | | `container.memory.usage` | gauge | Total memory usage including page cache (bytes). | | `container.memory.available` | gauge | Memory available before the container limit (bytes). | | `k8s.volume.available` | gauge | Free space on attached volumes (bytes). | | `k8s.volume.capacity` | gauge | Total capacity of attached volumes (bytes). | | `k8s.container.restarts` | sum | Cumulative restarts of the service's container, one series per instance (`ResourceAttributes['service.instance.id']`). Diff it over a window; an instance replaced by a deployment starts a new series at zero. | | `k8s.container.status.last_terminated_reason` | gauge | `1` for the container's last exit reason, in `Attributes['reason']` (`OOMKilled`, `Error`, `Completed`). | ### observability.traces OpenTelemetry spans. Today every row is the edge span the platform's ingress records for a request to one of your **public** services (`Source = 'ingress'`): one span per request, so counting rows counts requests. Requests between your services never pass the ingress and are not represented; neither are responses served from the CDN edge cache. Retention: up to 30 days. | Column | Type | Notes | | ------ | ---- | ----- | | `Timestamp` | DateTime64(9) | Span start; supports time arithmetic. | | `TraceId` | String | Trace ID. The ingress forwards it upstream as a W3C `traceparent` header, so an app that logs it can be correlated with `observability.logs.TraceId`. | | `SpanId`, `ParentSpanId` | String | `ParentSpanId` is empty for the edge span. | | `SpanName`, `SpanKind` | String | `SpanKind` is `'Server'` for ingress spans. | | `ServiceName` | String | Your service that handled the request. | | `SpanAttributes` | Map(String, String) | HTTP details, see below. | | `ResourceAttributes` | Map(String, String) | `service.name`, `specific.project.id`, `specific.environment.id`. | | `Duration` | UInt64 | Nanoseconds, as OpenTelemetry defines it; divide by `1e6` for milliseconds. | | `StatusCode`, `StatusMessage` | String | The OpenTelemetry **span** status (`'Unset'`, `'Ok'`, `'Error'`), not the HTTP status. | | `Source` | String | `'ingress'`. | `SpanAttributes` keys (values are strings): | Key | Notes | | --- | ----- | | `http.method` | `GET`, `POST`, … | | `http.target` | Request path. Newly collected spans omit query strings, fragments, and URL userinfo; older retained rows may still contain them. | | `http.route` | Path with ID-looking segments replaced by `{id}` (`/api/users/{id}`) and static-asset file names by `{file}.ext` (`/assets/{file}.svg`), a heuristic since the platform has no route manifest. Group by this for per-endpoint views. | | `http.status_code` | HTTP status as a string: `toUInt16OrZero(SpanAttributes['http.status_code']) >= 500`. | | `http.server_name` | Hostname the request arrived on. | | `http.user_agent`, `http.x_forwarded_for`, `net.peer.ip` | Client details. | | `nginx.upstream_header_time` | Seconds until your service sent its response headers (time to first byte), i.e. how fast the service answered. Unaffected by streamed responses and slow client downloads, so use this for "is my service slow". A comma-separated list when nginx retried another instance; absent when the request never reached your service (nginx's own 408/499). | | `nginx.upstream_response_time` | Seconds until your service finished sending its response. `Duration` additionally runs until the client received the last byte. Same list/absent conventions as above. | ### Ingress URL privacy After the updated ingress collector configuration rolls out, newly collected analytics and request spans omit all query strings, fragments and leading HTTP(S) URL userinfo from URL fields and span names. Standalone `url.query` and `url.fragment` attributes are removed. Raw Referer is dropped entirely: neither `http.referer` nor its originating header is exported. For dashboard analytics only, nginx derives an ICANN registrable domain (for example, `news.ycombinator.com/item?id=123` becomes `ycombinator.com`, and `www.google.co.uk` becomes `google.co.uk`). Subdomains, paths, query strings, fragments, ports and userinfo are not retained as referral attribution. Private hosting suffixes are collapsed too: `tenant.github.io` becomes `github.io`. IP addresses, unknown suffixes, credentials in the authority, malformed URLs and duplicate headers receive no attribution. This field is not exported to request traces. Top Referrers uses only the derived domain, with no fallback to historical raw URLs. Self-referrals are excluded at the same domain granularity, so other sites sharing a parent domain (including `spcf.app`) are grouped and excluded together. Domains themselves may still contain sensitive information; this is data minimization, not universal secret detection. Paths, HTTP status, method and latency remain available; query-dependent RSC and Referer-based ACME exclusions still apply to analytics, not request traces. This is a telemetry-only policy: it does not change URLs or headers forwarded to your application. Historical rows and copies are not deleted by this change and can still contain unredacted data. This is not universal secret detection: credentials in path segments, custom attributes or application logs are outside this policy. URL-privacy transformation errors reject the incoming telemetry payload, potentially losing otherwise valid spans; they do not reject the application's HTTP request. ### observability.events Kubernetes events about your service pods (probe failures, restarts, out-of-memory kills), in the OpenTelemetry log-record shape. Retention: up to 30 days. | Column | Type | Notes | | ------ | ---- | ----- | | `Timestamp` | DateTime64(9) | When the event was recorded. | | `ServiceName` | String | Your service the pod belongs to. | | `SeverityText`, `SeverityNumber` | | Kubernetes `Warning` events, plus the `Normal` "Killing" event that marks a pod shutting down. | | `Body` | String | The event message, e.g. `Readiness probe failed: ...`. | | `LogAttributes` | Map(String, String) | `k8s.event.reason` (`Unhealthy`, `BackOff`, `OOMKilled`, `Killing`, …), `k8s.event.count`, `k8s.event.action`. | | `ResourceAttributes` | Map(String, String) | `k8s.pod.name`, `k8s.object.kind`, `k8s.object.name`, `service.name`, `specific.*`. | ### observability.alert_evaluations Every evaluation of your default alerts. This is what the alert graph in the dashboard shows; query it to see the exact numbers that did or didn't fire. Retention: 30 days. | Column | Type | Notes | | ------ | ---- | ----- | | `Timestamp` | DateTime64(3) | When the alert was evaluated. | | `AlertName` | String | `http-5xx`, `http-p99-latency`, `probe-failures`, `restart-loops`. | | `ServiceName` | String | The service the alert is about. | | `Outcome` | String | `value`, `no_data`, `error` (the query failed), or `paused` (skipped during a volume-backed rollout). | | `Value` | Nullable(Float64) | The alert query's result; NULL unless `Outcome` is `value`. | | `State` | String | The alert's state after the evaluation: `ok`, `firing`, `error`. | ## Default alerts Every deployed service gets a set of default alerts, evaluated every minute from these same views and listed under **Alerts** in the dashboard; the project health indicator reflects whatever is firing. Each alert is a plain SQL query returning one number, compared against a threshold: open it in the dashboard to see the exact query, and paste it into `specific query` to get the same value the alert saw. What the alerts measure, how slow responses are judged, and how notifications work is covered in the [Alerts guide](/guides/alerts). ## Debugging recipes Recent errors for a service: ```sql SELECT Timestamp, Body FROM observability.logs WHERE ServiceName = 'api' AND SeverityNumber >= 17 AND Timestamp >= now() - INTERVAL 1 HOUR ORDER BY Timestamp DESC LIMIT 50 ``` Search log bodies for a substring: ```sql SELECT Timestamp, ServiceName, Body FROM observability.logs WHERE positionCaseInsensitive(Body, 'connection refused') > 0 AND Timestamp >= now() - INTERVAL 6 HOUR ORDER BY Timestamp DESC LIMIT 100 ``` Service CPU timeseries in 1-minute buckets: ```sql SELECT toStartOfMinute(TimeUnix) AS bucket, avg(Value) AS cpu_cores FROM observability.metrics WHERE MetricName = 'container.cpu.usage' AND ServiceName = 'api' AND TimeUnix >= now() - INTERVAL 1 HOUR GROUP BY bucket ORDER BY bucket ``` Correlate all logs belonging to one trace: ```sql SELECT Timestamp, ServiceName, Body FROM observability.logs WHERE TraceId = '' ORDER BY Timestamp ``` Requests, error count and p95 latency per endpoint over the last hour: ```sql SELECT ServiceName, SpanAttributes['http.method'] AS method, SpanAttributes['http.route'] AS route, count() AS requests, countIf(toUInt16OrZero(SpanAttributes['http.status_code']) >= 500) AS errors, round(quantile(0.95)(Duration) / 1e6) AS p95_ms FROM observability.traces WHERE Source = 'ingress' AND Timestamp > now() - INTERVAL 1 HOUR GROUP BY ServiceName, method, route ORDER BY requests DESC LIMIT 50 ``` ## Performance The views are partitioned and ordered to make environment-scoped, time-bounded queries fast. To stay within the 30-second limit: - **Always filter by time** - `Timestamp >=` for logs, traces and events, `TimeUnix >=` for metrics. Unbounded scans across 30/90 days will time out. - **Add `ServiceName` and/or `MetricName`** to narrow the partition whenever you can. - **Select only the columns you need** - `Body`, `LogAttributes`, and `ResourceAttributes` are the heavyweight columns. - **`LIMIT` exploratory queries** while shaping them. ## Discovering data When you don't know what's there, ask the database: ```sql SHOW TABLES FROM observability; DESCRIBE observability.logs; SELECT DISTINCT ServiceName FROM observability.logs LIMIT 50; SELECT DISTINCT MetricName FROM observability.metrics LIMIT 100; ``` ## ClickHouse dialect The observability store is ClickHouse, so `specific query` without `--db` uses the ClickHouse SQL dialect (unlike `--db`, which is standard Postgres). Commonly needed functions: - `now()`, `now64()` - current time - `toStartOfMinute(t)`, `toStartOfFiveMinutes(t)`, `toStartOfHour(t)` - bucket timestamps - `positionCaseInsensitive(haystack, needle)` - case-insensitive substring search - `JSONExtractString(s, 'field')`, `JSONExtractInt`, `JSONExtractFloat` - pull fields out of JSON log bodies - `LogAttributes['key']`, `Attributes['key']`, `ResourceAttributes['key']` - read map columns --- # Postgres Source: https://docs.specific.dev/guides/postgres Managed PostgreSQL database instances, powered by [Neon](https://neon.tech) in production. One line in `specific.hcl` gives you a local database during `specific dev` and a managed production database on deploy. ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint { public = true } env = { DATABASE_URL = postgres.main.url } } postgres "main" {} ``` ## Connection attributes Reference these in `env` blocks: | Attribute | Description | | --------- | ----------- | | `url` | Full connection string (for example, `postgres://user:pass@host:5432/dbname`). | | `host` | Database host. | | `port` | Database port. | | `user` | Database user. | | `password` | Database password. | | `name` | Database name. | | `direct_url` | Non-pooled connection string, bypassing the connection pooler. Use when you need a direct connection (for example, Prisma's `directUrl`). | | `direct_host` | Non-pooled database host. | ## Extensions The following PostgreSQL extensions are available in both development and production. Enable each with `CREATE EXTENSION` in a migration: | Extension | Enable with | Use for | | --------- | ----------- | ------- | | [pgvector](https://github.com/pgvector/pgvector) | `CREATE EXTENSION vector;` | Vector similarity search. | | [pg_search](https://docs.paradedb.com/documentation/getting-started/quickstart) | `CREATE EXTENSION pg_search;` | Full-text search with BM25 ranking, powered by ParadeDB. | | [PostGIS](https://postgis.net/documentation/) | `CREATE EXTENSION postgis;` | Geospatial queries and indexing. | | [pg_trgm](https://www.postgresql.org/docs/current/pgtrgm.html) | `CREATE EXTENSION pg_trgm;` | Trigram-based fuzzy text matching and `LIKE`/`ILIKE` indexes. | | [ltree](https://www.postgresql.org/docs/current/ltree.html) | `CREATE EXTENSION ltree;` | Hierarchical structures: categories, org charts, taxonomies. | | [btree_gist](https://www.postgresql.org/docs/current/btree-gist.html) | `CREATE EXTENSION btree_gist;` | B-tree types in GiST indexes: exclusion constraints (for example, no overlapping bookings) and mixed-type multicolumn indexes. | | [unaccent](https://www.postgresql.org/docs/current/unaccent.html) | `CREATE EXTENSION unaccent;` | Accent-insensitive text search (strips diacritics). | | [pgcrypto](https://www.postgresql.org/docs/current/pgcrypto.html) | `CREATE EXTENSION pgcrypto;` | Cryptographic functions: digests, HMAC, bcrypt password hashing, PGP encryption, random UUIDs and bytes. | | [uuid-ossp](https://www.postgresql.org/docs/current/uuid-ossp.html) | `CREATE EXTENSION "uuid-ossp";` | `uuid_generate_v1()` through `uuid_generate_v5()` for schemas written against them. New code can use the built-in `gen_random_uuid()` instead. | | [pgRouting](https://docs.pgrouting.org/) | `CREATE EXTENSION pgrouting CASCADE;` | Routing and network analysis (requires PostGIS, installed by `CASCADE`). | With [Reshape](/guides/reshape#functions-types-and-the-search-path), qualify extension functions, types, and operators in application SQL using their owning schema, for example `public.similarity(...)`, `::public.vector`, and `OPERATOR(public.<=>)`. Keep application table names unqualified and preserve Specific's managed `search_path`. The Reshape guide covers missing-function/type/operator errors. For graph-shaped workloads, use `ltree` for hierarchies and `pgrouting` for weighted networks and shortest-path queries. Apache AGE and Cypher queries are not supported. ## Querying the database ### Local development Use `specific psql` to connect to a development database. The database is started automatically if it isn't running. ```bash # Interactive session specific psql main # Run a single query specific psql main -- -c "SELECT * FROM users LIMIT 5" # List tables specific psql main -- -c "\dt" ``` ### Production Use `specific query --db ` to run read-only Postgres SQL against a deployed environment's database: ```bash # Query the production "main" database specific query --db main "SELECT * FROM users LIMIT 5" # Target a specific environment with machine-readable output specific query --db main --environment staging --format jsonl \ "SELECT id, email FROM users ORDER BY created_at DESC LIMIT 20" ``` Production queries are **read-only**: `INSERT`, `UPDATE`, `DELETE`, and DDL are rejected (the query runs inside a read-only transaction). Without `--db`, `specific query` targets [observability data](/guides/observability) instead. You can also browse data and manage the database from the [dashboard](https://dashboard.specific.dev). ## Schema migrations For zero-downtime schema migrations, enable Reshape: ```hcl specific.hcl postgres "main" { reshape { enabled = true } } ``` See [Reshape migrations](/guides/reshape) for how migrations are written and managed. If you prefer your ORM's migration tooling instead, run it via a `pre_deploy` hook; run `specific docs integrations/prisma` or `specific docs integrations/drizzle` for setup guidance. ## Storage limits Each plan includes a database storage limit, listed on the [pricing page](https://specific.dev/pricing). It applies to each database branch separately, so every database and every preview branch gets the same limit. The database's metrics page in the dashboard shows its size against the limit. To stay under it, drop or truncate data, or upgrade the plan from the organization's billing settings in the dashboard. An organization whose databases already hold more than a plan allows cannot switch to that plan; the billing page names the project that is over. ## Real-time sync Postgres changes can be streamed to clients in real time. See [Real-time sync](/guides/sync). ## Preview environments In [preview environments](/guides/previews), databases are branched copy-on-write from the parent environment, so previews start with real data instantly. ## External access credentials Open your database’s **Access** tab in the dashboard to create a named credential. Choose **Read-only** for analytics tools and AI connectors, or **Full access** for administrative tools. Existing credentials retain full access. Passwords are shown once when created or rotated; revoking a credential prevents new connections. Rotation and revocation apply across the primary and all replicas. Existing sessions may stay connected until the client reconnects. Read-only credentials receive SELECT privileges and respect row-level security. Tables and schemas created by Specific’s service role or direct migration connection are included automatically. Use the direct connection for migrations; objects created by other custom roles need appropriate grants. As with any Postgres role, explicit grants to PUBLIC and publicly executable SECURITY DEFINER functions can provide additional access; review those when exposing a database to external tools. ## Read replicas In **Scale → Read replicas**, create a named replica for analytics and reporting. Each replica has its own compute range and scales to zero after five minutes without activity. It shares the database’s data and may briefly lag behind recent writes. Select **Connect** to open a new credential dialog with the replica selected. Access lists all credentials with their permissions. Choose the connection target when creating a credential or viewing its connection details. Replica connections only offer read-only credentials. These credentials also work on the primary with the same read-only permissions. Replica compute is included in the database’s existing compute charge on the usage page and invoices. All compute uses that database’s rate, including the higher rate when real-time sync is enabled; the creation dialog shows the current rate. Shared storage is charged once. There is no separate per-replica billing breakdown. Replicas survive redeploys. Preview environments start without replicas. Deleting a replica disconnects its clients but retains the data and access credentials. Deleting the database or environment removes its replicas. Replica configuration is managed in the dashboard rather than in `specific.hcl`. --- # Preview environments Source: https://docs.specific.dev/guides/previews A preview environment is a temporary copy of an existing environment. By default, it runs the same services with their own URLs and their own network namespace, on top of its own copy of the parent's stateful data, so a change can be tested end to end without touching the parent. ## How previews are created - **Per pull request** - with the GitHub integration connected, Specific creates a preview environment for each open pull request, keeps it up to date as new commits are pushed, and posts its URL back on the PR. Connect GitHub from the [dashboard](https://dashboard.specific.dev). - **Manually** - deploy one on demand with `specific deploy --preview`. Preview environments are ephemeral: pull-request previews are removed when the PR is closed or merged, and a preview can be given an expiry, after which Specific cleans it up automatically. Run `specific status` to list every environment and its `env_...` ID, including preview environments, or `specific status --previews` to see whether previews are enabled, whether GitHub PR previews are configured, and whether PRs need a label. Target a preview with `--environment` on commands that take one. Some projects require the `specific:preview` label on a pull request before Specific creates its preview. With label gating on, adding the label starts the preview and removing it tears the preview down. ## Redeploying a preview To update an existing preview, for example with a changed config value, target it directly: ```bash specific deploy --environment env_... --config FEATURE_FLAG=true ``` `--preview` always creates a new manual preview, so do not combine it with `--environment`. Preview builds reuse the parent environment's build cache, so the first deploy of a preview is fast when it shares dependencies and build steps with the parent. ## Partial previews For projects with several services, you can turn on **Partial previews** in the parent environment's dashboard settings. New previews then deploy only the services affected by your changes and connect unchanged services to the parent environment. This makes previews faster and uses fewer resources, but they are not fully isolated from the parent. Specific clones databases and buckets used by the affected services, while resources used only by unchanged services stay in the parent environment. If a change does not affect any service, Specific skips creating an empty preview. ## What's copied from the parent A full preview branches off a parent environment and starts from its data. Each resource is forked in the way that's fastest for that service: - **Postgres** databases are branched - an instant, copy-on-write branch. - **Object storage** buckets are forked. - **Volumes** are cloned - an instant, copy-on-write copy of the parent volume. The preview gets its own isolated database, buckets, and volumes; writing to them never affects the parent. Partial previews clone only the resources used by services running in the preview. A volume clone is an exact replica of the parent's on-disk data (uploads, caches, and search indexes alike), so the preview's service boots on it exactly as it would after a restart, with no extra configuration. ## Secrets and config A preview also inherits the parent environment's secrets and config values, so its services start with the same configuration the parent runs with - nothing to re-enter. To give previews a different value for a specific secret or config - say a sandbox API key or a test-only endpoint - set a **preview override** on the parent environment's Secrets and config page in the [dashboard](https://dashboard.specific.dev). Every preview branched from that environment then uses the override for that value while still inheriting everything else. See [Secrets and config](/guides/secrets-and-config). ## Observability Previews stream logs and metrics exactly like long-lived environments. Query them by targeting the preview with `--environment`: ```bash specific query --environment preview-a1b2c3d4 \ "SELECT Timestamp, Body FROM observability.logs ORDER BY Timestamp DESC LIMIT 50" ``` See [Observability](/guides/observability) for the full query reference. ## Inspecting a preview from a fresh checkout CI runners and fresh clones have no `.specific/project_id`, so `specific status` cannot find the project. Use the deployment ID from the PR comment directly: ```bash specific deployment show --output --format json ``` To use `specific status` or `--environment` from such a checkout, run `specific project list` and save the chosen `proj_...` ID to `.specific/project_id`. ## Common questions ### Does a preview share anything with the parent? A full preview shares nothing: it has its own services, database branch, buckets, volumes, Redis and Temporal instances, and URLs. A partial preview shares the services it did not change, and the resources only those services use, with the parent. ### Can a preview modify production data? No. Writes go to the preview's own copies. In a partial preview, an unchanged service still runs in the parent and keeps using the parent's data, which is why partial previews skip crons that would write to it. ### How is a preview cleaned up? Pull-request previews are removed when the PR is closed or merged. Manual previews expire after their expiry passes and are removed by a scheduled cleanup. Deleting a preview deletes its database branch, buckets, and volumes with it. ### Can I give a preview different secrets? Yes. Set a preview override on the parent environment's Secrets and config page in the dashboard, and every preview branched from it uses that value. --- # Protected environments Source: https://docs.specific.dev/guides/protected A protected environment requires sign-in before any request reaches your services. Specific enforces this at the edge, so it applies to every public endpoint and every domain in the environment without any application code. Turn it on per environment from the [dashboard](https://dashboard.specific.dev), under the environment's settings: **Require sign-in for services**. Toggling it redeploys the environment so it takes effect immediately. Protected environments are included in the Scale plan and above; see the [pricing page](https://specific.dev/pricing). ## Who can sign in Members of the Specific organization that owns the project. Signing in goes through the same identity provider you use for Specific itself, and anyone who isn't a member of the owning organization is refused. That makes protected environments a fit for internal tools, staging environments, and admin panels. It is **not** a login for your own end users, who don't have Specific accounts. Build that authentication in your application. ## Identifying the signed-in user Once an environment is protected, every request reaches your service with an `X-Specific-Token` header: an HS256-signed JWT describing who is signed in. Reference the endpoint's `token_secret` in your `specific.hcl` to receive the verification key: ```hcl specific.hcl service "web" { build = build.web endpoint { public = true } env = { SPECIFIC_TOKEN_SECRET = endpoint.default.token_secret } } ``` Only services that ask for the key receive it, and it is scoped to a single endpoint of a single environment: a token minted for staging can't verify in production. See [Endpoints](/guides/services#multiple-named-endpoints) for the other endpoint reference attributes. The token's claims: | Claim | Meaning | | ------- | --------------------------------------------------------------------- | | `sub` | Stable Specific user ID (`user_…`). Use this to key your own records. | | `email` | The signed-in user's verified email. Absent if we couldn't verify one. | | `host` | The hostname the token was issued for. | | `env` | The environment ID (`env_…`). | | `iat` | Issue time. | | `exp` | Expiry, 24 hours after sign-in. | A few things that differ from a typical auth setup: - The header is not stripped on unprotected endpoints, so a request carrying one doesn't mean protection is on. Only a valid signature makes it trustworthy; treat a missing or unverifiable token as unauthenticated. - The `__specific_sess_v2` cookie is the session credential, not an identity assertion. Don't parse it; the header is the supported interface. - Any service in the same environment can send this header to another. The trust boundary is the environment, not the individual service. ### Revocation The signed-in session lasts 24 hours. Removing someone from the organization stops them signing in again, but an existing session keeps working until it expires. ## Local development `specific dev` runs your services directly on localhost with no edge in front, so **no `X-Specific-Token` header is sent locally**. `endpoint..token_secret` still resolves, to a fixed development value, so your service starts normally. Treat the missing header as unauthenticated and add a dev-only fallback user that can't be reached in production. Because the local key is a known constant, you can also sign your own tokens with it to exercise your authorization logic against `specific dev`. --- # Redis Source: https://docs.specific.dev/guides/redis Managed Redis-compatible cache instances, backed by [Valkey](https://valkey.io), the BSD-3-Clause open-source fork of Redis 7.2. Valkey speaks the Redis wire protocol, so any Redis client works unchanged: `ioredis`, `node-redis`, `redis-py`, `go-redis`, `redis-cli`. ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint { public = true } env = { REDIS_URL = redis.cache.url } } redis "cache" {} ``` One block is one instance. Declare several blocks if you want separate instances, for example one for caching and one for rate limiting, and reference each by name. ## Connection attributes | Attribute | Description | | --------- | ----------- | | `url` | Full connection string, in the form `redis://:password@host:port`. | | `host` | Hostname of the instance. | | `port` | Port, `6379` in production and a locally allocated port during `specific dev`. | | `password` | Password for `AUTH`. | Most clients take the URL directly: ```typescript import Redis from "ioredis"; const redis = new Redis(process.env.REDIS_URL!); await redis.set("greeting", "hello", "EX", 60); ``` ```python import os, redis r = redis.from_url(os.environ["REDIS_URL"]) r.set("greeting", "hello", ex=60) ``` The URL uses the `redis://` scheme (plain TCP), not `rediss://`. In production the instance is only reachable from services inside the same environment, never from the public internet. ## Local development and production During `specific dev`, a local Valkey server starts automatically on a free port, and the `redis.*` references resolve to it. Nothing to install, nothing to configure. In production, `specific deploy` provisions a dedicated instance per `redis` block in each environment, generates a password, and injects the same references into your services. Preview environments get their own instances too. ## What it is for Redis on Specific is a cache, not a database. Instances run without persistence, locally and in production: a restart starts empty. Production instances have a fixed memory budget and evict the least recently used keys when it is full. Good fits: - Caching query results, rendered fragments, and API responses with a TTL. - Sessions and short-lived tokens that can be re-issued if lost. - Rate limiting and counters. - Pub/sub between services in the same environment. For work that must survive a restart, such as background jobs, use a [Temporal](/guides/temporal) workflow engine instead of a Redis-backed queue, and keep durable data in [Postgres](/guides/postgres). ## Common questions ### Which Redis commands are supported? Valkey 8 supports the Redis 7.2 command set, including streams, pub/sub, Lua scripting, and the standard data types. Commands added to Redis after the fork, and Redis Stack modules such as RedisJSON and RediSearch, are not available. ### Can I use BullMQ or another Redis-based queue? It connects and runs, but without persistence, queued jobs are lost whenever the instance restarts. Use it only for work you can afford to drop, and prefer [Temporal](/guides/temporal) for anything that has to complete. ### How do I inspect the cache? Locally, connect with `redis-cli -u "$REDIS_URL"` using the URL from the service's environment, or read the values from your application. In production there is no direct access from outside the environment; add a debug endpoint to a service if you need to look inside. ### Does the data survive a deploy? No. Each deploy can restart the instance, and there are no snapshots. Treat every key as something your app can recompute. --- # Reshape migrations Source: https://docs.specific.dev/guides/reshape Zero-downtime schema migrations using [Reshape](https://github.com/fabianlindfors/reshape), built into Specific. Reshape uses a 3-phase approach so old and new application code can run against the database at the same time: 1. **Start** - creates the new schema version with views and triggers. Both old and new schemas are available simultaneously. 2. **Rollout** - new application code is deployed and uses the new schema via `search_path`. 3. **Complete** - the old schema and migration artifacts are removed. ## Enabling Reshape Add a `reshape` block to a postgres definition in `specific.hcl`: ```hcl specific.hcl postgres "main" { reshape { enabled = true } } ``` With a custom migrations directory (the default is `migrations/`, relative to `specific.hcl`): ```hcl specific.hcl postgres "main" { reshape { enabled = true migrations_dir = "db/migrations" } } ``` ## Writing migrations Migrations are TOML files composed of actions (`create_table`, `add_column`, `alter_column`, `add_index`, `custom`, and more), processed in **natural order**, matching Reshape (`2_second.toml` before `10_tenth.toml`): ```toml migrations/001_create_users.toml [[actions]] type = "create_table" name = "users" primary_key = ["id"] [[actions.columns]] name = "id" type = "INTEGER" generated = "ALWAYS AS IDENTITY" [[actions.columns]] name = "email" type = "TEXT" nullable = false ``` :::info Run `specific check` every time you create or edit a migration file. It validates both `specific.hcl` and all migration files, catching errors before they're applied. Without it, invalid migrations silently fail to apply. ::: The full list of actions, with every option and examples, is bundled with the CLI: run `specific docs postgres/reshape/actions`, and `specific docs postgres/reshape/actions/` for a specific one. ## Automatic management in development When `specific dev` starts with Reshape enabled, migrations are managed for you: 1. **All migrations except the last are completed** - these become permanent schema changes. 2. **The last migration is started but not completed** - so you can iterate on it. 3. **Completed migration files are made read-only** - preventing accidental modification. While `specific dev` is running: - **Modifying the last migration file** aborts and restarts that migration. Services keep running - no restart needed, since the schema name doesn't change. - **Adding a new migration file** completes the previous migration (making it permanent) and starts the new one. Services are restarted to use the new schema. The development workflow: 1. Write a migration file in the migrations directory. 2. Run `specific check` to validate. 3. `specific dev` applies it automatically. 4. Iterate on the migration - run `specific check` after **every** change. 5. When ready, add a new migration file to lock in the previous one. If you need to modify a completed migration, change its file permissions first; completed files are read-only on purpose. ## Connection strings When Reshape is enabled, `postgres..url` automatically includes the correct `search_path`. No service configuration changes needed: ```hcl specific.hcl service "api" { build = build.api command = "node server.js" env = { DATABASE_URL = postgres.main.url # Automatically includes search_path } } ``` ## Functions, types, and the search path Keep Specific's managed `search_path` intact and ordinary application table names unqualified, so queries use Reshape's migration views. Qualify shared functions, enum types, and extension types and operators with their owning schema. For objects installed in `public`, use names such as `public.similarity(...)`, `::public.member_role`, and `::public.vector`. Vector operators need qualification too: ```sql SELECT '[1,2]'::public.vector OPERATOR(public.<=>) '[2,3]'::public.vector; ``` ### Troubleshooting missing functions, types, or operators These errors can appear in runtime logs after a successful deployment when an affected query first runs. Check the object's schema and qualify the reference; do not add `public` to the search path or prefix application tables with `public.` as a workaround. For the full diagnosis, stored-function guidance, and testing steps, ask your coding agent to run `specific docs postgres/reshape`. ## Manual migration commands You can also control migrations directly: ```bash # Validate migration files (works without specific dev running) specific reshape check # Start a migration (applies new schema while keeping the old one available) specific reshape start # Check migration status on a specific database specific reshape status main # Complete a migration (removes old schema) specific reshape complete main # Abort a migration (rolls back to old schema) specific reshape abort main ``` Most actions need database access; if `specific dev` isn't running, the database is started temporarily. `check` only validates file syntax and runs anytime. ## Production During `specific deploy`, migrations follow the same 3-phase flow, coordinated with the service rollout: pending migrations are started before the new code rolls out, and completed once the rollout succeeds. If the rollout fails, the migrations are aborted automatically and the database rolls back to the old schema. --- # Secrets and config Source: https://docs.specific.dev/guides/secrets-and-config Secrets and config let you parameterize values that services need, instead of hardcoding them in `specific.hcl`: - **Secrets** - sensitive information that should never be committed to version control: API keys, database passwords, signing keys. - **Config** - non-sensitive values that may vary between environments: log levels, feature flags, URLs. Because every value is declared in `specific.hcl`, Specific knows exactly which ones are missing and prompts you for them when needed, both when starting `specific dev` and when deploying to the cloud. There's no `.env` file to assemble by hand. ## Secrets Declare the secrets your application needs and reference them in `env`: ```hcl specific.hcl secret "stripe_api_key" {} secret "jwt_secret" { generated = true } service "api" { build = build.api command = "./api" endpoint { public = true } env = { STRIPE_API_KEY = secret.stripe_api_key JWT_SECRET = secret.jwt_secret } } ``` Secret fields: - `generated` - when `true`, auto-generates a random string if no value is set. Useful for internal secrets like JWT signing keys. - `length` - length of generated secrets (default: 64). Only applies when `generated = true`. - `dev.required` - defaults to `true`. Set to `false` to allow a missing secret during `specific dev`; references resolve to an empty string. Deployments still require the secret. Manual secrets (no `generated` flag) must be given a value: locally in `specific.local` unless optional in dev, and in production during deployment. Generated secrets are auto-created on first run, and you can still override them manually. :::info Secret and config references cannot be interpolated into strings; use them as standalone `env` values. ::: ## Config ```hcl specific.hcl config "log_level" { default = "info" } service "api" { build = build.api command = "./api" endpoint { public = true } env = { LOG_LEVEL = config.log_level } } ``` Config fields: - `default` - value used unless overridden by an environment or locally. - `dev.default` - overrides `default` during `specific dev`. Values in `specific.local` take precedence. - `dev.required` - defaults to `true`. Set to `false` to allow a missing config during `specific dev`; if no value or default exists, references resolve to an empty string. Deployments still require a value or default. An explicit `default = ""` is a valid empty value in both dev and deployments and does not trigger a prompt. ### Environment overrides Override config values per environment with `environment` blocks: ```hcl specific.hcl config "log_level" { default = "info" } environment "production" { config = { log_level = "warn" } } environment "staging" { config = { log_level = "debug" } } ``` ## Local development: `specific.local` Local secret and config values live in `specific.local`, a gitignored HCL file next to `specific.hcl`: ```hcl specific.local secrets { stripe_api_key = "sk_test_..." } config { log_level = "debug" } ``` You don't have to fill it out ahead of time: `specific dev` prompts for missing required secrets and config values used by the services being run. The file is never included in deployments. ### Optional values in dev Both configs and secrets can be optional locally without a placeholder default: ```hcl specific.hcl config "tenant_domain_root" { dev { required = false } } secret "provider_api_key" { dev { required = false } } ``` For configs, `specific.local` takes precedence over `dev.default`, then `default`. For secrets, local values and generated values take precedence. When no value is available, an optional reference resolves to `""` without prompting. The environment variable is set to an empty string, not omitted, and the fallback is not saved to `specific.local`. These settings only affect local development. Deployments still require secrets to be supplied or generated, and configs to have a value or default. Values entered at startup prompts are saved to `specific.local` for subsequent runs. Defaults and optional empty fallbacks do not create placeholder entries or overwrite existing local values. An existing local value, including `""`, takes precedence over defaults. To set an optional value later, add it to the `config` or `secrets` block in `specific.local`, then restart `specific dev`. Only `specific.hcl` is watched for automatic reloads; edits to `specific.local` take effect on the next start. Removing a local entry restores its default or optional empty fallback. A required value without a default will prompt again when used. ## Production During `specific deploy`, the CLI checks that every required value is set for the target environment and prompts you interactively for anything missing. You can enter values while builds are still running. Values can also be passed as flags: `specific deploy --secret stripe_api_key=sk_live_...`. - Secrets are stored securely, never logged, and injected into services as environment variables at runtime. - Secrets are scoped per environment - setting a secret for `staging` does not affect `production`. - Update secrets and config anytime from the [dashboard](https://dashboard.specific.dev), without touching `specific.hcl`. New values take effect on the next deployment. ## Preview environments Preview environments inherit their secrets and config values from the environment they branch from, so a preview starts with the parent's configuration without re-entering anything. To give previews a different value for a specific secret or config, set a **preview override** on the parent environment's Secrets and config page in the [dashboard](https://dashboard.specific.dev). Every preview branched from that environment then uses the override for that value while still inheriting the rest - handy for pointing previews at a sandbox API key or a test-only endpoint. See [Preview environments](/guides/previews). ## Complete example ```hcl specific.hcl # External API key: must be set manually, sensitive secret "stripe_api_key" {} # Internal signing key: auto-generated, sensitive secret "jwt_secret" { generated = true } # Log level: not sensitive, varies by environment config "log_level" { default = "info" } service "api" { build = build.api command = "./api" endpoint { public = true } env = { STRIPE_API_KEY = secret.stripe_api_key JWT_SECRET = secret.jwt_secret LOG_LEVEL = config.log_level } } environment "production" { config = { log_level = "warn" } } ``` --- # Services Source: https://docs.specific.dev/guides/services Services define how to run your code and connect it to other parts of your infrastructure, both in production and in local development. All configuration reaches your app through environment variables, and the same `specific.hcl` drives `specific dev` locally and `specific deploy` in production. A typical setup with a public frontend and API: ```hcl specific.hcl build "web" { base = "node" command = "npm run build" } service "web" { build = build.web command = "npm start" endpoint { public = true } env = { PORT = port API_URL = "https://${service.api.public_url}" } dev { env = { API_URL = "http://${service.api.public_url}" } } } build "api" { base = "go" command = "go build -o api" } service "api" { build = build.api command = "./api" endpoint { public = true } env = { PORT = port } } ``` - `command` - command to start the server. - `root` - working directory for service commands, relative to `specific.hcl`. Defaults to the referenced build's `root`, or `"."` if no build. - `endpoint` - defines a network endpoint (see below). - `port` - reference to the auto-assigned port; pass it to your server. See [Builds](/guides/builds) for the `build` block. ## Endpoints Endpoints define how a service is accessible over the network. ### Single endpoint ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint { public = true } env = { PORT = port } } ``` - `public = true` makes the endpoint publicly accessible via HTTPS. - Omitting `public` (or `public = false`) keeps the endpoint internal-only. Public services are served from a managed `*.spcf.app` URL by default. To attach your own domain, see [Custom domains](/guides/domains). ### Multiple named endpoints A service can expose multiple endpoints on different ports, each independently public or internal: ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint "main" { public = true } endpoint "admin" {} env = { MAIN_PORT = endpoint.main.port ADMIN_PORT = endpoint.admin.port } } ``` With multiple endpoints, use `endpoint..port` instead of `port` to reference each endpoint's port. Available endpoint reference attributes: | Attribute | Description | | --------- | ----------- | | `endpoint..port` | The port this endpoint is served on. | | `endpoint..token_secret` | Key for verifying the `X-Specific-Token` header in a [protected environment](/guides/protected). Only valid on endpoints with `public = true`. | ### Implicit endpoints If a service uses `port` in its env vars but has no explicit endpoint blocks, an implicit internal endpoint is created: ```hcl specific.hcl service "worker" { build = build.worker command = "./worker" env = { PORT = port # Creates an implicit internal endpoint } } ``` ### Health checks Add a `health_check` block inside an `endpoint` to tell Specific how to verify the service is healthy. The platform sends an HTTP `GET` to the given path on the endpoint's port; a `2xx` response means healthy. ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint { public = true health_check { path = "/healthz" } } env = { PORT = port } } ``` - `path` - the HTTP path to probe (required, must start with `/`). - Keep the handler cheap: don't query the database or call other services. A constant `200 OK` is sufficient. If your service already serves a root path that always returns `2xx` (for example, a static site), point `health_check` at `/`. - Only one `health_check` per service is used. If multiple endpoints declare one, the first one wins. - Background workers (services without endpoints) don't support `health_check` yet - only HTTP-serving endpoints do. In production, health checks control rollouts and restarts: - During a deploy, the new instance doesn't receive traffic until its health check passes. The old version stays up until then, so users never hit a half-started process. - If the health check starts failing after the deploy is live, the service is restarted automatically. Traffic is drained from the unhealthy instance before the restart. - If the health check never passes during a deploy (typically a misconfigured `path`), the deploy fails fast with a `health_check_failed` error pointing at the probe URL. ### Client IP Requests reach your service through Specific's load balancer, which sets two headers to the IP address of the client that made the request: - `X-Real-IP` - `X-Forwarded-For` Both contain a single address. Any values the client sent in these headers are discarded, so they can be trusted for rate limiting, geolocation, or IP-based blocking. The TCP connection your server sees comes from the load balancer, so `req.socket.remoteAddress` (or your framework's equivalent) is an internal address. Frameworks that derive the client IP from `X-Forwarded-For` need to be told to trust one proxy hop, for example `app.set("trust proxy", 1)` in Express. In local development there is no load balancer and the headers are absent. If you put a proxy such as Cloudflare in front of a custom domain, the headers contain the proxy's address instead; use the header your proxy sets, such as `CF-Connecting-IP`. ## Connecting services ### Private communication Services reference each other's endpoints with `private_url` to communicate over a private network: ```hcl specific.hcl service "worker" { build = build.worker command = "./worker" env = { API_URL = service.api.private_url } } ``` Available service reference attributes: | Attribute | Description | | --------- | ----------- | | `service..private_url` | Internal URL without scheme (for example, `localhost:3001` in dev). Only reachable by other services. | | `service..host` | Host only. | | `service..port` | Port only. | | `service..public_url` | Public URL without scheme (`my-app.spcf.app` in production, `localhost:3001` in dev). Only available for endpoints with `public = true`. | For services with multiple named endpoints, specify the endpoint: `service.api.endpoint.main.private_url`. :::info `public_url` and `private_url` do **not** include a scheme. Production services are served over HTTPS; local development uses plain HTTP. Compose the full URL with the right scheme per environment, using the `dev` block to override locally: ```hcl env = { API_URL = "https://${service.api.public_url}" } dev { env = { API_URL = "http://${service.api.public_url}" } } ``` ::: ### Public communication Private URLs aren't reachable from a browser. When a frontend needs to call a backend, the backend must expose a public endpoint, and the frontend references it with `public_url`: ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint { public = true } env = { PORT = port CORS_ORIGIN = "https://${service.web.public_url}" } dev { env = { CORS_ORIGIN = "http://${service.web.public_url}" } } } ``` ## Environment variables All connection details (database URLs, storage credentials, secrets) are injected as environment variables. The same references resolve to the correct values in both local development and production. ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint { public = true } env = { PORT = port NODE_ENV = "production" DATABASE_URL = postgres.main.url } } ``` ### String interpolation Embed references inside strings to compose values: ```hcl specific.hcl service "worker" { build = build.worker command = "./worker" env = { QUERY_URL = "http://${service.api.private_url}/api/query" CUSTOM_DB = "host=${postgres.main.host} port=${postgres.main.port}" PUBLIC_API = "https://${service.api.public_url}/v1" } dev { env = { PUBLIC_API = "http://${service.api.public_url}/v1" } } } ``` All resource references (services, postgres, redis, storage, port, endpoint) can be used inside interpolated strings. Secret and config references cannot be interpolated; use them as standalone values. ## Local development ### Dev commands The `dev` block overrides how a service runs during `specific dev`. Use it for hot-reload servers, watch modes, or anything optimized for a fast feedback loop. If the referenced build has no `dev` block, the build step is skipped in development. ```hcl specific.hcl service "web" { build = build.nextjs command = "npm start" endpoint { public = true } env = { PORT = port } dev { command = "npm run dev" # Handles building + serving with hot reload } } ``` The `dev.env` block is merged with the top-level `env`, so you only override the variables that differ. ### Dev-only services A service with a `dev.command` but no top-level `command` only runs in local development and is excluded from deployment. Useful for local versions of external services like mock servers: ```hcl specific.hcl service "mock-api" { dev { command = "npx json-server --watch db.json --port $PORT" } endpoint {} env = { PORT = port } } ``` Dev-only services cannot have a `build` reference, and can define endpoints that other services reference during development. See [Local development](/concepts/local-development) for ports, logs, isolated instances, and tunnels. ## Monorepos Use `root` on builds to set the working directory. Services inherit the build's root, so commands like `npm start` run from the correct directory: ```hcl specific.hcl build "backend" { base = "node" root = "packages/backend" command = "npm run build" } service "backend" { build = build.backend command = "node dist/index.js" dev { command = "npm run dev" } } ``` Dev-only services can set their own `root`. ## Workers Services without any endpoint act as background workers. They deploy like other services but don't receive HTTP traffic, which is common for queue consumers and background processing. ```hcl specific.hcl service "worker" { build = build.worker command = "npm run worker" env = { DATABASE_URL = postgres.main.url } } ``` For work on a schedule, use [Crons](/guides/crons) instead. ## Pre-existing images Services can run a pre-built container image instead of a build. `image` and `build` are mutually exclusive, and image-based services skip the build step entirely: ```hcl specific.hcl service "redis" { image = "redis:7" command = "redis-server --port $PORT" endpoint {} env = { PORT = port } dev { command = "redis-server --port $PORT" } } ``` - `image` - container image reference (for example, `redis:7` or `ghcr.io/org/image:tag`). - Use `dev.command` to run the equivalent process locally. - Deploy hooks work with image-based services, and you can mix build-based and image-based services in one project. ## Deploy hooks Run commands before or after deploying a service. Hooks run as one-off jobs with the same container and environment variables as the service. If a hook fails, the deployment is aborted. ```hcl specific.hcl service "api" { build = build.api command = "node dist/index.js" endpoint { public = true } env = { PORT = port DATABASE_URL = postgres.main.url } pre_deploy { command = "npm run db:migrate" } post_deploy { command = "npm run cache:warm" } } postgres "main" {} ``` - `pre_deploy` - runs before the service is deployed. **Database migrations belong here**: the schema is updated before new code runs, and a failed migration aborts the deployment instead of leaving a broken state. - `post_deploy` - runs after the service is deployed (cache warming, notifications). In development, run migrations with [`specific exec`](/reference/cli#specific-exec) whenever the schema changes, for example `specific exec api -- npm run db:push`. ## Graceful shutdown When a service is redeployed or stopped, Specific sends your app a `SIGTERM` signal and waits a short grace period before forcibly stopping it. Handle `SIGTERM` to finish in-flight requests and close connections cleanly. For the signal to reach your code, `command` should run your app as a process that receives signals. Running your server directly (`node server.js`, `./api`) is the most reliable; wrappers and process managers can swallow the signal. ## Serving static files To serve static files, run a web server as a service. For example, with `npx serve`: ```hcl specific.hcl build "spa" { base = "node" command = "npm run build" } service "frontend" { build = build.spa command = "npx serve dist -l $PORT" endpoint { public = true } env = { PORT = port } dev { command = "npm run dev" # Use your framework's dev server } } ``` ## Production Once deployed, stream logs, inspect metrics, and scale services from the [dashboard](https://dashboard.specific.dev). `specific status` shows the dashboard-managed tier, replica policy, and rollout strategy read-only; use `--format json` for machine-readable output. Replica maxima are steady-state limits, and rolling deployments may temporarily add a surge instance. For querying logs and metrics from the CLI, see [Observability](/guides/observability). ### Services that cannot start A service whose container exits on every start, or never passes its health check, is restarted by the platform with increasing back-off, up to every five minutes. The [restarts alert](/guides/alerts) tells you when that is happening. If it keeps happening, the platform stops the service: once seven days have passed without a replica that stayed up for ten minutes, the service is scaled to zero, and the dashboard marks it as stopped, with the reason its last replica gave (an exit code, an out-of-memory kill, an image that cannot be pulled, a health check that never passed). A stopped service starts again on its next deploy; if it still cannot start it is stopped again after the same seven days. While a service is stopped its alerts are not evaluated. A service whose first deploy failed and that has since been removed from `specific.hcl` is removed from the cluster at the same point instead, since nothing refers to it any more. --- # Object storage Source: https://docs.specific.dev/guides/storage Managed S3-compatible object storage, powered by [Tigris](https://www.tigrisdata.com) in production. Works with any S3 SDK or tool. ```hcl specific.hcl service "api" { build = build.api command = "./api" endpoint { public = true } env = { S3_ENDPOINT = storage.uploads.endpoint S3_ACCESS_KEY = storage.uploads.access_key S3_SECRET_KEY = storage.uploads.secret_key S3_BUCKET = storage.uploads.bucket } } storage "uploads" {} ``` You can declare multiple buckets; each `storage` block is its own bucket with its own credentials. ## Connection attributes | Attribute | Description | | --------- | ----------- | | `endpoint` | S3-compatible endpoint URL (for example, `http://127.0.0.1:5000` in dev). | | `access_key` | Access key for authentication. | | `secret_key` | Secret key for authentication. | | `bucket` | Bucket name. | | `public_url` | HTTPS origin for anonymous reads. Available only when `public = true`. | ## Public buckets Public buckets are opt-in: ```hcl specific.hcl storage "assets" { public = true } service "web" { build = build.web env = { ASSETS_PUBLIC_URL = storage.assets.public_url } } ``` `public_url` has no trailing slash. Append the object key to it, for example `${ASSETS_PUBLIC_URL}/images/logo.png`. Public access allows anonymous object reads. Uploads and deletes still require credentials, and directory listing is disabled. CORS headers, cache-control metadata, and custom domains are separate concerns. Removing `public = true` makes an existing bucket private again on the next deployment. Preview buckets are forked from their parent, so making a preview bucket public can expose copied parent data. ## Example: AWS SDK (JavaScript) ```javascript import { S3Client, PutObjectCommand } from "@aws-sdk/client-s3"; const s3 = new S3Client({ endpoint: process.env.S3_ENDPOINT, region: "us-east-1", // Required but ignored locally credentials: { accessKeyId: process.env.S3_ACCESS_KEY, secretAccessKey: process.env.S3_SECRET_KEY, }, forcePathStyle: true, // Required for local S3-compatible servers }); await s3.send( new PutObjectCommand({ Bucket: process.env.S3_BUCKET, Key: "myfile.txt", Body: "Hello, world!", }) ); ``` ## Local development During `specific dev`, a local S3-compatible server runs automatically, and the same `storage.*` references resolve to it. Public bucket URLs use the local server and support anonymous reads. Browse bucket contents from the [local dashboard](/concepts/dashboard#the-local-dashboard). ## Production Browse bucket contents and manage stored files from the [dashboard](https://dashboard.specific.dev). If a service outside of Specific needs to read from or write to a bucket, generate direct S3-compatible credentials (read/write or read-only) from the storage resource's **Access** tab in the dashboard. In [preview environments](/guides/previews), object storage is forked from the parent environment. ## Storage limits Each plan includes a file storage limit, listed on the [pricing page](https://specific.dev/pricing). The limit applies per project and covers every bucket in every environment, preview environments included. The storage page in the dashboard shows a bucket's size against it and warns when the project is close to or over the limit. The storage provider enforces the limit. Once a project is over it, uploads fail with an S3 `QuotaExceeded` error: ``` QuotaExceeded: Storage quota exceeded. Please reduce storage usage or contact support to increase your quota. ``` Downloads, listing and deletes keep working, so existing files stay available. To upload again, delete files until the project is under the limit, or upgrade the plan from the organization's billing settings in the dashboard. Either takes effect within a few minutes. An organization whose projects already store more than a plan allows cannot switch to that plan; the billing page names the project that is over. --- # Real-time sync Source: https://docs.specific.dev/guides/sync For Postgres databases, you can enable real-time data synchronization to build real-time and local-first applications. Sync is powered by [Electric](https://electric-sql.com), a sync engine that streams changes from Postgres to clients using a plain HTTP API. It uses a proxy-based architecture: your backend proxies requests to the sync engine after handling authentication and authorization. ## Enabling sync Reference `sync.url` and `sync.secret` on a Postgres database in your service env: ```hcl specific.hcl postgres "main" {} service "api" { command = "node index.js" endpoint { public = true } env = { DATABASE_URL = postgres.main.url DATABASE_SYNC_URL = postgres.main.sync.url DATABASE_SYNC_SECRET = postgres.main.sync.secret } } ``` When these references are present, Specific automatically runs a sync engine connected to your Postgres database, locally during `specific dev` and managed in production. Sync attributes: | Attribute | Description | | --------- | ----------- | | `sync.url` | Sync engine HTTP endpoint URL (for example, `http://127.0.0.1:5133` in dev). | | `sync.secret` | Secret for authenticating requests to the sync engine. Pass it as the `secret` query parameter from your backend to the Electric API. | ## How sync works The sync engine streams "shapes" of data from Postgres to clients: 1. Your backend proxies shape requests to the sync engine (handling auth/authz). 2. The sync engine streams the initial data and subsequent changes. 3. Clients receive real-time updates over HTTP. For implementation details, see the Electric documentation: - [Authentication and proxying](https://electric-sql.com/docs/guides/auth) - [Shapes and client usage](https://electric-sql.com/docs/guides/shapes) - [Handling writes](https://electric-sql.com/docs/guides/writes) - [Troubleshooting](https://electric-sql.com/docs/guides/troubleshooting) ## Proxy configuration When proxying Electric requests from your backend, handle headers and query parameters carefully. Getting these wrong causes silent failures: browsers block responses or serve stale cached data without clear error messages. ### Expose Electric response headers Electric returns custom `electric-*` headers that the client SDK needs to follow the shape log. Browsers block JavaScript from reading non-standard response headers unless they are listed in `Access-Control-Expose-Headers`. Don't strip any `electric-*` headers from the response, and expose them all: ``` Access-Control-Expose-Headers: electric-handle, electric-offset, electric-schema, electric-cursor, electric-up-to-date, electric-chunk-last-offset ``` ### Strip upstream headers Electric's response includes its own CORS and caching headers. If your proxy copies these through and your CORS middleware also adds its own, the browser receives duplicate `Access-Control-Allow-Origin` values and rejects the response. Before setting your own headers, strip these from Electric's response: - `Access-Control-Allow-Origin` and other `Access-Control-*` headers - `Content-Encoding` and `Content-Length` (fetch decompresses the body but doesn't update these headers, which breaks browser decoding) - `Cache-Control` (see below) ### Override caching Electric returns `Cache-Control` with `max-age` and `stale-age` for request collapsing at the CDN level. During development, this can cause browsers to serve stale cached responses. For example, responses cached before CORS headers were configured correctly keep failing even after the proxy is fixed. Override with `Cache-Control: no-store` on your proxy response. ### Control query parameters Set these server-side and never pass them through from the client: - `table` - letting clients specify the table allows access to any table - `where` - this is your authorization filter - `columns` - clients could request sensitive columns - `secret` - never expose the API secret to clients Only forward Electric protocol parameters from the client: `offset`, `handle`, `live`, `live_sse`, `cursor`, `expired_handle`, `replica`, `log`. ## Using the Electric TypeScript SDK `ShapeStream` requires a full URL, not a relative one. In browsers, derive it from `window.location.origin`: ```typescript import { ShapeStream } from "@electric-sql/client"; const stream = new ShapeStream({ url: `${window.location.origin}/api/sync/items`, }); ``` This works correctly regardless of the deployment environment. --- # Managed Temporal Source: https://docs.specific.dev/guides/temporal Define managed [Temporal](https://temporal.io) workflow engines for durable workflows, background tasks, AI agents, batch jobs, and more. One `temporal` block gives you a local Temporal server in development and a [Temporal Cloud](https://temporal.io/cloud) namespace in production, with credentials wired into your services automatically. There is no server to install, host, or upgrade in either environment. :::info To simply run a command on a schedule, prefer the built-in [`cron`](/guides/crons) block. Each run is a one-off job, so there's no persistent worker to keep running. Reach for Temporal's own schedule support when you need complex or long-running scheduled workflows (durable, multi-step, with retries), or when you already run a Temporal worker. ::: Temporal has SDKs for TypeScript, Python, Go, Java, .NET, and PHP. See the [Temporal documentation](https://docs.temporal.io/) for language-specific guides on workers, workflows, and activities. This page covers the Specific integration. ## Configuration Define a `temporal` block and reference it from services: ```hcl specific.hcl temporal "tasks" {} build "app" { base = "node" } service "worker" { build = build.app command = "node worker.js" env = { TEMPORAL_ADDRESS = temporal.tasks.url TEMPORAL_NAMESPACE = temporal.tasks.namespace TEMPORAL_API_KEY = temporal.tasks.api_key } dev { command = "node --watch worker.js" } } ``` ## Reference attributes | Attribute | Description | Dev value | Production value | | --------- | ----------- | --------- | ---------------- | | `temporal..url` | gRPC address of the Temporal server | `localhost:` | Temporal Cloud gRPC address | | `temporal..namespace` | Temporal namespace | The block name (e.g. `tasks`) | Managed namespace ID | | `temporal..api_key` | API key for authentication | `""` (empty, no auth in dev) | Auto-generated API key | These can be used in service `env` blocks, both standalone and inside interpolated strings. Because your code only reads these environment variables, the same worker and client code runs unchanged against the local dev server and Temporal Cloud. There are no environment-specific overrides to maintain. ## Running Temporal locally Running `specific dev` automatically: 1. Downloads the Temporal CLI (first run only). 2. Starts a Temporal dev server with persistent storage. 3. Makes the Temporal Web UI available in the [local dashboard](/concepts/dashboard#the-local-dashboard) sidebar under **Workflows**. There is nothing to install or start manually, and no Docker involved. Workflow data persists across dev server restarts in a SQLite database under `.specific/keys//data/`, so in-flight workflows and history survive stopping and restarting `specific dev`. The `api_key` attribute is an empty string in dev since the Temporal dev server doesn't require authentication. This is safe: Temporal SDKs apply authentication only when a non-empty key is provided. ## Production Running `specific deploy` automatically provisions a managed [Temporal Cloud](https://temporal.io/cloud) namespace for each `temporal` block, with no manual setup: 1. A dedicated Temporal Cloud namespace is created. 2. A service account with write access is provisioned. 3. An API key is generated for authentication. 4. Credentials are securely injected into your services. The same references resolve to the Temporal Cloud values in production, so no environment-specific overrides are needed. You don't need a Temporal Cloud account, and the operational side of Temporal (running and upgrading the server, managing its persistence, sizing the cluster) is handled for you. ### Workflow history retention Specific configures closed workflow history retention from your plan: - **Free:** 1 day - **Pro:** 7 days - **Scale and Startup:** 30 days - **Enterprise:** configurable from 1 to 90 days Retention starts when a workflow execution closes. Running workflows are not removed by this policy. When your plan changes, the new retention applies to workflows that close after the change; already-closed workflows keep the policy that was active when they closed. Increasing retention cannot restore history that Temporal has already deleted. ## Workers Temporal workers are regular [`service`](/guides/services) blocks: they get a build, a command, and whatever references they need. A typical worker has no public endpoint, so it can reach Temporal, your database, and storage without being reachable from the internet. Other services dispatch workflows through the same `temporal..*` references; the worker picks them up. Their production replica policy is dashboard-managed and visible read-only in `specific status`. ## Monitoring workflows In development, the Temporal Web UI is embedded in the local dashboard, next to your services' logs and database. In production, workflow monitoring is available through the [Specific dashboard](https://dashboard.specific.dev/). ## Common questions ### Do I need a Temporal Cloud account? No. Specific provisions and manages the Temporal Cloud namespace, service account, and API key as part of `specific deploy`. You never touch Temporal Cloud's console. ### Which languages can I use? Any language with a Temporal SDK: TypeScript, Python, Go, Java, .NET, and PHP. The Specific integration only supplies the address, namespace, and API key; your workflow and activity code is standard Temporal. ### Can I run more than one Temporal engine? Yes. Each `temporal` block gets its own namespace: on the shared local dev server in development, and as a separate managed Temporal Cloud namespace in production. ### When should I use a cron instead? When the job is a single command on a schedule, use the built-in [`cron`](/guides/crons) block; it needs no persistent worker. Use Temporal when workflows are multi-step, long-running, or need durable retries and state. **[Durable workflows example](/examples/durable-workflows)** A complete task queue app with workflows, activities, and a worker **[Services guide](/guides/services)** How services (including workers) are defined and deployed --- # Volumes Source: https://docs.specific.dev/guides/volumes Volumes provide a directory that persists across deployments and restarts, useful for file uploads, caches, and other data that needs to survive. Volumes are defined as sub-blocks within a service. Each volume has a name and exposes a `path` attribute that resolves to the directory path: ```hcl specific.hcl service "api" { build = build.api command = "node server.js" volume "uploads" {} env = { UPLOADS_DIR = volume.uploads.path } } ``` ## Attributes | Attribute | Description | | --------- | ----------- | | `path` | Absolute path to the volume directory. | ## How it works - **In production**: each volume is backed by a persistent disk, and `path` resolves to `/volumes/{name}` inside the container. - **In development** (`specific dev`): each volume maps to a local directory at `.specific/keys/.../data/volumes/{service}/{name}/`. Volume data persists across deployments and dev server restarts. ## Multiple volumes A service can define multiple volumes: ```hcl specific.hcl service "api" { build = build.api command = "node server.js" volume "uploads" {} volume "cache" {} env = { UPLOADS_DIR = volume.uploads.path CACHE_DIR = volume.cache.path } } ``` ## Example usage (Node.js) ```javascript import fs from "fs"; import path from "path"; const uploadsDir = process.env.UPLOADS_DIR; // Write a file fs.writeFileSync(path.join(uploadsDir, "myfile.txt"), "Hello, world!"); // Read it back (persists across restarts) const content = fs.readFileSync(path.join(uploadsDir, "myfile.txt"), "utf8"); ``` ## Preview environments [Preview environments](/guides/previews) get an instant copy-on-write clone of each volume, so a preview's service starts on an exact copy of the parent's data with no extra configuration, and writes to the clone never affect the parent. --- # Installation Source: https://docs.specific.dev/installation Specific is a single CLI that runs your local development environment, handles deployments to Specific Cloud, validates your configuration, and serves documentation to your coding agent. ## Install the CLI Specific supports macOS, Linux, and Windows (via WSL). **Installer** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` This detects your platform, downloads the latest binary, and adds it to your `PATH`. **Manual** Download the latest binary for your platform: ```bash # macOS (Apple Silicon) curl -fsSL "https://binaries.specific.dev/cli/$(curl -s https://binaries.specific.dev/cli/latest)/specific-darwin-arm64" -o specific # macOS (Intel) curl -fsSL "https://binaries.specific.dev/cli/$(curl -s https://binaries.specific.dev/cli/latest)/specific-darwin-x64" -o specific # Linux (x86_64) curl -fsSL "https://binaries.specific.dev/cli/$(curl -s https://binaries.specific.dev/cli/latest)/specific-linux-x64" -o specific # Linux (ARM64) curl -fsSL "https://binaries.specific.dev/cli/$(curl -s https://binaries.specific.dev/cli/latest)/specific-linux-arm64" -o specific ``` Then make it executable and move it somewhere on your `PATH`: ```bash chmod +x specific mv specific ~/.local/bin/ ``` Verify the installation: ```bash specific --version ``` The CLI keeps itself up to date automatically; run `specific update` to update on demand. ## Set up your project Inside your project folder, run: ```bash specific init ``` This adds Specific instructions to your coding agent's configuration (`CLAUDE.md`, `AGENTS.md`, or Cursor rules, auto-detected) and gitignores Specific's local files. See [Coding agents](/coding-agents) for details. ## Next steps **[Quickstart](/quickstart)** Clone an example and go from dev to deployed in five minutes. **[How Specific works](/concepts/how-it-works)** The mental model behind specific.hcl. --- # Migrate from Lovable Source: https://docs.specific.dev/migrations/lovable Lovable is an AI coding and hosting platform. It generates a standard TypeScript frontend, and hosts the backend on Lovable Cloud, a white-label Supabase. Moving away means two things: working on the code with a coding agent of your choice, such as Claude Code, Cursor, or Codex, and replacing Lovable Cloud with infrastructure you control. Specific handles the second part. Your agent defines the database, services, and storage in one `specific.hcl` file, runs everything locally with `specific dev`, and deploys with `specific deploy`. ## Let your agent do it Most people leaving Lovable are not going to do this by hand, and they don't have to. Install the CLI, then give your agent this prompt: ``` Help me migrate my Lovable project to Specific by following: https://docs.specific.dev/for-ai/lovable ``` ```bash curl -fsSL https://specific.dev/install.sh | sh ``` The agent walks through the steps below with you, runs every command, and asks only for what it cannot know, such as the link to your GitHub repository and any API keys. ## What you own after exporting Lovable syncs your code to GitHub from the project settings (Project settings, then Git, then GitHub). That repository contains the frontend and any server code. It does not contain your database, users, or uploaded files: those live in Lovable Cloud. Lovable lets you export them from the Cloud tab under Advanced settings ("Export project data", one export per 24 hours, up to 5 GB), and importing them into the new database and bucket is a manual step. ## The two kinds of Lovable projects Lovable has generated projects from two frontend stacks, and the backend is wired differently in each: - **TanStack Start** (current): the app is server-side rendered and already has server functions. Data access runs inside those functions, so they stay as the API layer and only their internals change. No new service and no frontend changes are needed. - **Vite SPA** (older): a static single-page app that calls Supabase directly from the browser. There is no server, so the migration adds a small backend service that serves the frontend and replaces the generated API. `specific docs /migrations/lovable` tells the agent how to identify which one a project uses. ## Replacing Lovable Cloud Lovable Cloud is Supabase, so the backend migration follows [Migrate from Supabase](/migrations/supabase): - **Database**: the schema transfers as is; it is Postgres on both sides. Schema changes going forward use [Reshape](/guides/reshape). - **API and authorization**: the generated API and row level security policies become routes and checks in your own backend code. - **Authentication**: three options. Keep Supabase Auth by restoring the export into a Supabase project of your own and using it for sign-in only, which keeps every user and password working. Or replace it with an auth library such as [Better Auth](https://www.better-auth.com/), or a provider such as Auth0, Clerk, or WorkOS; exported users come with their password hashes, and if the new system can't verify that format, plan a password reset flow. In every case, OAuth providers need their redirect URLs updated to the new domain. - **Storage** moves to [object storage](/guides/storage), and **realtime** to [Postgres sync](/guides/sync), powered by [ElectricSQL](https://electric-sql.com), where it is still needed. - **Lovable AI**: projects that call Lovable's AI gateway switch either to the model provider's API directly or to another gateway such as [Vercel AI Gateway](https://vercel.com/ai-gateway) or [OpenRouter](https://openrouter.ai). Either way, the API key is yours and stored as a secret. Moving the data itself (rows, users, uploaded files) is a manual step today. If you want help with the migration, email [hello@specific.dev](mailto:hello@specific.dev). ## Testing and deploying The agent runs the migrated app with `specific dev`, and with `specific dev --tunnel` you can test it from any device. The local dashboard shows your database and files, much like the Lovable interface did. When it works, the agent deploys it. It does not need you to create an account first: `specific login --agent` registers the agent itself, `specific deploy` publishes the app, and `specific claim` hands the project to your email address. See [Coding agents](/coding-agents) for how that works. ## Afterwards - Manage the deployed app at [dashboard.specific.dev](https://dashboard.specific.dev), including the database and automatic deploys from GitHub. - Ask the agent to write a `CLAUDE.md` or `AGENTS.md` describing the new stack, so future sessions start with the right context. - Custom domains are attached with `specific domain add` on a paid plan. --- # Migrate from Supabase Source: https://docs.specific.dev/migrations/supabase Supabase is a backend-as-a-service built around Postgres. It generates a REST API from your schema, and bundles auth, storage, realtime, queues, and cron behind a client SDK. Specific gives you the same Postgres, plus object storage, real-time sync, and durable workflows, but your app talks to a backend service you write, in any language, instead of a generated API. This page maps each Supabase feature to its Specific equivalent. For a feature-by-feature comparison, see [Specific vs Supabase](/compare/supabase). For the agent-facing version of these instructions, run `specific docs /migrations/supabase`. ## Let your agent do it The migration is mostly mechanical, which makes it a good job for a coding agent. Install the CLI and give your agent this prompt: ``` Help me migrate my project from Supabase to Specific. Start with https://docs.specific.dev/for-ai/onboarding, then run `specific docs /migrations/supabase` and follow it. ``` ```bash curl -fsSL https://specific.dev/install.sh | sh ``` The rest of this page explains what the agent will do, so you can review its work. ## Pick a backend stack Supabase auto-generates a PostgREST API from your database schema. With Specific, an explicit backend service handles routing, request validation, and business logic. Choose the language and framework for that service first: any language works, and the rest of the migration follows from it. ## Database Both Supabase and Specific run Postgres, so the schema transfers directly. Export it from Supabase: ```bash supabase db dump --schema public > schema.sql ``` Then declare a [Postgres](/guides/postgres) database in `specific.hcl` and recreate the schema with the migration tool of your chosen stack, or with [Reshape](/guides/reshape) for zero-downtime migrations. Drop the Supabase-specific parts: RLS policies that call `auth.uid()`, grants to the `authenticated` and `service_role` roles, and references to the `auth` schema. ```hcl specific.hcl build "api" { base = "node" command = "npm run build" } service "api" { build = build.api command = "node dist/index.js" endpoint { public = true } env = { PORT = port DATABASE_URL = postgres.main.url } dev { command = "npm run dev" } } postgres "main" {} ``` **pgvector** is available on Specific Postgres. Enable it in a migration with `CREATE EXTENSION IF NOT EXISTS vector;`. When using [Reshape](/guides/reshape#functions-types-and-the-search-path), qualify the vector type and operators in application queries with the extension's schema: for an extension installed in `public`, use `::public.vector` and `OPERATOR(public.<=>)`. Keep table access through Reshape's migration views. **Database functions and triggers** are standard Postgres and transfer as they are. Functions the frontend called through PostgREST RPC need an explicit endpoint on the backend, which then calls the function over a normal connection. When using Reshape, qualify calls to shared functions with their owning schema, such as `public.app_label(...)`, and inspect each function body for unqualified helper calls, types, and operators. See [Reshape name lookup](/guides/reshape#functions-types-and-the-search-path); do not add `public` to the application search path as a workaround. ## API and edge functions Read the frontend code to find every table and RPC it calls through the Supabase client, and implement those as routes on the backend service. Supabase Edge Functions become part of the same service and deploy with it. ## Authentication Specific does not bundle authentication; it belongs to your stack. Three common choices: - **Keep Supabase Auth.** Keep the Supabase project for authentication only. Your users and their passwords stay where they are, the frontend keeps signing in the same way, and your backend verifies the JWT Supabase issues on each request. The rest of the migration proceeds unchanged. - **An authentication library** such as [Better Auth](https://www.better-auth.com/) for TypeScript stacks, with users stored in your own database. - **An external provider** such as Auth0, Clerk, or WorkOS, with the provider's user ID as the key in your own tables. If you move off Supabase Auth, store user data in the same Postgres database the service already uses. Supabase Auth keeps its users in an implicit `auth` schema, so the equivalent tables have to be recreated for the new system. If the app is an internal tool that only your team should reach, a [protected environment](/guides/protected) requires sign-in from your organization's members at the edge, independent of the end-user authentication above. ## Authorization and row level security RLS policies in Supabase rely on Supabase Auth to identify the caller, so they do not translate directly. Read each policy and enforce the same rule in the backend service, where the authenticated user is known. ## Storage Supabase Storage is S3-compatible, and so is Specific [object storage](/guides/storage). Declare a `storage` block, point your S3 client at its credentials, and move the objects. ## Realtime Replace Supabase Realtime with [Postgres sync](/guides/sync), powered by [ElectricSQL](https://electric-sql.com), which streams Postgres changes to clients over HTTP. Check first whether polling is enough for the feature in question. ## Queues and cron Replace Supabase Queues with a [Temporal](/guides/temporal) workflow engine: declare a `temporal` block and run a worker service that processes queued work as workflows. Replace `pg_cron` with either a [cron block](/guides/crons) for simple scheduled commands or Temporal Schedules for multi-step scheduled work. ## Client-side changes - Remove the `@supabase/supabase-js` dependency. - Replace Supabase client calls with `fetch` requests to the backend service. - Send auth tokens in an `Authorization: Bearer` header on authenticated requests. ## Secrets Declare the secrets and configs the app still needs in `specific.hcl` and put their values in `specific.local` so `specific dev` does not prompt for them. The Supabase variables (`SUPABASE_URL`, `SUPABASE_ANON_KEY`, and the service role key) are no longer needed. ## Data migration Moving rows out of Supabase Postgres and objects out of Supabase Storage is currently a manual step: dump and restore the data with standard Postgres and S3 tooling. Exported users keep their password hashes; whether the new auth system can verify them depends on it, so plan a password reset flow as the fallback. If you want help with the migration, email [hello@specific.dev](mailto:hello@specific.dev). --- # Quickstart Source: https://docs.specific.dev/quickstart ## Let your agent do it The fastest way to get started is to hand the setup to your coding agent. Paste this prompt into Claude Code, Cursor, Codex, or whichever agent you use: ```text Help me get started with Specific by following: https://docs.specific.dev/for-ai/onboarding ``` Your agent installs the CLI, sets up a project (yours or an example), runs it locally, and walks you through deploying, explaining each step along the way. ## Or do it yourself Prefer to run the commands yourself? In this quickstart you clone a small real-time app, run it locally with one command, and deploy it to production with another. 1. **Install the CLI** ```bash curl -fsSL https://specific.dev/install.sh | sh ``` 2. **Clone example** Together with Claude Code, we have created a minimal example to get you familiar with Specific; a click counter with database persistence and realtime sync. ```bash git clone https://github.com/specific-dev/examples.git cd examples/node-realtime-click-counter npm install ``` 3. **Start the development server** Now start the dev server: ```bash specific dev ``` This spins up the web app and any dependencies (Postgres, sync engine, etc.) locally with everything connected automatically. The database schema is also automatically applied. The terminal output includes the URLs: - The [local dashboard](/concepts/dashboard#the-local-dashboard) (usually http://localhost:3000) visualizes your architecture and lets you manage your data. - The app itself (usually http://localhost:3001). Open it in two browser windows and click: the count syncs in real time. 4. **Deploy to Specific Cloud** :::info Deploying to Specific Cloud requires an account. The command will automatically prompt you to log in. ::: ```bash specific deploy ``` After deploying, you will get your very own production server up and running in the cloud. To observe and manage your app, visit the [Specific Dashboard](https://dashboard.specific.dev). 5. **Continue building with your agent** Now you can run the following command to give your agent of choice (e.g. Claude Code, Cursor, Codex, etc.) the knowledge it needs to build with Specific: ```bash specific init ``` From now on, your agent should have the context it needs. To verify that this is the case, ask your agent `What is Specific?` and the answer should be clear. Now try passing it the following prompt: ```text Add the ability for users to upload a custom background image to S3. When the background changes, it should be synced in real-time to all connected clients. ``` Your agent should understand that it can use Specific's S3-compatible object storage and proceed with implementing it. ## Next steps **[Coding agents](/coding-agents)** How agents work with Specific: init, bundled docs, and skills. **[How Specific works](/concepts/how-it-works)** The mental model behind specific.hcl. **[Services](/guides/services)** Define how your code runs and connects. **[Postgres](/guides/postgres)** Managed databases with zero-downtime migrations. --- # CLI reference Source: https://docs.specific.dev/reference/cli The `specific` CLI is the primary interface to Specific, for humans and coding agents alike. Run `specific --help` or `specific --help` for built-in help. ## Setup ### specific init Prepare a project for use with a coding agent. Writes Specific usage instructions into your agent's configuration file (`CLAUDE.md` for Claude Code, `AGENTS.md` for Codex, `.cursor/rules/specific.mdc` for Cursor) and adds `.specific` and `specific.local` to `.gitignore`. ```bash specific init ``` | Option | Description | | ------ | ----------- | | `--agent ` | Agents to configure: `cursor`, `claude`, `codex`, `other`. Auto-detected from existing config files if omitted. | ```bash # Configure for Claude Code and Cursor specific init --agent claude cursor ``` ### specific docs Fetch LLM-optimized documentation bundled with the CLI. Without a topic, prints the documentation index. Topics are nested paths. ```bash specific docs specific docs services specific docs postgres/reshape ``` ### specific check Validate the `specific.hcl` configuration file. Lists all builds, services, databases, storage, redis, and configs defined in the file, and reports errors for invalid configurations, including Reshape migration validation. ```bash specific check ``` Exits with code 1 if there are any errors. Run it after every change to `specific.hcl` or your migration files. ## Local development ### specific dev Start the local development environment. Reads `specific.hcl` and starts all resources and services on local ports, printing their URLs. The local dashboard is usually at `http://localhost:3000`, with services on the ports next to it. ```bash specific dev ``` | Option | Description | | ------ | ----------- | | `-k, --key ` | Run an isolated dev environment with separate data and ports. Auto-detected from git worktrees. | | `--tunnel` | Expose public services via `*.tunnel.spcf.app` URLs so others (or remote agents) can reach them. | | `--services ` | Only start the named services, plus everything they depend on (other services and resources referenced from their env vars, transitively). | ```bash # Start an isolated environment for a feature branch specific dev --key feature-auth # Expose services publicly via tunnel specific dev --tunnel # Only start the api and worker services (and their dependencies) specific dev --services api worker ``` ### specific exec Run a one-off command with a service's environment variables and its dependencies started. If `specific dev` is already running, `exec` reuses the existing resources. Otherwise, it starts the required resources temporarily and stops them when the command finishes. This is the primary way to run database migrations, seed scripts, and other setup commands. ```bash specific exec -- ``` | Option | Description | | ------ | ----------- | | `-k, --key ` | Dev environment namespace. Auto-detected from git worktrees. | | `--cwd ` | Override the working directory (defaults to `service.root` or `build.root`). | ```bash # Run database migrations specific exec api -- npm run db:migrate # Run a cron's own command specific exec my-cron # Run from the repository root instead of the service root specific exec --cwd . api -- npx expo start ``` The `--` separator distinguishes the service arguments from the command to execute. Running `specific exec ` without a command runs the cron's configured command. ### specific psql Connect to a local Postgres database with an interactive `psql` session. If the database is not running, it is started automatically. When only one database is defined in `specific.hcl`, the database name is optional. ```bash specific psql [database] ``` | Option | Description | | ------ | ----------- | | `-k, --key ` | Dev environment namespace. Auto-detected from git worktrees. | ```bash # Run a single query specific psql main -- -c "SELECT * FROM users LIMIT 5" # List all tables specific psql main -- -c "\dt" ``` Extra arguments after `--` are passed directly to `psql`. For production databases, use [`specific query --db`](#specific-query) instead. ### specific reshape Manage [Reshape](/guides/reshape) zero-downtime migrations manually. During `specific dev`, migrations are managed automatically; these commands are for manual control. ```bash specific reshape [database] ``` | Option | Description | | ------ | ----------- | | `-k, --key ` | Dev environment namespace. Auto-detected from git worktrees. | ```bash specific reshape status specific reshape complete mydb ``` `check` validates migration file syntax and works without a running database; the other actions need one (started automatically if `specific dev` isn't running). ### specific clean Remove local development data. Deletes the resource data stored in `.specific/keys/`, giving you a fresh start with empty databases and storage. Cannot be run while `specific dev` is active. ```bash specific clean ``` | Option | Description | | ------ | ----------- | | `-k, --key ` | Remove data only for the specified dev environment key. | ## Deploy and manage ### specific deploy Deploy the project to Specific Cloud. On first deploy, prompts you to log in and create or select a project; afterwards the project is remembered in `.specific/project.json`. Without a terminal, it does not prompt: create the project with `specific project new` and pass `--project`, and if nobody is logged in yet run `specific login --agent` first (see [specific login](#specific-login)). ```bash specific deploy ``` | Option | Description | | ------ | ----------- | | `--project ` | Project ID to deploy to (overrides the saved project). | | `-e, --environment ` | Target environment. Auto-selected if only one exists. | | `--secret ` | Secret values (repeatable). | | `--config ` | Config values (repeatable). | | `--preview` | Deploy to an ephemeral [preview environment](/guides/previews). | ```bash specific deploy --environment staging specific deploy --preview specific deploy --secret db_url=postgres://... --config domain=app.com ``` ### specific status Show project and deployment status, including each service's read-only dashboard-managed scaling policy. A failed latest deployment is listed separately from the active one. ```bash specific status ``` | Option | Description | | ------ | ----------- | | `--previews` | Show detailed preview environment and GitHub PR preview configuration. | | `--format ` | Output format. Defaults to `text` on a TTY, `json` when piped. | ### specific deployment Inspect deployments. `show` prints a deployment's state, how it was triggered (CLI, GitHub, dashboard), dashboard scaling changes, its builds, any missing secrets/configs blocking a pending deployment, and — for failures — the structured error. Works for every deploy regardless of how it was started, so it's the way to debug a failed GitHub push without digging through GitHub. ```bash specific deployment show # latest deployment of the current environment specific deployment show dep_0abc123 # a specific deployment by ID ``` | Option | Description | | ------ | ----------- | | `-e, --environment ` | Target environment when no ID is given (defaults to the current one). | | `--format ` | Output format. Defaults to `text` on a TTY, `json` when piped. | | `--output` | Include build output (logs) and error diagnostics. Hidden by default in both formats because it can be large; text mode prints a size hint when output exists. | ```bash specific deployment show --environment staging specific deployment show --format json specific deployment show dep_0abc123 --output ``` ### specific query Run a SQL query against your environment's [observability data](/guides/observability) (ClickHouse), or against a production Postgres database with `--db` (read-only). ```bash specific query "SELECT count() FROM observability.logs" ``` | Option | Description | | ------ | ----------- | | `-e, --environment ` | Target environment (defaults to the current one). | | `--db ` | Query a Postgres database by name with Postgres SQL (read-only) instead of observability data. | | `--format ` | Output format. Defaults to `table` on a TTY, `jsonl` when piped. | ```bash specific query --environment staging "SELECT * FROM observability.logs LIMIT 5" specific query --db main "SELECT * FROM users LIMIT 5" # Read the query from stdin cat queries/p99.sql | specific query ``` ### specific domain Manage custom domains for deployed services. `add` registers a domain and prints the DNS records you need to create. Removing a domain is done in the [dashboard](https://dashboard.specific.dev). ```bash specific domain add ``` | Option | Description | | ------ | ----------- | | `-e, --environment ` | Target environment (defaults to the current one). | ```bash specific domain add web api.example.com specific domain add web example.com --environment staging ``` ### specific project Manage projects. ```bash specific project new specific project list ``` | Option | Description | | ------ | ----------- | | `--org ` | Organization ID for `new` (required if you belong to multiple organizations). | ## Account ### specific login Log in to Specific. Opens a browser for authentication; in non-interactive environments it prints a device-authorization link and code instead. ```bash specific login ``` | Option | Description | | ------ | ----------- | | `--device-code ` | Complete login using a device code from a previous non-interactive login. | | `--agent` | Register the CLI itself as an agent through WorkOS agent registration. No browser, no human: the CLI gets an unclaimed account that can hold one project on the free tier and is deleted after 48 hours unless claimed with `specific claim`. | ```bash specific login --agent ``` An agent-registered CLI can create a project and deploy straight away. The account is provisional until a person claims it (see `specific claim`); after the claim it belongs to them and the CLI keeps working as their agent. Run again on an agent-registered CLI, `specific login --agent` does not register a second time: it reports whether the account is still unclaimed (with the date it is deleted) or who claimed it. An expired registration is replaced with a fresh one. `specific deploy` repeats the deletion date after every deploy on an unclaimed account. In headless environments where nobody can complete the browser flow (CI, cloud coding agents), skip `specific login` entirely: create an API key in the [dashboard's user settings](https://dashboard.specific.dev/user-settings) and set it as the `SPECIFIC_API_KEY` environment variable. Every CLI command authenticates with it directly, and it takes precedence over stored credentials. API keys can be created **read-only**: commands that inspect state (`specific status`, `specific project list`, `specific deployment show`, `specific query`) work, while anything that changes state — deploying, creating projects or environments — is rejected. Use a read-only key wherever the environment only needs to observe. ### specific claim Hand an agent-registered account (`specific login --agent`) to its owner through the WorkOS claim ceremony. ```bash specific claim --email specific claim --code ``` | Option | Description | | ------ | ----------- | | `--email ` | The owner's email. Starts the claim and prints a link for them to open. | | `--code ` | The code the owner was shown after signing in on that link. Completes the claim. | With `--email` the command prints a verification link. The owner signs in (or signs up) there and is shown a short code; running `specific claim --code` with it completes the claim. The project then belongs to the owner: in a new Personal organization if they are new to Specific, otherwise moved into one of the organizations they already have (an organization they own, with room for it, is preferred). If none of their organizations has enough project quota, the claim fails without moving the project. In an interactive terminal the command asks for the code right away instead of exiting. ### specific logout Log out of Specific. ```bash specific logout ``` ### specific update Update the Specific CLI to the latest version. The CLI also auto-updates in the background. ```bash specific update ``` ### specific beta Manage beta feature flags interactively. ```bash specific beta ``` --- # Introduction to Spectest Source: https://docs.specific.dev/spectest :::info Spectest is currently in private preview and only available by invite ::: Spectest is a testing framework and platform designed to test systems in their entirety, enabling you to build faster and remain confident that nothing breaks. In a Spectest suite, your product is tested from the outside through the same surfaces as your users, for example browsers, mobile apps, CLIs and APIs, with full determinism. To make this work, we run a full copy of your code and infrastructure inside the testing environment. This includes your own code, like web apps and backends, but also all backing services, such as databases, object storage and external APIs. Spectest can be added to an existing project in a few hours, without any changes to your code or access to production data. ## Build your product through tests Spectest is designed both for regression testing and to inspect how your product works without manual testing. Tests build on top of each other and form a tree of scenarios that closely match how your users use your product. Through our UI, you can then inspect exactly the user flows and any assertions. Here's an example of inspecting one test that drives a dashboard interaction. At the end, the test also asserts that the database was updated based on the changes made in the dashboard. ## Test anything and everything Spectest is not limited to just browsers but can test any surface of your product. We support testing web apps, mobile apps, CLIs, APIs, databases, and more. All these run as part of your full environment, meaning everything is tested end-to-end and multiple surfaces can be tested at the same time. The following example shows testing of a CLI tool for deploying apps. Once deployed, the tests also drive a browser to ensure the app is reachable at the URL the CLI returned. ## Work faster with your coding agent One of the most important points of Spectest is to let you build even faster with coding agents, without breaking anything. When your coding agent makes a change, Spectest can produce a diff of tests instead of code. This lets you visually inspect what changed in your product without manual testing, and with full confidence that nothing else broke. In this example, an agent has opened a pull request and Spectest calculates a diff based on the tests. The user can jump straight in to review the new feature through the test replay. ## Full environments for full coverage Spectest test environments are full Linux VMs, meaning you can (and should) run anything inside to match your production environment as closely as possible. We have users running a wide variety of architectures: like Kubernetes, Supabase, MQTT brokers, edge devices, Temporal, just to name a few. For external APIs that can't be run inside, for example an LLM API, we support creating fakes and replaying real API interactions. This example shows an agent being tested. The test uses a deterministic replay of real responses from the OpenAI API, with tool calls running for each test and deploying a user app inside the test environment. ## FAQ ### Do I need to use Specific to use Spectest? No. Spectest is a separate product and platform that can be used with any infrastructure and architecture. If you are using Specific for your project, it's very simple to get a Spectest environment set up. ### Can I run tests locally? At this point, no. Spectest relies on virtualization to run the isolated test environments and on macOS we have noticed this is too slow to run a test suite effectively. On Linux, we may support it in the future, but it will still likely be much faster to run tests on our powerful servers. ### Can I self-host Spectest? Yes, Spectest is architected to run test suites on our infrastructure or on servers you bring. The caveat is that they must be bare-metal servers and we recommend they have a large number of cores to run the test suite at full parallelism and speed. --- # Get started Source: https://docs.specific.dev/spectest/get-started :::info Spectest is invite-only right now and a project must be set up for you before you can use it ::: ## Set it up 1. **Install the CLI** ```bash curl -fsSL https://raw.githubusercontent.com/specific-dev/spectest/main/install.sh | sh ``` 2. **Log in** ```bash spectest login ``` 3. **Tell your coding agent to build an initial test suite** Pass a prompt like this to your coding agent and let it work to build an initial test suite: ``` Build a Spectest test suite for this project. Run `spectest docs` to learn more about how to write and run tests. Write tests from the perspective of end users, for example by driving browsers or making API calls. Make sure to get a full environment running that matches production. ``` 4. **Use the dashboard to inspect your test runs** Go to the [spectest.specific.dev](https://spectest.specific.dev) to inspect test runs and see your full product working without any manual testing. --- # Why Specific? Source: https://docs.specific.dev/why-specific Coding agents are rapidly improving and writing more code. But when it comes to infrastructure, they hit a wall. To understand what's deployed, they'd need to navigate CLI output. Terraform solves declaration by defining infrastructure as code, but it doesn't handle local dev or deployment. Docker Compose handles local dev, but production requires separate tooling that must be kept in sync. The result is that agents can write your code, but the path from code to running application remains fragmented and manual. Specific closes that gap: your agent declares services, databases, storage, and more in a single configuration file that lives next to your code, and the CLI runs the whole stack locally and deploys it to production. See [How Specific works](/concepts/how-it-works) for the mental model. ## Built for the agent feedback loop After a successful deployment, anything that can fail will fail. Specific is designed so your agent can find out what went wrong without a human relaying screenshots: - `specific check` validates every configuration change before it's applied. - `specific dev` runs the full stack locally, with per-service log files the agent can read and grep. - `specific query` gives the agent SQL access to production [logs and metrics](/guides/observability), scoped to an environment. The agent that wrote the change is the one debugging it, with direct access to the evidence. ## Not a coding agent Specific works with the coding agent you already use, like Claude Code, Codex, or Cursor. The CLI gives your agent the documentation, validation, local environment, and deployment commands it needs to change infrastructure safely alongside your application code. See [Coding agents](/coding-agents) for how that's wired up. ## No SDKs, no lock-in Your application never imports a Specific library. Everything arrives through environment variables and standard protocols: Postgres is Postgres, storage is S3-compatible, Redis is Redis-compatible. That has practical consequences: - Any language and framework works, and a custom Dockerfile covers custom runtimes. - Services Specific doesn't provide still work: connect to external APIs, hosted services, or third-party databases through normal secrets and client libraries. - Authentication stays yours. Use Better Auth, WorkOS, Clerk, or your own; Specific handles infrastructure and stays out of your user model. For internal tools, a [protected environment](/guides/protected) requires sign-in from your organization's members without any application code. ## Agents with guardrails Letting an agent touch infrastructure raises a fair question: what stops it from breaking things? - Infrastructure changes are written to `specific.hcl`, so they're reviewed like code and validated with `specific check`. - Agents work through Specific's config schema and CLI, not arbitrary cloud or account settings. - The full stack is testable locally before anything ships, and `specific deploy` runs build checks before provisioning or rolling out. - Destructive actions and production controls, like scaling, changing production secrets, and deleting projects, stay with humans in the [dashboard](/concepts/dashboard). Humans also configure deployment policy, like GitHub deploys and automatic PR previews. ## How Specific compares **[vs Terraform](/compare/terraform)** Declaration is where Terraform stops; Specific covers dev, deploys, and operations. **[vs Supabase](/compare/supabase)** Standard tools and any backend stack instead of an SDK-locked backend. **[vs Convex](/compare/convex)** No proprietary runtime or SDK; plain Postgres and normal protocols. **[vs Vercel](/compare/vercel)** Full-stack infrastructure, not just frontend hosting.