@specific.dev/cli 0.1.42 → 0.1.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/admin/404/index.html +1 -1
  2. package/dist/admin/404.html +1 -1
  3. package/dist/admin/__next.__PAGE__.txt +4 -4
  4. package/dist/admin/__next._full.txt +11 -11
  5. package/dist/admin/__next._head.txt +4 -4
  6. package/dist/admin/__next._index.txt +4 -4
  7. package/dist/admin/__next._tree.txt +2 -2
  8. package/dist/admin/_next/static/chunks/{b71388016463cab2.js → 522cc1cbb935d4c6.js} +1 -1
  9. package/dist/admin/_next/static/chunks/62190944d690fc4e.js +4 -0
  10. package/dist/admin/_next/static/chunks/938d410f2031f3b1.css +3 -0
  11. package/dist/admin/_next/static/chunks/979e895ce202c4a3.js +1 -0
  12. package/dist/admin/_next/static/chunks/99f58b3b47071cc8.js +5 -0
  13. package/dist/admin/_next/static/chunks/9f53491ced2668ee.js +1 -0
  14. package/dist/admin/_next/static/chunks/a308451471d4cb39.js +1 -0
  15. package/dist/admin/_next/static/chunks/a4ff1b18f2f45e23.js +2 -0
  16. package/dist/admin/_next/static/chunks/a5c8191596f07db5.js +2 -0
  17. package/dist/admin/_next/static/chunks/a6dad97d9634a72d.js.map +1 -1
  18. package/dist/admin/_next/static/chunks/{ff1a16fafef87110.js → b2b4aada246f4749.js} +1 -1
  19. package/dist/admin/_next/static/chunks/bf65cbe8dc67cf90.js +5 -0
  20. package/dist/admin/_next/static/chunks/{turbopack-22b7312525502d51.js → turbopack-9e3df33047c5ecb2.js} +2 -2
  21. package/dist/admin/_not-found/__next._full.txt +9 -9
  22. package/dist/admin/_not-found/__next._head.txt +4 -4
  23. package/dist/admin/_not-found/__next._index.txt +4 -4
  24. package/dist/admin/_not-found/__next._not-found.__PAGE__.txt +2 -2
  25. package/dist/admin/_not-found/__next._not-found.txt +3 -3
  26. package/dist/admin/_not-found/__next._tree.txt +2 -2
  27. package/dist/admin/_not-found/index.html +1 -1
  28. package/dist/admin/_not-found/index.txt +9 -9
  29. package/dist/admin/databases/__next._full.txt +11 -11
  30. package/dist/admin/databases/__next._head.txt +4 -4
  31. package/dist/admin/databases/__next._index.txt +4 -4
  32. package/dist/admin/databases/__next._tree.txt +2 -2
  33. package/dist/admin/databases/__next.databases.__PAGE__.txt +4 -4
  34. package/dist/admin/databases/__next.databases.txt +3 -3
  35. package/dist/admin/databases/index.html +1 -1
  36. package/dist/admin/databases/index.txt +11 -11
  37. package/dist/admin/index.html +1 -1
  38. package/dist/admin/index.txt +11 -11
  39. package/dist/cli.js +1522 -1360
  40. package/dist/docs/index.md +1 -0
  41. package/dist/docs/integrations/nextjs.md +18 -0
  42. package/dist/docs/integrations/temporal.md +89 -0
  43. package/dist/docs/migrations/supabase.md +18 -0
  44. package/dist/docs/secrets-config.md +52 -8
  45. package/dist/docs/services.md +4 -2
  46. package/package.json +12 -4
  47. package/dist/admin/_next/static/chunks/1a608619ba3183f8.js +0 -5
  48. package/dist/admin/_next/static/chunks/237926899f121e8a.js +0 -2
  49. package/dist/admin/_next/static/chunks/2ca8ab35893ba132.css +0 -3
  50. package/dist/admin/_next/static/chunks/42730c0491633b9d.js +0 -5
  51. package/dist/admin/_next/static/chunks/465f799faf41e6df.js +0 -1
  52. package/dist/admin/_next/static/chunks/806bdb8e4a6a9b95.js +0 -4
  53. package/dist/admin/_next/static/chunks/9054c84ba21a4c14.js +0 -2
  54. package/dist/admin/_next/static/chunks/d2be314c3ece3fbe.js +0 -1
  55. package/dist/admin/_next/static/chunks/dde2c8e6322d1671.js +0 -1
  56. /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → pbjYnqTudS-YVLwgwOgBz}/_buildManifest.js +0 -0
  57. /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → pbjYnqTudS-YVLwgwOgBz}/_clientMiddlewareManifest.json +0 -0
  58. /package/dist/admin/_next/static/{w-7TGbUFVs5LhUxmBNTTr → pbjYnqTudS-YVLwgwOgBz}/_ssgManifest.js +0 -0
@@ -28,6 +28,7 @@ The following is a list of common frameworks and libraries with guidance on how
28
28
  - [Next.js](/integrations/nextjs): full-stack React framework
29
29
  - [Drizzle ORM](/integrations/drizzle): TypeScript ORM with type safety
30
30
  - [Prisma](/integrations/prisma): TypeScript ORM with auto-generated client
31
+ - [Temporal](/integrations/temporal): durable workflow engine for background tasks, AI agents, cron jobs, batch jobs and more
31
32
 
32
33
  ## Adding Specific to existing projects / migrating to Specific
33
34
 
@@ -32,6 +32,24 @@ service "web" {
32
32
 
33
33
  Next.js reads `PORT` from the environment automatically, so no additional configuration is needed.
34
34
 
35
+ ## Migrating existing secrets
36
+
37
+ If the project has existing secrets in `.env`, `.env.local`, or similar files, move them to `specific.local` so they don't need to be re-entered when running `specific dev`:
38
+
39
+ ```hcl
40
+ # specific.local
41
+ secrets {
42
+ stripe_api_key = "sk_test_..."
43
+ database_password = "..."
44
+ }
45
+
46
+ configs {
47
+ api_url = "https://api.example.com"
48
+ }
49
+ ```
50
+
51
+ If there are secrets that are not defined in `specific.hcl` but exist in `.env`, ask the user about it and perhaps add configs/secrets for them.
52
+
35
53
  ## Important note on pre-rendering during builds
36
54
 
37
55
  During a build, Next.js will load a lot of code to perform pre-rendering. That code can not reference any environments variables from `specific.hcl`, like database URLs or API keys from secrets, as those are not available during the build and will cause it to fail. Ensure all code that relies on these env vars DOES NOT get executed during the build phase.
@@ -0,0 +1,89 @@
1
+ # Temporal
2
+
3
+ Temporal is a durable workflow engine. This guide covers running Temporal locally during development and connecting to Temporal Cloud in production.
4
+
5
+ Temporal has extensive SDK support across many languages including TypeScript, Python, Go, Java, .NET, and PHP. See the [Temporal documentation](https://docs.temporal.io/) for language-specific guides on implementing workers, workflows, and activities. This document only covers integration with Specific.
6
+
7
+ ## Configuration
8
+
9
+ Define a dev-only Temporal service that runs locally, along with configs and secrets for production Temporal Cloud.
10
+
11
+ ```hcl
12
+ build "app" {
13
+ base = "node"
14
+ }
15
+
16
+ # Dev-only service: runs local Temporal server during development
17
+ # No top-level command means it's excluded from production deployment
18
+ #
19
+ service "temporal" {
20
+ endpoint "grpc" {}
21
+ endpoint "ui" { public = true }
22
+
23
+ dev {
24
+ command = "temporal server start-dev --port $GRPC_PORT --ui-port $UI_PORT --db-filename /tmp/temporal.db"
25
+ env = {
26
+ GRPC_PORT = endpoint.grpc.port
27
+ UI_PORT = endpoint.ui.port
28
+ }
29
+ }
30
+ }
31
+
32
+ # Temporal Cloud address (e.g., your-namespace.tmprl.cloud:7233)
33
+ config "temporal_address" {}
34
+
35
+ # Namespace - uses "default" in dev, must be set for production
36
+ config "temporal_namespace" {
37
+ dev {
38
+ default = "default"
39
+ }
40
+ }
41
+
42
+ # API key for Temporal Cloud - not required in dev
43
+ secret "temporal_api_key" {
44
+ dev {
45
+ required = false
46
+ }
47
+ }
48
+
49
+ service "app" {
50
+ build = build.app
51
+ command = "node index.js"
52
+ expose {}
53
+
54
+ env = {
55
+ PORT = port
56
+ TEMPORAL_ADDRESS = config.temporal_address
57
+ TEMPORAL_NAMESPACE = config.temporal_namespace
58
+ TEMPORAL_API_KEY = secret.temporal_api_key
59
+ }
60
+
61
+ dev {
62
+ command = "node --watch index.js"
63
+ env = {
64
+ # Override to use local Temporal service instead
65
+ TEMPORAL_ADDRESS = ""
66
+ TEMPORAL_HOST = service.temporal.endpoint.grpc.host
67
+ TEMPORAL_PORT = service.temporal.endpoint.grpc.port
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ## Development
74
+
75
+ Running `specific dev` automatically starts a local Temporal server. The user must install the Temporal CLI for this: https://temporal.io/setup/install-temporal-cli. The Temporal Web UI is available at the public endpoint URL shown in the output.
76
+
77
+ Your app connects to the local Temporal server using the service endpoint environment variables (`TEMPORAL_HOST` and `TEMPORAL_PORT`).
78
+
79
+ ## Production
80
+
81
+ In production, the dev-only `temporal` service is excluded from deployment. Your app connects to Temporal Cloud using:
82
+
83
+ 1. `temporal_address` - Your Temporal Cloud address (e.g., `your-namespace.tmprl.cloud:7233`)
84
+ 2. `temporal_namespace` - Your Temporal Cloud namespace
85
+ 3. `temporal_api_key` - API key for authentication
86
+
87
+ Set these with `specific secrets set` before deploying.
88
+
89
+ ## SDK support
@@ -53,6 +53,24 @@ There is currently no equivalent to Supabase Cron available in Specific. It will
53
53
  - Replace all Supabase client calls with standard `fetch` requests to your backend API service
54
54
  - Pass auth tokens via request headers (e.g., `Authorization: Bearer <token>`) to the backend service for authenticated endpoints
55
55
 
56
+ ## Migrating existing secrets
57
+
58
+ If the project has existing secrets in `.env`, `.env.local`, or Supabase configuration files, move them to `specific.local` so they don't need to be re-entered when running `specific dev`:
59
+
60
+ ```hcl
61
+ # specific.local
62
+ secrets {
63
+ stripe_api_key = "sk_test_..."
64
+ jwt_secret = "..."
65
+ }
66
+
67
+ config {
68
+ api_url = "https://api.example.com"
69
+ }
70
+ ```
71
+
72
+ Note: Only secrets and configs that are declared in `specific.hcl` need to be added to `specific.local`. The Supabase-specific environment variables (like `SUPABASE_URL` and `SUPABASE_ANON_KEY`) are no longer needed after migration.
73
+
56
74
  ## Data migration
57
75
 
58
76
  Data migration out of Supabase Postgres and Storage (S3) into Specific is currently a manual process. Help guide the user through this if they want it.
@@ -9,7 +9,7 @@ Secrets and config let you parameterize values that services need. Use them to a
9
9
 
10
10
  ## Secrets
11
11
 
12
- Declare secrets that your application needs. Values are stored separately from configuration in `specific.secrets` (gitignored).
12
+ Declare secrets that your application needs in `specific.hcl`:
13
13
 
14
14
  ```hcl
15
15
  secret "stripe_api_key" {}
@@ -40,17 +40,18 @@ service "api" {
40
40
 
41
41
  ### Setting secret values
42
42
 
43
- For local development with `specific dev` or `specific exec`, use the CLI:
43
+ For local development, add secrets to the `secrets` block in `specific.local`:
44
44
 
45
- ```bash
46
- specific secrets set stripe_api_key
45
+ ```hcl
46
+ # specific.local
47
+ secrets {
48
+ stripe_api_key = "sk_test_..."
49
+ }
47
50
  ```
48
51
 
49
- This prompts for the value interactively and stores it in `specific.secrets`. Production secrets are configured separately during deployment.
50
-
51
52
  ### Generated vs manual secrets
52
53
 
53
- - **Manual secrets** (no `generated` flag) - Must be set via `specific secrets set`. Error on startup if missing.
54
+ - **Manual secrets** (no `generated` flag) - Must be set in `specific.local`. Error on startup if missing.
54
55
  - **Generated secrets** (`generated = true`) - Auto-created on first run if not set. You can still override manually.
55
56
 
56
57
  ## Config
@@ -80,9 +81,20 @@ service "api" {
80
81
 
81
82
  - `default` - Default value used if not overridden by an environment.
82
83
 
84
+ ### Setting config values locally
85
+
86
+ For local development, you can override config defaults in the `config` block of `specific.local`:
87
+
88
+ ```hcl
89
+ # specific.local
90
+ config {
91
+ log_level = "debug"
92
+ }
93
+ ```
94
+
83
95
  ### Environment overrides
84
96
 
85
- Override config values per environment:
97
+ Override config values per environment in `specific.hcl`:
86
98
 
87
99
  ```hcl
88
100
  config "log_level" {
@@ -102,9 +114,28 @@ environment "staging" {
102
114
  }
103
115
  ```
104
116
 
117
+ ## Local values file
118
+
119
+ For local development, secrets and config values are stored in `specific.local` (gitignored). The user does not have to fill this out manually. When running, `specific dev`, they will be asked for any missing secrets and config values. The file. This file uses HCL format with separate blocks for secrets and configs:
120
+
121
+ ```hcl
122
+ # specific.local
123
+ secrets {
124
+ stripe_api_key = "sk_test_..."
125
+ }
126
+
127
+ config {
128
+ log_level = "debug"
129
+ }
130
+ ```
131
+
132
+ This file is automatically gitignored and not included in deployments. Production secrets are configured separately during deployment.
133
+
105
134
  ## Example
106
135
 
107
136
  ```hcl
137
+ # specific.hcl
138
+
108
139
  # External API key - must be set manually, sensitive
109
140
  secret "stripe_api_key" {}
110
141
 
@@ -139,3 +170,16 @@ environment "production" {
139
170
  }
140
171
  }
141
172
  ```
173
+
174
+ And the corresponding local values file:
175
+
176
+ ```hcl
177
+ # specific.local (gitignored)
178
+ secrets {
179
+ stripe_api_key = "sk_test_..."
180
+ }
181
+
182
+ config {
183
+ log_level = "debug"
184
+ }
185
+ ```
@@ -116,14 +116,14 @@ service "worker" {
116
116
  command = "./worker"
117
117
 
118
118
  env = {
119
- API_URL = service.api.url # http://localhost:PORT in dev, http://api:80 in prod
119
+ API_URL = service.api.url # localhost:PORT in dev, api:80 in prod
120
120
  }
121
121
  }
122
122
  ```
123
123
 
124
124
  Available service reference attributes:
125
125
 
126
- - `service.<name>.url` - Full URL (e.g., `http://localhost:3000`)
126
+ - `service.<name>.url` - Full URL without scheme (e.g., `localhost:3000`)
127
127
  - `service.<name>.host` - Host only (e.g., `localhost`)
128
128
  - `service.<name>.port` - Port only (e.g., `3000`)
129
129
 
@@ -233,6 +233,7 @@ secret "temporal_url" {}
233
233
  ```
234
234
 
235
235
  Dev-only services:
236
+
236
237
  - Cannot have a `build` reference (they run arbitrary commands)
237
238
  - Are automatically excluded from production deployment
238
239
  - Can define endpoints that other services reference during development
@@ -320,6 +321,7 @@ service "frontend" {
320
321
  ---
321
322
 
322
323
  Related topics:
324
+
323
325
  - Run `specific docs builds` for build configuration
324
326
  - Run `specific docs exec` for running one-off commands during development
325
327
  - Run `specific docs postgres` for database configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@specific.dev/cli",
3
- "version": "0.1.42",
3
+ "version": "0.1.44",
4
4
  "description": "CLI for Specific infrastructure-as-code",
5
5
  "type": "module",
6
6
  "main": "dist/cli.js",
@@ -34,7 +34,9 @@
34
34
  "node": ">=18"
35
35
  },
36
36
  "dependencies": {
37
+ "@specific/config": "file:../config",
37
38
  "chokidar": "^5.0.0",
39
+ "hcl2-json-parser": "^1.0.1",
38
40
  "commander": "^14.0.2",
39
41
  "http-proxy": "^1.18.1",
40
42
  "ink": "^6.5.1",
@@ -42,14 +44,20 @@
42
44
  "node-forge": "^1.3.1",
43
45
  "open": "^11.0.0",
44
46
  "posthog-node": "^5.24.1",
45
- "react": "^19.2.3",
47
+ "react": "^19.0.0",
46
48
  "s3rver": "^3.7.1",
47
49
  "tar-vern": "^1.3.0"
48
50
  },
49
51
  "devDependencies": {
50
52
  "@types/http-proxy": "^1.17.17",
53
+ "@types/node": "^25.0.1",
51
54
  "@types/node-forge": "^1.3.11",
52
55
  "@types/react": "^19.2.7",
53
- "esbuild": "^0.24.0"
56
+ "esbuild": "^0.24.0",
57
+ "tsx": "^4.21.0",
58
+ "typescript": "^5.9.3"
59
+ },
60
+ "pnpm": {
61
+ "onlyBuiltDependencies": ["esbuild"]
54
62
  }
55
- }
63
+ }