smoonb 0.0.70 → 0.0.72

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.
package/README.md CHANGED
@@ -2,378 +2,461 @@
2
2
 
3
3
  **Complete Supabase backup and migration tool**
4
4
 
5
- Backup e restauração: completo e simples, como deveria ser
5
+ Backup and restore: complete and simple, as it should be
6
6
 
7
- > **Nota sobre acesso comercial:** o Supa Moonbase passará a exigir validação de conta antes de executar operações (login + verificação de assinatura) em fase futura. Nesta versão, não autenticação implementadaeste README apenas apresenta a base legal/comercial. O uso operacional será regido pelos [Termos de Serviço](https://smoonb.com/terms) e pela [Política de Privacidade](https://smoonb.com/privacy).
7
+ > **Note on commercial access:** Supa Moonbase will require account validation before executing operations (login + subscription verification) in a future phase. In this version, there is no authentication implemented this README only presents the legal/commercial basis. Operational use will be governed by the [Terms of Service](https://smoonb.com/terms) and [Privacy Policy](https://smoonb.com/privacy).
8
8
 
9
- **Desenvolvido por:** Goalmoon Tecnologia LTDA
9
+ **Read this in other languages:** [Português (Brasil)](README.pt-BR.md)
10
+
11
+ **Developed by:** Goalmoon Tecnologia LTDA
10
12
  **Website:** https://smoonb.com
11
13
  **GitHub:** https://github.com/almmello/smoonb
12
14
 
13
- ## 🎯 Objetivo
15
+ ## 🎯 Objective
14
16
 
15
- O **smoonb** resolve o problema das ferramentas existentes que fazem backup apenas da database PostgreSQL, ignorando componentes críticos do Supabase.
17
+ **smoonb** solves the problem of existing tools that only backup the PostgreSQL database, ignoring critical Supabase components.
16
18
 
17
- ## 📦 Componentes de Backup
19
+ ## 📦 Backup Components
18
20
 
19
- O smoonb faz backup completo de todos os componentes do seu projeto Supabase:
21
+ smoonb performs a complete backup of all components of your Supabase project:
20
22
 
21
23
  - ✅ **Database PostgreSQL** (backup completo via `pg_dumpall` + SQL separados, idêntico ao Dashboard)
22
24
  - ✅ **Database Extensions and Settings** (extensões PostgreSQL e configurações)
23
25
  - ✅ **Custom Roles** (roles personalizados do PostgreSQL)
24
26
  - ✅ **Edge Functions** (download automático do servidor)
25
27
  - ✅ **Auth Settings** (configurações de autenticação via Management API)
26
- - ✅ **Storage Buckets** (metadados e configurações via Management API)
28
+ - ✅ **Storage Buckets** (backup completo: metadados, configurações e todos os arquivos via Management API + Supabase Client, cria ZIP no padrão do Dashboard)
27
29
  - ✅ **Realtime Settings** (7 parâmetros capturados interativamente)
28
30
  - ✅ **Supabase .temp** (arquivos temporários do Supabase CLI)
29
31
  - ✅ **Migrations** (todas as migrations do projeto via `supabase migration fetch`)
30
32
 
31
- ## ⚠️ Termo de Uso e Aviso de Risco
32
-
33
- Ao usar o smoonb, você reconhece e concorda que o smoonb é fornecido "NO ESTADO EM QUE SE ENCONTRA" ("AS IS") e "CONFORME DISPONIBILIDADE", sem garantias de qualquer natureza—expressas, implícitas ou legais—incluindo, sem limitação, garantias de comercialização, adequação a um fim específico e não violação, na máxima extensão permitida pela lei aplicável.
34
-
35
- Operações de backup e restauração envolvem riscos, os ambientes variam amplamente e não é possível prever ou validar todas as configurações dos usuários. Você é o único responsável por validar seu ambiente, manter cópias independentes e verificar os resultados antes de utilizá-los em produção.
33
+ ## ⚠️ Universal Disclaimer / Aviso Legal Universal
36
34
 
37
- **Limitação de responsabilidade (PT-BR)**Na máxima extensão permitida por lei, a Goalmoon, seus contribuidores e licenciadores não serão responsáveis por danos indiretos, incidentais, especiais, consequentes, exemplares ou punitivos (incluindo perda de dados, interrupção de negócios ou lucros cessantes) decorrentes do uso, incapacidade de uso, das operações de backup/restauração realizadas com, ou dos resultados gerados pelo smoonb.
35
+ By continuing, you acknowledge and agree that Supa Moonbase (smoonb) is provided "AS IS" and "AS AVAILABLE", with no warranties of any kindexpress, implied, or statutory—including but not limited to merchantability, fitness for a particular purpose, and non-infringement, to the maximum extent permitted by applicable law. Backup and restore operations inherently carry risk, environments vary widely, and we cannot foresee or validate all user setups. You are solely responsible for validating your own environment, keeping independent copies, and verifying results before relying on them in production. We build Supa Moonbase (smoonb) on public, auditable, open-source repositories to help people simplify their workflows, but this does not create any warranty, promise of support, or service-level commitment.
38
36
 
39
- **Observação para consumidores no Brasil (PT-BR)** Para consumidores brasileiros, este aviso não afasta direitos irrenunciáveis previstos no Código de Defesa do Consumidor (CDC); qualquer limitação aqui prevista se aplica nos limites da lei e não impede a indenização obrigatória quando cabível.
37
+ **Limitation of liability** To the maximum extent permitted by law, Goalmoon Tecnologia LTDA, its contributors, and licensors will not be liable for any indirect, incidental, special, consequential, exemplary, or punitive damages (including loss of data, interruption of business, or lost profits) arising from or related to the use of, inability to use, backup/restore operations performed by, or results produced by Supa Moonbase (smoonb). In any case, our aggregate liability for all claims relating to Supa Moonbase (smoonb) will not exceed the amount you paid for Supa Moonbase (smoonb) in the 12 months preceding the event. Nothing in this notice excludes or limits liability where such limits are prohibited by law, including (as applicable) for willful misconduct or gross negligence.
40
38
 
41
- ## 🚀 Instalação
39
+ ## 🚀 Installation
42
40
 
43
- **⚠️ IMPORTANTE: Instale APENAS localmente no projeto!**
41
+ **⚠️ IMPORTANT: Install ONLY locally in the project!**
44
42
 
45
43
  ```bash
46
- # ✅ CORRETO - Instalar localmente no projeto
44
+ # ✅ CORRECT - Install locally in the project
47
45
  npm install smoonb
48
46
 
49
- # ✅ CORRETO - Usar com npx
47
+ # ✅ CORRECT - Use with npx
50
48
  npx smoonb --help
51
49
 
52
- # ❌ ERRADO - NÃO instalar globalmente
53
- npm install -g smoonb # ← Isso será bloqueado!
50
+ # ❌ WRONG - DO NOT install globally
51
+ npm install -g smoonb # ← This will be blocked!
54
52
  ```
55
53
 
56
- ### 🔄 Atualizar para a Última Versão
54
+ ### 🔄 Update to Latest Version
57
55
 
58
- Para atualizar o smoonb para a versão mais recente disponível:
56
+ To update smoonb to the latest available version:
59
57
 
60
58
  ```bash
61
- # Atualizar no projeto atual
59
+ # Update in current project
62
60
  npm install smoonb@latest
63
61
  ```
64
62
 
65
- **⚠️ IMPORTANTE:** O smoonb deve ser instalado localmente no projeto. Não é permitido usar sem instalar (ex.: `npx smoonb@latest`).
63
+ **⚠️ IMPORTANT:** smoonb must be installed locally in the project. Using without installing (e.g., `npx smoonb@latest`) is not allowed.
66
64
 
67
- **💡 Por que apenas local?**
68
- - **🔒 Segurança**: Evita conflitos de versão
69
- - **📦 Isolamento**: Cada projeto usa sua versão
70
- - **🔄 Atualizações**: Controle granular por projeto
71
- - **🛡️ Estabilidade**: Evita quebras em outros projetos
65
+ **💡 Why local only?**
66
+ - **🔒 Security**: Avoids version conflicts
67
+ - **📦 Isolation**: Each project uses its own version
68
+ - **🔄 Updates**: Granular control per project
69
+ - **🛡️ Stability**: Prevents breaking other projects
72
70
 
73
- ## 📋 Pré-requisitos
71
+ ## 📋 Prerequisites
74
72
 
75
- ### 1. Docker Desktop (OBRIGATÓRIO)
73
+ ### 1. Docker Desktop (REQUIRED)
76
74
  ```bash
77
- # Instalar Docker Desktop
75
+ # Install Docker Desktop
78
76
  # Windows/macOS: https://docs.docker.com/desktop/install/
79
77
  # Linux: https://docs.docker.com/engine/install/
80
78
 
81
- # Verificar se está rodando
79
+ # Verify if it's running
82
80
  docker --version
83
81
  docker ps
84
82
  ```
85
83
 
86
- **⚠️ IMPORTANTE:** O Docker é necessário para:
87
- - Backup da database via `pg_dumpall` (compatível com Dashboard do Supabase)
88
- - Compressão de arquivos `.backup.gz`
89
- - Restauração de backups `.backup` e `.backup.gz`
84
+ **⚠️ IMPORTANT:** Docker is required for:
85
+ - Database backup via `pg_dumpall` (compatible with Supabase Dashboard)
86
+ - Compression of `.backup.gz` files
87
+ - Restoration of `.backup` and `.backup.gz` backups
90
88
 
91
89
  ### 2. Supabase CLI
92
90
  ```bash
93
91
  npm install -g supabase
94
92
  ```
95
93
 
96
- ### 3. Personal Access Token do Supabase
97
- É necessário obter um token de acesso pessoal do Supabase para usar a Management API:
94
+ ### 3. Supabase Personal Access Token
95
+ You need to obtain a Supabase personal access token to use the Management API:
98
96
 
99
- 1. Acesse: https://supabase.com/dashboard/account/tokens
100
- 2. Clique em "Generate new token"
101
- 3. Copie o token (formato: `sbp_...`)
102
- 4. Adicione ao `.env.local` como `SUPABASE_ACCESS_TOKEN`
97
+ 1. Visit: https://supabase.com/dashboard/account/tokens
98
+ 2. Click "Generate new token"
99
+ 3. Copy the token (format: `sbp_...`)
100
+ 4. Add to `.env.local` as `SUPABASE_ACCESS_TOKEN`
103
101
 
104
- ## ⚙️ Configuração
102
+ ## ⚙️ Configuration
105
103
 
106
- ### Método Moderno: `.env.local` (RECOMENDADO)
104
+ ### Modern Method: `.env.local` (RECOMMENDED)
107
105
 
108
- O **smoonb** agora usa `.env.local` para configuração, seguindo o padrão da indústria. Isso torna o processo mais simples e integrado ao seu fluxo de trabalho.
106
+ **smoonb** now uses `.env.local` for configuration, following industry standards. This makes the process simpler and more integrated with your workflow.
109
107
 
110
- #### 1. Criar ou editar `.env.local` na raiz do projeto
108
+ #### 1. Create or edit `.env.local` in the project root
111
109
 
112
110
  ```bash
113
- # Criar arquivo .env.local
111
+ # Create .env.local file
114
112
  touch .env.local
115
113
  ```
116
114
 
117
- #### 2. Adicionar as variáveis de ambiente necessárias
115
+ #### 2. Add required environment variables
118
116
 
119
117
  ```env
120
- # URLs e Chaves do Supabase
121
- NEXT_PUBLIC_SUPABASE_URL=[sua-supabase-url]
122
- NEXT_PUBLIC_SUPABASE_ANON_KEY=[sua-anon-key]
123
- SUPABASE_SERVICE_ROLE_KEY=e[sua-service-role]
118
+ # Supabase URLs and Keys
119
+ NEXT_PUBLIC_SUPABASE_URL=[your-supabase-url]
120
+ NEXT_PUBLIC_SUPABASE_ANON_KEY=[your-anon-key]
121
+ SUPABASE_SERVICE_ROLE_KEY=[your-service-role]
124
122
 
125
123
  # Database Connection
126
- SUPABASE_DB_URL=postgresql://postgres:[sua-database-password]@db.[seu-project-id].supabase.co:5432/postgres
124
+ SUPABASE_DB_URL=postgresql://postgres:[your-database-password]@db.[your-project-id].supabase.co:5432/postgres
127
125
 
128
- # Identificação do Projeto
129
- SUPABASE_PROJECT_ID=[seu-project-id]
126
+ # Project Identification
127
+ SUPABASE_PROJECT_ID=[your-project-id]
130
128
 
131
- # Personal Access Token (OBRIGATÓRIO para Management API)
132
- SUPABASE_ACCESS_TOKEN=[seu-access-token]]
129
+ # Personal Access Token (REQUIRED for Management API)
130
+ SUPABASE_ACCESS_TOKEN=[your-access-token]
133
131
 
134
- # Diretório de Backups (opcional, padrão: ./backups)
132
+ # Backup Directory (optional, default: ./backups)
135
133
  SMOONB_OUTPUT_DIR=./backups
136
134
  ```
137
135
 
138
- #### 3. Mapeamento Interativo
136
+ #### 3. Interactive Mapping
137
+
138
+ When running `backup` or `restore` for the first time, **smoonb** will:
139
+
140
+ 1. **Read** your current `.env.local`
141
+ 2. **Identify** the keys you already have
142
+ 3. **Ask interactively** which keys correspond to the expected ones (if names are different)
143
+ 4. **Add** missing keys if necessary
144
+ 5. **Create automatic backup** of `.env.local` before any changes
145
+ 6. **Save mapping** for future executions
146
+
147
+ **Mapping example:**
148
+ ```
149
+ 🔧 Mapping variable: NEXT_PUBLIC_SUPABASE_URL
150
+ Current value: https://abc123.supabase.co
151
+ Is this the correct value for the target project? (Y/n): Y
152
+ ```
153
+
154
+ ## 🌐 Internationalization (i18n)
155
+
156
+ **smoonb** supports multiple languages automatically. Currently supported languages are:
157
+
158
+ - **English (en)** - Default language
159
+ - **Portuguese (Brazil) (pt-BR)** - Full support
160
+
161
+ ### Automatic Language Detection
162
+
163
+ Language is detected automatically in the following order of precedence:
164
+
165
+ 1. **CLI flag `--lang`** (highest priority)
166
+ ```bash
167
+ npx smoonb --lang pt-BR backup
168
+ npx smoonb --lang en restore
169
+ ```
170
+
171
+ 2. **Environment variable `SMOONB_LANG`**
172
+ ```bash
173
+ # Windows PowerShell
174
+ $env:SMOONB_LANG="pt-BR"
175
+ npx smoonb backup
176
+
177
+ # Linux/macOS
178
+ export SMOONB_LANG=pt-BR
179
+ npx smoonb backup
180
+ ```
181
+
182
+ 3. **System locale** (LANG, LC_ALL, LC_MESSAGES)
183
+ ```bash
184
+ # smoonb automatically detects system locale
185
+ # Example: LANG=pt_BR.UTF-8 → pt-BR
186
+ # Example: LANG=en_US.UTF-8 → en
187
+ ```
188
+
189
+ 4. **Fallback to English (en)** if none of the above are detected
139
190
 
140
- Ao executar `backup` ou `restore` pela primeira vez, o **smoonb** irá:
191
+ ### Supported Languages and Aliases
141
192
 
142
- 1. **Ler** seu `.env.local` atual
143
- 2. **Identificar** as chaves que você já tem
144
- 3. **Perguntar interativamente** quais chaves correspondem às esperadas (se os nomes forem diferentes)
145
- 4. **Adicionar** chaves faltantes se necessário
146
- 5. **Criar backup** automático do `.env.local` antes de qualquer alteração
147
- 6. **Salvar mapeamento** para futuras execuções
193
+ smoonb accepts the following language codes:
148
194
 
149
- **Exemplo de mapeamento:**
195
+ - `en` or `en-US` → English
196
+ - `pt-BR`, `pt_BR` or `pt` → Portuguese (Brazil)
197
+
198
+ ### Usage Examples
199
+
200
+ **Force Portuguese:**
201
+ ```bash
202
+ npx smoonb --lang pt-BR backup
150
203
  ```
151
- 🔧 Mapeando variável: NEXT_PUBLIC_SUPABASE_URL
152
- Valor atual: https://abc123.supabase.co
153
- Este é o valor correto do projeto alvo? (S/n): S
204
+
205
+ **Force English:**
206
+ ```bash
207
+ npx smoonb --lang en restore
154
208
  ```
155
209
 
156
- ## 🎯 Uso
210
+ **Use environment variable:**
211
+ ```bash
212
+ # Windows PowerShell
213
+ $env:SMOONB_LANG="pt-BR"
214
+ npx smoonb check
215
+
216
+ # Linux/macOS
217
+ export SMOONB_LANG=en
218
+ npx smoonb check
219
+ ```
220
+
221
+ **Automatic system detection:**
222
+ ```bash
223
+ # If system is configured with LANG=pt_BR.UTF-8
224
+ # smoonb will automatically use Portuguese
225
+ npx smoonb backup
226
+ ```
227
+
228
+ ### Important Notes
229
+
230
+ - **Machine outputs** (e.g., `--json` if implemented) are **not** translated; fields and keys remain in English
231
+ - If a translation key is missing in a language, the system automatically **falls back to English**
232
+ - Language is detected once at the start of execution and applied to all CLI messages
233
+
234
+ ## 🎯 Usage
157
235
 
158
- ### Backup Completo
236
+ ### Full Backup
159
237
 
160
238
  ```bash
161
239
  npx smoonb backup
162
240
  ```
163
241
 
164
- **Fluxo interativo do backup:**
165
-
166
- 1. **Validação Docker** - Verifica se o Docker está rodando
167
- 2. **Consentimento** - Pede permissão para ler/escrever `.env.local`
168
- 3. **Mapeamento de Variáveis** - Mapeia suas variáveis de ambiente (primeira vez)
169
- 4. **Backup do .env.local** - Cria backup automático antes de alterações
170
- 5. **Seleção de Componentes** - Pergunta quais componentes incluir:
171
- - ⚡ Edge Functions (explicação sobre reset de link e download)
172
- - 📦 Storage (explicação sobre metadados)
173
- - 🔐 Auth Settings (explicação sobre configurações)
174
- - 🔄 Realtime Settings (explicação sobre captura interativa de 7 parâmetros)
175
- - 🗑️ Opções de limpeza (functions, .temp, migrations após backup)
176
- 6. **Resumo de Configurações** - Mostra tudo que será feito
177
- 7. **Confirmação Final** - Confirma antes de iniciar
178
- 8. **Execução das Etapas:**
179
- - 📊 1/10 - Backup Database via `pg_dumpall` (Docker)
180
- - 📊 2/10 - Backup Database SQL separado (schema, data, roles)
181
- - 🔧 3/10 - Backup Database Extensions and Settings
182
- - 🔐 4/10 - Backup Auth Settings (se selecionado)
183
- - 🔄 5/10 - Backup Realtime Settings (se selecionado) - 7 parâmetros capturados interativamente
184
- - 📦 6/10 - Backup Storage (se selecionado)
185
- - 👥 7/10 - Backup Custom Roles
186
- - ⚡ 8/10 - Backup Edge Functions (se selecionado)
187
- - 📁 9/10 - Backup Supabase .temp (se selecionado)
188
- - 📋 10/10 - Backup Migrations (se selecionado)
189
-
190
- **Resultado:**
242
+ **Interactive backup flow:**
243
+
244
+ 1. **Docker Validation** - Verifies if Docker is running
245
+ 2. **Consent** - Asks permission to read/write `.env.local`
246
+ 3. **Variable Mapping** - Maps your environment variables (first time)
247
+ 4. **.env.local Backup** - Creates automatic backup before changes
248
+ 5. **Component Selection** - Asks which components to include:
249
+ - ⚡ Edge Functions (explanation about link reset and download)
250
+ - 📦 Storage (explanation about full backup: file download + ZIP in Dashboard format)
251
+ - 🔐 Auth Settings (explanation about configurations)
252
+ - 🔄 Realtime Settings (explanation about interactive capture of 7 parameters)
253
+ - 🗑️ Cleanup options (functions, .temp, migrations after backup)
254
+ 6. **Configuration Summary** - Shows everything that will be done
255
+ 7. **Final Confirmation** - Confirms before starting
256
+ 8. **Step Execution:**
257
+ - 📊 1/10 - Database Backup via `pg_dumpall` (Docker)
258
+ - 📊 2/10 - Separate Database SQL (schema, data, roles)
259
+ - 🔧 3/10 - Database Extensions and Settings Backup
260
+ - 🔐 4/10 - Auth Settings Backup (if selected)
261
+ - 🔄 5/10 - Realtime Settings Backup (if selected) - 7 parameters captured interactively
262
+ - 📦 6/10 - Storage Backup (if selected) - Full file download + ZIP in Dashboard format
263
+ - 👥 7/10 - Custom Roles Backup
264
+ - ⚡ 8/10 - Edge Functions Backup (if selected)
265
+ - 📁 9/10 - Supabase .temp Backup (if selected)
266
+ - 📋 10/10 - Migrations Backup (if selected)
267
+
268
+ **Result:**
191
269
  ```
192
270
  backups/backup-2025-10-31-09-37-54/
193
- ├── backup-manifest.json # Manifesto com metadados
194
- ├── db_cluster-31-10-2025@09-38-57.backup.gz # Backup completo (Dashboard compatible)
195
- ├── schema.sql # Schema do banco
196
- ├── data.sql # Dados
197
- ├── roles.sql # Roles do PostgreSQL
198
- ├── database-settings-*.json # Extensões e configurações
199
- ├── auth-settings.json # Configurações de Auth
200
- ├── realtime-settings.json # Configurações de Realtime
201
- ├── storage/ # Metadados de Storage
202
- ├── edge-functions/ # Edge Functions baixadas
203
- │ └── [nome-da-function]/
204
- ├── supabase-temp/ # Arquivos .temp do Supabase CLI
205
- ├── migrations/ # Todas as migrations
271
+ ├── backup-manifest.json # Manifest with metadata
272
+ ├── db_cluster-31-10-2025@09-38-57.backup.gz # Full backup (Dashboard compatible)
273
+ ├── schema.sql # Database schema
274
+ ├── data.sql # Data
275
+ ├── roles.sql # PostgreSQL roles
276
+ ├── database-settings-*.json # Extensions and settings
277
+ ├── auth-settings.json # Auth configurations
278
+ ├── realtime-settings.json # Realtime configurations
279
+ ├── storage/ # Storage metadata
280
+ │ └── [bucket-name].json # Metadata for each bucket
281
+ ├── [project-id].storage.zip # Full Storage backup (Dashboard format)
282
+ ├── storage_temp/ # Temporary structure (optional, can be removed)
283
+ │ └── [project-id]/ # Downloaded files structure
284
+ │ └── [bucket-name]/ # Files for each bucket
285
+ ├── edge-functions/ # Downloaded Edge Functions
286
+ │ └── [function-name]/
287
+ ├── supabase-temp/ # Supabase CLI .temp files
288
+ ├── migrations/ # All migrations
206
289
  └── env/
207
- ├── .env.local # Backup do .env.local
208
- └── env-map.json # Mapeamento de variáveis
290
+ ├── .env.local # .env.local backup
291
+ └── env-map.json # Variable mapping
209
292
  ```
210
293
 
211
- ### Restauração Interativa
294
+ ### Interactive Restoration
212
295
 
213
- **Restaurar backup existente:**
296
+ **Restore existing backup:**
214
297
  ```bash
215
298
  npx smoonb restore
216
299
  ```
217
300
 
218
- **Importar e restaurar diretamente do Dashboard:**
301
+ **Import and restore directly from Dashboard:**
219
302
  ```bash
220
- # Apenas database
303
+ # Database only
221
304
  npx smoonb restore --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz"
222
305
 
223
- # Database e storage juntos
224
- npx smoonb restore --file "backup.backup.gz" --storage "meu-projeto.storage.zip"
306
+ # Database and storage together
307
+ npx smoonb restore --file "backup.backup.gz" --storage "my-project.storage.zip"
225
308
  ```
226
309
 
227
- **Fluxo interativo do restore:**
228
-
229
- 1. **Validação Docker** - Verifica se o Docker está rodando
230
- 2. **Termo de Uso** - Exibe e solicita aceitação dos termos
231
- 3. **Consentimento** - Pede permissão para ler/escrever `.env.local`
232
- 4. **Mapeamento de Variáveis** - Mapeia variáveis para o projeto de destino
233
- 5. **Backup do .env.local** - Cria backup automático
234
- 6. **Seleção de Backup** - Lista e permite escolher qual backup restaurar (pula se `--file` fornecido)
235
- - Se `--file` for fornecido: importa automaticamente e auto-seleciona o backup
236
- - Se `--storage` for fornecido junto com `--file`: importa também o arquivo de storage
237
- 7. **Seleção de Componentes** - Pergunta quais componentes restaurar:
238
- - 📊 Database (sempre disponível)
239
- - ⚡ Edge Functions (se disponível no backup)
240
- - 🔐 Auth Settings (se disponível no backup)
241
- - 📦 Storage (se disponível no backup)
242
- - 🔧 Database Extensions and Settings (se disponível no backup)
243
- - 🔄 Realtime Settings (se disponível no backup)
244
- 8. **Resumo Detalhado** - Mostra backup selecionado, projeto destino e componentes
245
- 9. **Confirmação Final** - Confirma antes de iniciar
246
- 10. **Execução da Restauração:**
247
- - 📊 Database - Restaura via `psql` (suporta `.backup.gz` e `.backup`)
248
- - ⚡ Edge Functions - Copia e faz deploy no projeto destino
249
- - 🔐 Auth Settings - Exibe configurações para aplicação manual
250
- - 📦 Storage - Exibe informações para migração manual
251
- - 🔧 Database Settings - Restaura extensões e configurações via SQL
252
- - 🔄 Realtime Settings - Exibe configurações para aplicação manual
253
-
254
- **Formato de arquivos suportados:**
255
- - ✅ `.backup.gz` (compactado) - Descompacta automaticamente antes de restaurar
256
- - ✅ `.backup` (descompactado) - Restaura diretamente
257
-
258
- **Quando usar `--file`:**
259
- - Importa automaticamente o arquivo de backup antes de restaurar
260
- - Elimina a etapa de seleção de backup
261
- - Se `--storage` fornecido, importa também o arquivo de storage
262
- - Útil para restaurar backups baixados diretamente do Dashboard do Supabase
263
-
264
- ### Importar Backup do Dashboard do Supabase
265
-
266
- Se você baixou um backup diretamente do Dashboard do Supabase (formato `.backup.gz`), você pode importá-lo para o formato esperado pelo smoonb. O comando também suporta importar arquivos de storage (`.storage.zip`) opcionalmente.
267
-
268
- **Importar apenas database:**
310
+ **Interactive restore flow:**
311
+
312
+ 1. **Docker Validation** - Verifies if Docker is running
313
+ 2. **Terms of Use** - Displays and requests acceptance of terms
314
+ 3. **Consent** - Asks permission to read/write `.env.local`
315
+ 4. **Variable Mapping** - Maps variables to target project
316
+ 5. **.env.local Backup** - Creates automatic backup
317
+ 6. **Backup Selection** - Lists and allows choosing which backup to restore (skips if `--file` provided)
318
+ - If `--file` is provided: automatically imports and auto-selects the backup
319
+ - If `--storage` is provided along with `--file`: also imports the storage file
320
+ 7. **Component Selection** - Asks which components to restore:
321
+ - 📊 Database (always available)
322
+ - ⚡ Edge Functions (if available in backup)
323
+ - 🔐 Auth Settings (if available in backup)
324
+ - 📦 Storage (if available in backup)
325
+ - 🔧 Database Extensions and Settings (if available in backup)
326
+ - 🔄 Realtime Settings (if available in backup)
327
+ 8. **Detailed Summary** - Shows selected backup, target project and components
328
+ 9. **Final Confirmation** - Confirms before starting
329
+ 10. **Restore Execution:**
330
+ - 📊 Database - Restores via `psql` (supports `.backup.gz` and `.backup`)
331
+ - ⚡ Edge Functions - Copies and deploys to target project
332
+ - 🔐 Auth Settings - Displays configurations for manual application
333
+ - 📦 Storage - Restores buckets and files from ZIP (if available) or displays information for manual migration
334
+ - 🔧 Database Settings - Restores extensions and settings via SQL
335
+ - 🔄 Realtime Settings - Displays configurations for manual application
336
+
337
+ **Supported file formats:**
338
+ - ✅ `.backup.gz` (compressed) - Automatically decompresses before restoring
339
+ - ✅ `.backup` (uncompressed) - Restores directly
340
+
341
+ **When to use `--file`:**
342
+ - Automatically imports backup file before restoring
343
+ - Eliminates backup selection step
344
+ - If `--storage` provided, also imports storage file
345
+ - Useful for restoring backups downloaded directly from Supabase Dashboard
346
+
347
+ ### Import Backup from Supabase Dashboard
348
+
349
+ If you downloaded a backup directly from the Supabase Dashboard (`.backup.gz` format), you can import it to the format expected by smoonb. The command also supports optionally importing storage files (`.storage.zip`).
350
+
351
+ **Import database only:**
269
352
  ```bash
270
- npx smoonb import --file "caminho/completo/para/db_cluster-04-03-2024@14-16-59.backup.gz"
353
+ npx smoonb import --file "full/path/to/db_cluster-04-03-2024@14-16-59.backup.gz"
271
354
  ```
272
355
 
273
- **Importar database e storage juntos:**
356
+ **Import database and storage together:**
274
357
  ```bash
275
- npx smoonb import --file "backup.backup.gz" --storage "meu-projeto.storage.zip"
358
+ npx smoonb import --file "backup.backup.gz" --storage "my-project.storage.zip"
276
359
  ```
277
360
 
278
- **O que o comando faz:**
279
- 1. o arquivo `.backup.gz` do Dashboard (obrigatório)
280
- 2. Se fornecido, o arquivo `.storage.zip` do Dashboard (opcional)
281
- 3. Extrai informações do nome do arquivo de backup (data e hora)
282
- 4. Cria uma pasta de backup no formato esperado (`backup-YYYY-MM-DD-HH-MM-SS`)
283
- 5. Copia o arquivo de backup para a pasta criada
284
- 6. Se fornecido, copia o arquivo de storage para a mesma pasta
285
- 7. Deixa o backup pronto para ser encontrado pelo comando `restore`
361
+ **What the command does:**
362
+ 1. Reads the `.backup.gz` file from Dashboard (required)
363
+ 2. If provided, reads the `.storage.zip` file from Dashboard (optional)
364
+ 3. Extracts information from backup file name (date and time)
365
+ 4. Creates a backup folder in expected format (`backup-YYYY-MM-DD-HH-MM-SS`)
366
+ 5. Copies backup file to created folder
367
+ 6. If provided, copies storage file to same folder
368
+ 7. Makes backup ready to be found by `restore` command
286
369
 
287
- **Exemplo completo - Apenas database (usando import + restore):**
370
+ **Complete example - Database only (using import + restore):**
288
371
  ```bash
289
- # 1. Baixar backup do Dashboard do Supabase
290
- # Arquivo: db_cluster-04-03-2024@14-16-59.backup.gz
372
+ # 1. Download backup from Supabase Dashboard
373
+ # File: db_cluster-04-03-2024@14-16-59.backup.gz
291
374
 
292
- # 2. Importar o arquivo
375
+ # 2. Import the file
293
376
  npx smoonb import --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz"
294
377
 
295
- # 3. Restaurar o backup importado
378
+ # 3. Restore the imported backup
296
379
  npx smoonb restore
297
- # O backup importado aparecerá na lista de backups disponíveis
380
+ # The imported backup will appear in the list of available backups
298
381
  ```
299
382
 
300
- **Exemplo completo - Apenas database (usando restore diretamente):**
383
+ **Complete example - Database only (using restore directly):**
301
384
  ```bash
302
- # 1. Baixar backup do Dashboard do Supabase
303
- # Arquivo: db_cluster-04-03-2024@14-16-59.backup.gz
385
+ # 1. Download backup from Supabase Dashboard
386
+ # File: db_cluster-04-03-2024@14-16-59.backup.gz
304
387
 
305
- # 2. Importar e restaurar diretamente (pula seleção de backup)
388
+ # 2. Import and restore directly (skips backup selection)
306
389
  npx smoonb restore --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz"
307
390
  ```
308
391
 
309
- **Exemplo completo - Database e Storage (usando import + restore):**
392
+ **Complete example - Database and Storage (using import + restore):**
310
393
  ```bash
311
- # 1. Baixar backup e storage do Dashboard do Supabase
312
- # Arquivos:
394
+ # 1. Download backup and storage from Supabase Dashboard
395
+ # Files:
313
396
  # - db_cluster-04-03-2024@14-16-59.backup.gz
314
- # - meu-projeto.storage.zip
397
+ # - my-project.storage.zip
315
398
 
316
- # 2. Importar ambos os arquivos
317
- npx smoonb import --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz" --storage "C:\Downloads\meu-projeto.storage.zip"
399
+ # 2. Import both files
400
+ npx smoonb import --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz" --storage "C:\Downloads\my-project.storage.zip"
318
401
 
319
- # 3. Restaurar o backup importado
402
+ # 3. Restore the imported backup
320
403
  npx smoonb restore
321
- # O backup importado aparecerá na lista de backups disponíveis
404
+ # The imported backup will appear in the list of available backups
322
405
  ```
323
406
 
324
- **Exemplo completo - Database e Storage (usando restore diretamente):**
407
+ **Complete example - Database and Storage (using restore directly):**
325
408
  ```bash
326
- # 1. Baixar backup e storage do Dashboard do Supabase
327
- # Arquivos:
409
+ # 1. Download backup and storage from Supabase Dashboard
410
+ # Files:
328
411
  # - db_cluster-04-03-2024@14-16-59.backup.gz
329
- # - meu-projeto.storage.zip
412
+ # - my-project.storage.zip
330
413
 
331
- # 2. Importar e restaurar diretamente (pula seleção de backup)
332
- npx smoonb restore --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz" --storage "C:\Downloads\meu-projeto.storage.zip"
414
+ # 2. Import and restore directly (skips backup selection)
415
+ npx smoonb restore --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz" --storage "C:\Downloads\my-project.storage.zip"
333
416
  ```
334
417
 
335
- **Importante:**
336
- - O arquivo de backup é **obrigatório** e deve estar no formato do Dashboard: `db_cluster-DD-MM-YYYY@HH-MM-SS.backup.gz`
337
- - O arquivo de storage é **opcional** e deve estar no formato: `*.storage.zip`
338
- - O storage depende de um backup, mas o backup não depende do storage
339
- - Ambos os arquivos serão copiados para a mesma pasta de backup
340
- - O caminho pode ser absoluto ou relativo
341
- - O comando criará a estrutura de pastas necessária automaticamente
418
+ **Important:**
419
+ - Backup file is **required** and must be in Dashboard format: `db_cluster-DD-MM-YYYY@HH-MM-SS.backup.gz`
420
+ - Storage file is **optional** and must be in format: `*.storage.zip`
421
+ - Storage depends on a backup, but backup does not depend on storage
422
+ - Both files will be copied to the same backup folder
423
+ - Path can be absolute or relative
424
+ - Command will automatically create necessary folder structure
342
425
 
343
- **Diferença entre `import` e `restore --file`:**
344
- - `import`: Apenas importa o arquivo e cria a estrutura de backup. Você precisa executar `restore` depois.
345
- - `restore --file`: Importa o arquivo automaticamente e inicia o processo de restauração, pulando a etapa de seleção de backup.
426
+ **Difference between `import` and `restore --file`:**
427
+ - `import`: Only imports the file and creates backup structure. You need to run `restore` afterwards.
428
+ - `restore --file`: Automatically imports the file and starts the restoration process, skipping the backup selection step.
346
429
 
347
- ### Verificação Pós-Restore
430
+ ### Post-Restore Verification
348
431
 
349
432
  ```bash
350
433
  npx smoonb check
351
434
  ```
352
435
 
353
- **Verifica:**
354
- - ✅ Conexão com database
355
- - ✅ Extensões instaladas
356
- - ✅ Tabelas criadas
357
- - ✅ Políticas RLS
358
- - ✅ Publicações Realtime
359
- - ✅ Buckets de Storage
436
+ **Verifies:**
437
+ - ✅ Database connection
438
+ - ✅ Installed extensions
439
+ - ✅ Created tables
440
+ - ✅ RLS policies
441
+ - ✅ Realtime publications
442
+ - ✅ Storage buckets
360
443
 
361
444
 
362
- ## 🔧 Comandos Disponíveis
445
+ ## 🔧 Available Commands
363
446
 
364
- | Comando | Descrição |
365
- |---------|-----------|
366
- | `npx smoonb backup` | Backup completo interativo usando Docker |
367
- | `npx smoonb restore` | Restauração interativa usando psql (Docker) |
368
- | `npx smoonb restore --file <path> [--storage <path>]` | Importar e restaurar diretamente arquivo .backup.gz e opcionalmente .storage.zip do Dashboard |
369
- | `npx smoonb import --file <path> [--storage <path>]` | Importar arquivo .backup.gz e opcionalmente .storage.zip do Dashboard do Supabase |
370
- | `npx smoonb check` | Verificação de integridade pós-restore |
447
+ | Command | Description |
448
+ |---------|-------------|
449
+ | `npx smoonb backup` | Full interactive backup using Docker |
450
+ | `npx smoonb restore` | Interactive restoration using psql (Docker) |
451
+ | `npx smoonb restore --file <path> [--storage <path>]` | Import and restore directly .backup.gz file and optionally .storage.zip from Dashboard |
452
+ | `npx smoonb import --file <path> [--storage <path>]` | Import .backup.gz file and optionally .storage.zip from Supabase Dashboard |
453
+ | `npx smoonb check` | Post-restore integrity verification |
371
454
 
372
- ## 🏗️ Arquitetura Técnica
455
+ ## 🏗️ Technical Architecture
373
456
 
374
- ### Estrutura Modular
457
+ ### Modular Structure
375
458
 
376
- O código foi refatorado para uma **arquitetura modular** com etapas independentes:
459
+ The code has been refactored to a **modular architecture** with independent steps:
377
460
 
378
461
  #### Backup (`src/commands/backup/`)
379
462
  ```
@@ -414,28 +497,38 @@ restore/
414
497
  ### Backup Strategy
415
498
 
416
499
  #### Database
417
- - **Backup Principal**: `pg_dumpall` via Docker (idêntico ao Dashboard)
418
- - Arquivo: `db_cluster-XX-XX-XXXX@XX-XX-XX.backup.gz`
419
- - Compatível com restauração via Dashboard do Supabase
420
- - **Backup Separado**: SQL em arquivos distintos via Supabase CLI
421
- - `schema.sql` - Estrutura das tabelas
422
- - `data.sql` - Dados (COPY statements)
423
- - `roles.sql` - Roles e permissões
500
+ - **Main Backup**: `pg_dumpall` via Docker (identical to Dashboard)
501
+ - File: `db_cluster-XX-XX-XXXX@XX-XX-XX.backup.gz`
502
+ - Compatible with restoration via Supabase Dashboard
503
+ - **Separate Backup**: SQL in separate files via Supabase CLI
504
+ - `schema.sql` - Table structure
505
+ - `data.sql` - Data (COPY statements)
506
+ - `roles.sql` - Roles and permissions
424
507
 
425
508
  #### Edge Functions
426
- - **Download Automático**: Via Supabase CLI `supabase functions download`
427
- - **Reset de Link**: Garante link limpo com o projeto antes do download
428
- - **Backup Completo**: Código completo de cada function
509
+ - **Automatic Download**: Via Supabase CLI `supabase functions download`
510
+ - **Link Reset**: Ensures clean link with project before download
511
+ - **Complete Backup**: Full code of each function
429
512
 
430
513
  #### Migrations
431
- - **Download Automático**: Via `supabase migration fetch`
432
- - **Reset de Link**: Garante link limpo com o projeto
433
- - **Backup Completo**: Todas as migrations do servidor
434
-
435
- #### Auth, Storage, Realtime
436
- - **Management API**: Usa Personal Access Token
437
- - **JSON Export**: Configurações exportadas como JSON
438
- - **Realtime Settings**: Captura interativa de 7 parâmetros:
514
+ - **Automatic Download**: Via `supabase migration fetch`
515
+ - **Link Reset**: Ensures clean link with project
516
+ - **Complete Backup**: All server migrations
517
+
518
+ #### Storage
519
+ - **Complete Backup**: Download of all files from all buckets
520
+ - **Temporary Structure**: Creates `storage_temp/project-id/bucket-name/files...` inside backupDir
521
+ - **ZIP in Dashboard Format**: Creates `{project-id}.storage.zip` with structure `project-id/bucket-name/files...`
522
+ - **Restore Compatible**: Created ZIP is compatible with restore process (same format as Dashboard)
523
+ - **Interactive Question**: After creating ZIP, asks if you want to clean temporary structure
524
+ - **Fallback**: If Supabase credentials are not available, backs up metadata only
525
+ - **Management API**: Uses Personal Access Token to list buckets and objects
526
+ - **Supabase Client**: Uses Service Role Key for file downloads
527
+
528
+ #### Auth, Realtime
529
+ - **Management API**: Uses Personal Access Token
530
+ - **JSON Export**: Configurations exported as JSON
531
+ - **Realtime Settings**: Interactive capture of 7 parameters:
439
532
  1. Enable Realtime service
440
533
  2. Allow public access
441
534
  3. Database connection pool size
@@ -443,194 +536,195 @@ restore/
443
536
  5. Max events per second
444
537
  6. Max presence events per second
445
538
  7. Max payload size in KB
446
- - **Manual para alguns**: Alguns settings precisam ser aplicados manualmente por segurança
539
+ - **Manual for some**: Some settings need to be applied manually for security
447
540
 
448
541
  ### Restore Strategy
449
542
 
450
543
  #### Database
451
- - **Suporte a Formatos**:
452
- - `.backup.gz` - Descompacta automaticamente via Docker
453
- - `.backup` - Restaura diretamente via `psql` (Docker)
454
- - **Clean Restore**: Pode sobrescrever dados existentes (com confirmação)
544
+ - **Format Support**:
545
+ - `.backup.gz` - Automatically decompresses via Docker
546
+ - `.backup` - Restores directly via `psql` (Docker)
547
+ - **Clean Restore**: Can overwrite existing data (with confirmation)
455
548
 
456
549
  #### Edge Functions
457
- - **Clean Deploy**: Limpa `supabase/functions` antes do deploy
458
- - **Reset de Link**: Garante link correto com projeto destino
459
- - **Deploy Automático**: Usa `supabase functions deploy`
550
+ - **Clean Deploy**: Cleans `supabase/functions` before deploy
551
+ - **Link Reset**: Ensures correct link with target project
552
+ - **Automatic Deploy**: Uses `supabase functions deploy`
460
553
 
461
- #### Outros Componentes
462
- - **Database Settings**: Restaura via SQL
463
- - **Auth/Storage/Realtime**: Exibe informações para configuração manual no Dashboard
554
+ #### Other Components
555
+ - **Database Settings**: Restores via SQL
556
+ - **Storage**: Restores buckets and files from ZIP (if available) or displays information for manual configuration
557
+ - **Auth/Realtime**: Displays information for manual configuration in Dashboard
464
558
 
465
- ### Multiplataforma
559
+ ### Cross-Platform
466
560
 
467
- - **Windows/macOS/Linux**: Detecção automática de binários
468
- - **Cross-platform**: Usa `fs.promises.cp`, `path.join`, Docker
469
- - **Docker para Tudo**: Backup, restore e compressão via Docker (garante consistência)
561
+ - **Windows/macOS/Linux**: Automatic binary detection
562
+ - **Cross-platform**: Uses `fs.promises.cp`, `path.join`, Docker
563
+ - **Docker for Everything**: Backup, restore and compression via Docker (ensures consistency)
470
564
 
471
- ## 📊 Fluxo Recomendado
565
+ ## 📊 Recommended Flow
472
566
 
473
567
  ```bash
474
- # 1. Configurar .env.local (primeira vez)
475
- # Edite .env.local com suas credenciais do projeto origem
568
+ # 1. Configure .env.local (first time)
569
+ # Edit .env.local with your source project credentials
476
570
 
477
- # 2. Backup do projeto origem
571
+ # 2. Backup source project
478
572
  npx smoonb backup
479
- # - Mapeia variáveis interativamente (primeira vez)
480
- # - Seleciona componentes para backup
481
- # - Executa backup completo
573
+ # - Maps variables interactively (first time)
574
+ # - Selects components for backup
575
+ # - Executes full backup
482
576
 
483
- # 3. Criar novo projeto Supabase
484
- # (via Dashboard ou Supabase CLI)
577
+ # 3. Create new Supabase project
578
+ # (via Dashboard or Supabase CLI)
485
579
 
486
- # 4. Editar .env.local com credenciais do novo projeto
487
- # Atualize as variáveis para apontar ao projeto destino
580
+ # 4. Edit .env.local with new project credentials
581
+ # Update variables to point to target project
488
582
 
489
- # 5. Restaurar backup (modo interativo)
583
+ # 5. Restore backup (interactive mode)
490
584
  npx smoonb restore
491
- # - Seleciona backup desejado
492
- # - Seleciona componentes para restaurar
493
- # - Executa restauração
585
+ # - Selects desired backup
586
+ # - Selects components to restore
587
+ # - Executes restoration
494
588
 
495
- # 6. Verificar integridade
589
+ # 6. Verify integrity
496
590
  npx smoonb check
497
591
 
498
- # 7. Aplicar configurações manuais
592
+ # 7. Apply manual configurations (if necessary)
499
593
  # - Auth Settings: Dashboard → Authentication → Settings
500
- # - Storage: Dashboard → Storage → Buckets
501
594
  # - Realtime: Dashboard → Database → Replication
595
+ # Note: Storage is automatically restored from ZIP if available
502
596
  ```
503
597
 
504
- ## 🎨 Experiência do Usuário
598
+ ## 🎨 User Experience
505
599
 
506
- ### Interface em Português
600
+ ### Multi-Language Interface
507
601
 
508
- Todas as interações são em **Português do Brasil**:
509
- - Perguntas claras e diretas
510
- - Explicações antes de cada processo
511
- - Resumos detalhados antes de confirmar
512
- - Confirmações com `(S/n)` ou `(s/N)` em português
602
+ All interactions are **automatically translated** based on system locale or `--lang` flag:
603
+ - Clear and direct questions
604
+ - Explanations before each process
605
+ - Detailed summaries before confirming
606
+ - Confirmations with `(Y/n)` or `(y/N)` in English, `(S/n)` or `(s/N)` in Portuguese
513
607
 
514
- ### Mapeamento Inteligente de Variáveis
608
+ ### Intelligent Variable Mapping
515
609
 
516
- - **Detecção Automática**: Se a chave existe com o nome esperado, pula a seleção
517
- - **Opção de Adicionar**: Permite adicionar novas chaves se não existirem
518
- - **Validação de Valores**: Confirma valores antes de salvar
519
- - **Backup Automático**: Sempre cria backup do `.env.local` antes de alterações
610
+ - **Automatic Detection**: If key already exists with expected name, skips selection
611
+ - **Add Option**: Allows adding new keys if they don't exist
612
+ - **Value Validation**: Confirms values before saving
613
+ - **Automatic Backup**: Always creates backup of `.env.local` before changes
520
614
 
521
- ### Processo Guiado
615
+ ### Guided Process
522
616
 
523
- - **Validação Prévia**: Verifica Docker antes de começar
524
- - **Explicações Contextuais**: Explica cada processo antes de perguntar
525
- - **Resumo Final**: Mostra tudo que será feito antes de executar
526
- - **Feedback Visual**: Cores e ícones para melhor experiência
617
+ - **Prior Validation**: Verifies Docker before starting
618
+ - **Contextual Explanations**: Explains each process before asking
619
+ - **Final Summary**: Shows everything that will be done before executing
620
+ - **Visual Feedback**: Colors and icons for better experience
527
621
 
528
622
  ## 🐛 Troubleshooting
529
623
 
530
- ### Docker não encontrado ou não está rodando
624
+ ### Docker not found or not running
531
625
  ```bash
532
- # Verificar se Docker está instalado
626
+ # Verify if Docker is installed
533
627
  docker --version
534
628
 
535
- # Verificar se Docker Desktop está rodando
629
+ # Verify if Docker Desktop is running
536
630
  docker ps
537
631
 
538
- # Se não estiver, iniciar Docker Desktop
539
- # Windows/macOS: Abrir aplicativo Docker Desktop
632
+ # If not, start Docker Desktop
633
+ # Windows/macOS: Open Docker Desktop application
540
634
  # Linux: sudo systemctl start docker
541
635
  ```
542
636
 
543
- ### Supabase CLI não encontrado
637
+ ### Supabase CLI not found
544
638
  ```bash
545
639
  npm install -g supabase
546
640
  ```
547
641
 
548
- ### Personal Access Token inválido ou ausente
642
+ ### Invalid or missing Personal Access Token
549
643
 
550
- 1. Verificar se `SUPABASE_ACCESS_TOKEN` está no `.env.local`
551
- 2. Gerar novo token: https://supabase.com/dashboard/account/tokens
552
- 3. Atualizar `.env.local` com o novo token
644
+ 1. Verify if `SUPABASE_ACCESS_TOKEN` is in `.env.local`
645
+ 2. Generate new token: https://supabase.com/dashboard/account/tokens
646
+ 3. Update `.env.local` with new token
553
647
 
554
- ### Database URL incorreta
555
- - Verificar senha na URL de conexão
556
- - Usar Connection string do Dashboard Supabase (Settings → Database)
557
- - Testar conexão: `psql "sua-database-url" -c "SELECT 1"`
648
+ ### Incorrect Database URL
649
+ - Verify password in connection URL
650
+ - Use Connection string from Supabase Dashboard (Settings → Database)
651
+ - Test connection: `psql "your-database-url" -c "SELECT 1"`
558
652
 
559
- ### Arquivo .backup.gz não pode ser restaurado
653
+ ### .backup.gz file cannot be restored
560
654
 
561
- O smoonb suporta automaticamente:
562
- - ✅ `.backup.gz` - Descompacta via Docker antes de restaurar
563
- - ✅ `.backup` - Restaura diretamente
655
+ smoonb automatically supports:
656
+ - ✅ `.backup.gz` - Decompresses via Docker before restoring
657
+ - ✅ `.backup` - Restores directly
564
658
 
565
- Se houver problemas:
566
- 1. Verificar se Docker está rodando
567
- 2. Verificar permissões do arquivo
568
- 3. Verificar espaço em disco
659
+ If there are problems:
660
+ 1. Verify if Docker is running
661
+ 2. Verify file permissions
662
+ 3. Verify disk space
569
663
 
570
- ### Erro ao baixar Edge Functions
664
+ ### Error downloading Edge Functions
571
665
 
572
- 1. Verificar se `SUPABASE_ACCESS_TOKEN` está configurado
573
- 2. Verificar se o projeto está linkado: `supabase link`
574
- 3. Verificar se as functions existem no servidor
666
+ 1. Verify if `SUPABASE_ACCESS_TOKEN` is configured
667
+ 2. Verify if project is linked: `supabase link`
668
+ 3. Verify if functions exist on server
575
669
 
576
- ### Erro ao baixar Migrations
670
+ ### Error downloading Migrations
577
671
 
578
- 1. Verificar se `SUPABASE_ACCESS_TOKEN` está configurado
579
- 2. Verificar se o projeto está linkado: `supabase link`
580
- 3. Verificar se migrations no servidor
672
+ 1. Verify if `SUPABASE_ACCESS_TOKEN` is configured
673
+ 2. Verify if project is linked: `supabase link`
674
+ 3. Verify if there are migrations on server
581
675
 
582
- ## 🔒 Segurança
676
+ ## 🔒 Security
583
677
 
584
- - **Backup Automático**: Sempre cria backup do `.env.local` antes de alterações
585
- - **Mapeamento Local**: Mapeamento de variáveis salvo apenas localmente
586
- - **Sem Dados Sensíveis**: Nenhum dado sensível é enviado para fora do seu ambiente
587
- - **Docker Isolado**: Operações de database via Docker (isolamento)
678
+ - **Automatic Backup**: Always creates backup of `.env.local` before changes
679
+ - **Local Mapping**: Variable mapping saved only locally
680
+ - **No Sensitive Data**: No sensitive data is sent outside your environment
681
+ - **Isolated Docker**: Database operations via Docker (isolation)
588
682
 
589
- ## 💼 Modelo de Acesso e Assinatura
683
+ ## 💼 Access Model and Subscription
590
684
 
591
- O código do Supa Moonbase é disponibilizado sob licença MIT (ver `LICENSE`). Em fase futura, a execução do CLI será vinculada a uma assinatura por conta, permitindo uso associado a uma conta válida. A validação de conta ocorrerá antes de qualquer operação sensível (ex.: backup e restore).
685
+ Supa Moonbase code is provided under MIT license (see `LICENSE`). In a future phase, CLI execution will be linked to a per-account subscription, allowing use associated with a valid account. Account validation will occur before any sensitive operations (e.g., backup and restore).
592
686
 
593
- Até que a validação esteja ativa, a ferramenta pode ser utilizada sem login.
687
+ Until validation is active, the tool can be used without login.
594
688
 
595
- Saiba mais em [Pricing](https://smoonb.com/pricing) e [FAQ Comercial](https://smoonb.com/faq).
689
+ Learn more at [Pricing](https://smoonb.com/pricing) and [Commercial FAQ](https://smoonb.com/faq).
596
690
 
597
- ## 🎁 Grandfathering (conceito)
691
+ ## 🎁 Grandfathering (concept)
598
692
 
599
- Contas criadas durante o período inicial de disponibilização comercial poderão manter condições de acesso diferenciadas enquanto permanecerem ativas. O objetivo é reconhecer os primeiros usuários. Detalhes específicos constarão nos [Termos de Serviço](https://smoonb.com/terms) e no [Pricing](https://smoonb.com/pricing).
693
+ Accounts created during the initial commercial availability period may maintain differentiated access conditions while they remain active. The goal is to recognize early users. Specific details will be in the [Terms of Service](https://smoonb.com/terms) and [Pricing](https://smoonb.com/pricing).
600
694
 
601
- ## 🔒 Privacidade e LGPD (resumo)
695
+ ## 🔒 Privacy and LGPD (summary)
602
696
 
603
- O Supa Moonbase adota o princípio de minimização de dados. Quando a validação de conta estiver ativa, trataremos apenas informações estritamente necessárias para controle de acesso e faturamento (por exemplo, identificador de conta e contato). Os propósitos, bases legais e direitos do titular serão descritos na [Política de Privacidade](https://smoonb.com/privacy).
697
+ Supa Moonbase adopts the data minimization principle. When account validation is active, we will only process information strictly necessary for access control and billing (e.g., account identifier and contact). Purposes, legal bases and data subject rights will be described in the [Privacy Policy](https://smoonb.com/privacy).
604
698
 
605
- ## 📋 Termos de Serviço e Uso de Marca
699
+ ## 📋 Terms of Service and Brand Usage
606
700
 
607
- A licença de código (MIT) não substitui os Termos de Serviço que regerão o acesso operacional por conta e a validação de assinatura.
701
+ The code license (MIT) does not replace the Terms of Service that will govern per-account operational access and subscription validation.
608
702
 
609
- "Supa Moonbase" e elementos de identidade visual são marcas da Goalmoon Tecnologia Ltda.; o uso de marca e assets de branding é restrito, conforme os [Termos de Serviço](https://smoonb.com/terms).
703
+ "Supa Moonbase" and visual identity elements are trademarks of Goalmoon Tecnologia Ltda.; brand and branding assets usage is restricted, as per [Terms of Service](https://smoonb.com/terms).
610
704
 
611
- ## ❓ FAQ Comercial
705
+ ## ❓ Commercial FAQ
612
706
 
613
- **Por que assinatura se o código é MIT?**
707
+ **Why subscription if the code is MIT?**
614
708
 
615
- > O código permanece aberto para auditoria e contribuições. O acesso operacional será condicionado à validação de conta, conforme Termos de Serviço.
709
+ > The code remains open for audit and contributions. Operational access will be conditioned to account validation, as per Terms of Service.
616
710
 
617
- **O que significa grandfathering?**
711
+ **What does grandfathering mean?**
618
712
 
619
- > Contas do período inicial poderão manter condições diferenciadas enquanto ativas; detalhes estarão nos Termos.
713
+ > Accounts from the initial period may maintain differentiated conditions while active; details will be in the Terms.
620
714
 
621
715
 
622
716
 
623
- ## 📝 Licença
717
+ ## 📝 License
624
718
 
625
- O código do Supa Moonbase é disponibilizado sob licença MIT. Veja [LICENSE](LICENSE) para o texto completo da licença.
719
+ Supa Moonbase code is provided under MIT license. See [LICENSE](LICENSE) for the full license text. A Portuguese translation is available in [LICENSE.pt-BR.md](LICENSE.pt-BR.md) for convenience only.
626
720
 
627
- ## 🤝 Contribuição
721
+ ## 🤝 Contributing
628
722
 
629
- Contribuições são bem-vindas! Este é um projeto experimental e precisamos de feedback da comunidade.
723
+ Contributions are welcome! This is an experimental project and we need community feedback.
630
724
 
631
725
 
632
726
  ---
633
727
 
634
- **Desenvolvido por:** Goalmoon Tecnologia LTDA
728
+ **Developed by:** Goalmoon Tecnologia LTDA
635
729
  **Website:** https://smoonb.com
636
730
  **GitHub:** https://github.com/almmello/smoonb