smoonb 0.0.71 → 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,21 +2,23 @@
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)
@@ -28,357 +30,433 @@ O smoonb faz backup completo de todos os componentes do seu projeto Supabase:
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 backup completo: download de arquivos + ZIP no padrão do Dashboard)
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) - Download completo de arquivos + ZIP no padrão do Dashboard
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
- │ └── [bucket-name].json # Metadados de cada bucket
203
- ├── [project-id].storage.zip # Backup completo de Storage (padrão Dashboard)
204
- ├── storage_temp/ # Estrutura temporária (opcional, pode ser removida)
205
- │ └── [project-id]/ # Estrutura de arquivos baixados
206
- │ └── [bucket-name]/ # Arquivos de cada bucket
207
- ├── edge-functions/ # Edge Functions baixadas
208
- │ └── [nome-da-function]/
209
- ├── supabase-temp/ # Arquivos .temp do Supabase CLI
210
- ├── 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
211
289
  └── env/
212
- ├── .env.local # Backup do .env.local
213
- └── env-map.json # Mapeamento de variáveis
290
+ ├── .env.local # .env.local backup
291
+ └── env-map.json # Variable mapping
214
292
  ```
215
293
 
216
- ### Restauração Interativa
294
+ ### Interactive Restoration
217
295
 
218
- **Restaurar backup existente:**
296
+ **Restore existing backup:**
219
297
  ```bash
220
298
  npx smoonb restore
221
299
  ```
222
300
 
223
- **Importar e restaurar diretamente do Dashboard:**
301
+ **Import and restore directly from Dashboard:**
224
302
  ```bash
225
- # Apenas database
303
+ # Database only
226
304
  npx smoonb restore --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz"
227
305
 
228
- # Database e storage juntos
229
- 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"
230
308
  ```
231
309
 
232
- **Fluxo interativo do restore:**
233
-
234
- 1. **Validação Docker** - Verifica se o Docker está rodando
235
- 2. **Termo de Uso** - Exibe e solicita aceitação dos termos
236
- 3. **Consentimento** - Pede permissão para ler/escrever `.env.local`
237
- 4. **Mapeamento de Variáveis** - Mapeia variáveis para o projeto de destino
238
- 5. **Backup do .env.local** - Cria backup automático
239
- 6. **Seleção de Backup** - Lista e permite escolher qual backup restaurar (pula se `--file` fornecido)
240
- - Se `--file` for fornecido: importa automaticamente e auto-seleciona o backup
241
- - Se `--storage` for fornecido junto com `--file`: importa também o arquivo de storage
242
- 7. **Seleção de Componentes** - Pergunta quais componentes restaurar:
243
- - 📊 Database (sempre disponível)
244
- - ⚡ Edge Functions (se disponível no backup)
245
- - 🔐 Auth Settings (se disponível no backup)
246
- - 📦 Storage (se disponível no backup)
247
- - 🔧 Database Extensions and Settings (se disponível no backup)
248
- - 🔄 Realtime Settings (se disponível no backup)
249
- 8. **Resumo Detalhado** - Mostra backup selecionado, projeto destino e componentes
250
- 9. **Confirmação Final** - Confirma antes de iniciar
251
- 10. **Execução da Restauração:**
252
- - 📊 Database - Restaura via `psql` (suporta `.backup.gz` e `.backup`)
253
- - ⚡ Edge Functions - Copia e faz deploy no projeto destino
254
- - 🔐 Auth Settings - Exibe configurações para aplicação manual
255
- - 📦 Storage - Restaura buckets e arquivos do ZIP (se disponível) ou exibe informações para migração manual
256
- - 🔧 Database Settings - Restaura extensões e configurações via SQL
257
- - 🔄 Realtime Settings - Exibe configurações para aplicação manual
258
-
259
- **Formato de arquivos suportados:**
260
- - ✅ `.backup.gz` (compactado) - Descompacta automaticamente antes de restaurar
261
- - ✅ `.backup` (descompactado) - Restaura diretamente
262
-
263
- **Quando usar `--file`:**
264
- - Importa automaticamente o arquivo de backup antes de restaurar
265
- - Elimina a etapa de seleção de backup
266
- - Se `--storage` fornecido, importa também o arquivo de storage
267
- - Útil para restaurar backups baixados diretamente do Dashboard do Supabase
268
-
269
- ### Importar Backup do Dashboard do Supabase
270
-
271
- 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.
272
-
273
- **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:**
274
352
  ```bash
275
- 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"
276
354
  ```
277
355
 
278
- **Importar database e storage juntos:**
356
+ **Import database and storage together:**
279
357
  ```bash
280
- 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"
281
359
  ```
282
360
 
283
- **O que o comando faz:**
284
- 1. o arquivo `.backup.gz` do Dashboard (obrigatório)
285
- 2. Se fornecido, o arquivo `.storage.zip` do Dashboard (opcional)
286
- 3. Extrai informações do nome do arquivo de backup (data e hora)
287
- 4. Cria uma pasta de backup no formato esperado (`backup-YYYY-MM-DD-HH-MM-SS`)
288
- 5. Copia o arquivo de backup para a pasta criada
289
- 6. Se fornecido, copia o arquivo de storage para a mesma pasta
290
- 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
291
369
 
292
- **Exemplo completo - Apenas database (usando import + restore):**
370
+ **Complete example - Database only (using import + restore):**
293
371
  ```bash
294
- # 1. Baixar backup do Dashboard do Supabase
295
- # 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
296
374
 
297
- # 2. Importar o arquivo
375
+ # 2. Import the file
298
376
  npx smoonb import --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz"
299
377
 
300
- # 3. Restaurar o backup importado
378
+ # 3. Restore the imported backup
301
379
  npx smoonb restore
302
- # O backup importado aparecerá na lista de backups disponíveis
380
+ # The imported backup will appear in the list of available backups
303
381
  ```
304
382
 
305
- **Exemplo completo - Apenas database (usando restore diretamente):**
383
+ **Complete example - Database only (using restore directly):**
306
384
  ```bash
307
- # 1. Baixar backup do Dashboard do Supabase
308
- # 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
309
387
 
310
- # 2. Importar e restaurar diretamente (pula seleção de backup)
388
+ # 2. Import and restore directly (skips backup selection)
311
389
  npx smoonb restore --file "C:\Downloads\db_cluster-04-03-2024@14-16-59.backup.gz"
312
390
  ```
313
391
 
314
- **Exemplo completo - Database e Storage (usando import + restore):**
392
+ **Complete example - Database and Storage (using import + restore):**
315
393
  ```bash
316
- # 1. Baixar backup e storage do Dashboard do Supabase
317
- # Arquivos:
394
+ # 1. Download backup and storage from Supabase Dashboard
395
+ # Files:
318
396
  # - db_cluster-04-03-2024@14-16-59.backup.gz
319
- # - meu-projeto.storage.zip
397
+ # - my-project.storage.zip
320
398
 
321
- # 2. Importar ambos os arquivos
322
- 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"
323
401
 
324
- # 3. Restaurar o backup importado
402
+ # 3. Restore the imported backup
325
403
  npx smoonb restore
326
- # O backup importado aparecerá na lista de backups disponíveis
404
+ # The imported backup will appear in the list of available backups
327
405
  ```
328
406
 
329
- **Exemplo completo - Database e Storage (usando restore diretamente):**
407
+ **Complete example - Database and Storage (using restore directly):**
330
408
  ```bash
331
- # 1. Baixar backup e storage do Dashboard do Supabase
332
- # Arquivos:
409
+ # 1. Download backup and storage from Supabase Dashboard
410
+ # Files:
333
411
  # - db_cluster-04-03-2024@14-16-59.backup.gz
334
- # - meu-projeto.storage.zip
412
+ # - my-project.storage.zip
335
413
 
336
- # 2. Importar e restaurar diretamente (pula seleção de backup)
337
- 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"
338
416
  ```
339
417
 
340
- **Importante:**
341
- - O arquivo de backup é **obrigatório** e deve estar no formato do Dashboard: `db_cluster-DD-MM-YYYY@HH-MM-SS.backup.gz`
342
- - O arquivo de storage é **opcional** e deve estar no formato: `*.storage.zip`
343
- - O storage depende de um backup, mas o backup não depende do storage
344
- - Ambos os arquivos serão copiados para a mesma pasta de backup
345
- - O caminho pode ser absoluto ou relativo
346
- - 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
347
425
 
348
- **Diferença entre `import` e `restore --file`:**
349
- - `import`: Apenas importa o arquivo e cria a estrutura de backup. Você precisa executar `restore` depois.
350
- - `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.
351
429
 
352
- ### Verificação Pós-Restore
430
+ ### Post-Restore Verification
353
431
 
354
432
  ```bash
355
433
  npx smoonb check
356
434
  ```
357
435
 
358
- **Verifica:**
359
- - ✅ Conexão com database
360
- - ✅ Extensões instaladas
361
- - ✅ Tabelas criadas
362
- - ✅ Políticas RLS
363
- - ✅ Publicações Realtime
364
- - ✅ Buckets de Storage
436
+ **Verifies:**
437
+ - ✅ Database connection
438
+ - ✅ Installed extensions
439
+ - ✅ Created tables
440
+ - ✅ RLS policies
441
+ - ✅ Realtime publications
442
+ - ✅ Storage buckets
365
443
 
366
444
 
367
- ## 🔧 Comandos Disponíveis
445
+ ## 🔧 Available Commands
368
446
 
369
- | Comando | Descrição |
370
- |---------|-----------|
371
- | `npx smoonb backup` | Backup completo interativo usando Docker |
372
- | `npx smoonb restore` | Restauração interativa usando psql (Docker) |
373
- | `npx smoonb restore --file <path> [--storage <path>]` | Importar e restaurar diretamente arquivo .backup.gz e opcionalmente .storage.zip do Dashboard |
374
- | `npx smoonb import --file <path> [--storage <path>]` | Importar arquivo .backup.gz e opcionalmente .storage.zip do Dashboard do Supabase |
375
- | `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 |
376
454
 
377
- ## 🏗️ Arquitetura Técnica
455
+ ## 🏗️ Technical Architecture
378
456
 
379
- ### Estrutura Modular
457
+ ### Modular Structure
380
458
 
381
- 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:
382
460
 
383
461
  #### Backup (`src/commands/backup/`)
384
462
  ```
@@ -419,38 +497,38 @@ restore/
419
497
  ### Backup Strategy
420
498
 
421
499
  #### Database
422
- - **Backup Principal**: `pg_dumpall` via Docker (idêntico ao Dashboard)
423
- - Arquivo: `db_cluster-XX-XX-XXXX@XX-XX-XX.backup.gz`
424
- - Compatível com restauração via Dashboard do Supabase
425
- - **Backup Separado**: SQL em arquivos distintos via Supabase CLI
426
- - `schema.sql` - Estrutura das tabelas
427
- - `data.sql` - Dados (COPY statements)
428
- - `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
429
507
 
430
508
  #### Edge Functions
431
- - **Download Automático**: Via Supabase CLI `supabase functions download`
432
- - **Reset de Link**: Garante link limpo com o projeto antes do download
433
- - **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
434
512
 
435
513
  #### Migrations
436
- - **Download Automático**: Via `supabase migration fetch`
437
- - **Reset de Link**: Garante link limpo com o projeto
438
- - **Backup Completo**: Todas as migrations do servidor
514
+ - **Automatic Download**: Via `supabase migration fetch`
515
+ - **Link Reset**: Ensures clean link with project
516
+ - **Complete Backup**: All server migrations
439
517
 
440
518
  #### Storage
441
- - **Backup Completo**: Download de todos os arquivos de todos os buckets
442
- - **Estrutura Temporária**: Cria `storage_temp/project-id/bucket-name/arquivos...` dentro do backupDir
443
- - **ZIP no Padrão Dashboard**: Cria `{project-id}.storage.zip` com estrutura `project-id/bucket-name/arquivos...`
444
- - **Compatível com Restore**: O ZIP criado é compatível com o processo de restore (mesmo formato do Dashboard)
445
- - **Pergunta Interativa**: Após criar o ZIP, pergunta se deseja limpar a estrutura temporária
446
- - **Fallback**: Se não houver credenciais do Supabase, faz backup apenas de metadados
447
- - **Management API**: Usa Personal Access Token para listar buckets e objetos
448
- - **Supabase Client**: Usa Service Role Key para download de arquivos
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
449
527
 
450
528
  #### Auth, Realtime
451
- - **Management API**: Usa Personal Access Token
452
- - **JSON Export**: Configurações exportadas como JSON
453
- - **Realtime Settings**: Captura interativa de 7 parâmetros:
529
+ - **Management API**: Uses Personal Access Token
530
+ - **JSON Export**: Configurations exported as JSON
531
+ - **Realtime Settings**: Interactive capture of 7 parameters:
454
532
  1. Enable Realtime service
455
533
  2. Allow public access
456
534
  3. Database connection pool size
@@ -458,195 +536,195 @@ restore/
458
536
  5. Max events per second
459
537
  6. Max presence events per second
460
538
  7. Max payload size in KB
461
- - **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
462
540
 
463
541
  ### Restore Strategy
464
542
 
465
543
  #### Database
466
- - **Suporte a Formatos**:
467
- - `.backup.gz` - Descompacta automaticamente via Docker
468
- - `.backup` - Restaura diretamente via `psql` (Docker)
469
- - **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)
470
548
 
471
549
  #### Edge Functions
472
- - **Clean Deploy**: Limpa `supabase/functions` antes do deploy
473
- - **Reset de Link**: Garante link correto com projeto destino
474
- - **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`
475
553
 
476
- #### Outros Componentes
477
- - **Database Settings**: Restaura via SQL
478
- - **Storage**: Restaura buckets e arquivos do ZIP (se disponível) ou exibe informações para configuração manual
479
- - **Auth/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
480
558
 
481
- ### Multiplataforma
559
+ ### Cross-Platform
482
560
 
483
- - **Windows/macOS/Linux**: Detecção automática de binários
484
- - **Cross-platform**: Usa `fs.promises.cp`, `path.join`, Docker
485
- - **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)
486
564
 
487
- ## 📊 Fluxo Recomendado
565
+ ## 📊 Recommended Flow
488
566
 
489
567
  ```bash
490
- # 1. Configurar .env.local (primeira vez)
491
- # 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
492
570
 
493
- # 2. Backup do projeto origem
571
+ # 2. Backup source project
494
572
  npx smoonb backup
495
- # - Mapeia variáveis interativamente (primeira vez)
496
- # - Seleciona componentes para backup
497
- # - Executa backup completo
573
+ # - Maps variables interactively (first time)
574
+ # - Selects components for backup
575
+ # - Executes full backup
498
576
 
499
- # 3. Criar novo projeto Supabase
500
- # (via Dashboard ou Supabase CLI)
577
+ # 3. Create new Supabase project
578
+ # (via Dashboard or Supabase CLI)
501
579
 
502
- # 4. Editar .env.local com credenciais do novo projeto
503
- # 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
504
582
 
505
- # 5. Restaurar backup (modo interativo)
583
+ # 5. Restore backup (interactive mode)
506
584
  npx smoonb restore
507
- # - Seleciona backup desejado
508
- # - Seleciona componentes para restaurar
509
- # - Executa restauração
585
+ # - Selects desired backup
586
+ # - Selects components to restore
587
+ # - Executes restoration
510
588
 
511
- # 6. Verificar integridade
589
+ # 6. Verify integrity
512
590
  npx smoonb check
513
591
 
514
- # 7. Aplicar configurações manuais (se necessário)
592
+ # 7. Apply manual configurations (if necessary)
515
593
  # - Auth Settings: Dashboard → Authentication → Settings
516
594
  # - Realtime: Dashboard → Database → Replication
517
- # Nota: Storage é restaurado automaticamente do ZIP se disponível
595
+ # Note: Storage is automatically restored from ZIP if available
518
596
  ```
519
597
 
520
- ## 🎨 Experiência do Usuário
598
+ ## 🎨 User Experience
521
599
 
522
- ### Interface em Português
600
+ ### Multi-Language Interface
523
601
 
524
- Todas as interações são em **Português do Brasil**:
525
- - Perguntas claras e diretas
526
- - Explicações antes de cada processo
527
- - Resumos detalhados antes de confirmar
528
- - 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
529
607
 
530
- ### Mapeamento Inteligente de Variáveis
608
+ ### Intelligent Variable Mapping
531
609
 
532
- - **Detecção Automática**: Se a chave existe com o nome esperado, pula a seleção
533
- - **Opção de Adicionar**: Permite adicionar novas chaves se não existirem
534
- - **Validação de Valores**: Confirma valores antes de salvar
535
- - **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
536
614
 
537
- ### Processo Guiado
615
+ ### Guided Process
538
616
 
539
- - **Validação Prévia**: Verifica Docker antes de começar
540
- - **Explicações Contextuais**: Explica cada processo antes de perguntar
541
- - **Resumo Final**: Mostra tudo que será feito antes de executar
542
- - **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
543
621
 
544
622
  ## 🐛 Troubleshooting
545
623
 
546
- ### Docker não encontrado ou não está rodando
624
+ ### Docker not found or not running
547
625
  ```bash
548
- # Verificar se Docker está instalado
626
+ # Verify if Docker is installed
549
627
  docker --version
550
628
 
551
- # Verificar se Docker Desktop está rodando
629
+ # Verify if Docker Desktop is running
552
630
  docker ps
553
631
 
554
- # Se não estiver, iniciar Docker Desktop
555
- # Windows/macOS: Abrir aplicativo Docker Desktop
632
+ # If not, start Docker Desktop
633
+ # Windows/macOS: Open Docker Desktop application
556
634
  # Linux: sudo systemctl start docker
557
635
  ```
558
636
 
559
- ### Supabase CLI não encontrado
637
+ ### Supabase CLI not found
560
638
  ```bash
561
639
  npm install -g supabase
562
640
  ```
563
641
 
564
- ### Personal Access Token inválido ou ausente
642
+ ### Invalid or missing Personal Access Token
565
643
 
566
- 1. Verificar se `SUPABASE_ACCESS_TOKEN` está no `.env.local`
567
- 2. Gerar novo token: https://supabase.com/dashboard/account/tokens
568
- 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
569
647
 
570
- ### Database URL incorreta
571
- - Verificar senha na URL de conexão
572
- - Usar Connection string do Dashboard Supabase (Settings → Database)
573
- - 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"`
574
652
 
575
- ### Arquivo .backup.gz não pode ser restaurado
653
+ ### .backup.gz file cannot be restored
576
654
 
577
- O smoonb suporta automaticamente:
578
- - ✅ `.backup.gz` - Descompacta via Docker antes de restaurar
579
- - ✅ `.backup` - Restaura diretamente
655
+ smoonb automatically supports:
656
+ - ✅ `.backup.gz` - Decompresses via Docker before restoring
657
+ - ✅ `.backup` - Restores directly
580
658
 
581
- Se houver problemas:
582
- 1. Verificar se Docker está rodando
583
- 2. Verificar permissões do arquivo
584
- 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
585
663
 
586
- ### Erro ao baixar Edge Functions
664
+ ### Error downloading Edge Functions
587
665
 
588
- 1. Verificar se `SUPABASE_ACCESS_TOKEN` está configurado
589
- 2. Verificar se o projeto está linkado: `supabase link`
590
- 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
591
669
 
592
- ### Erro ao baixar Migrations
670
+ ### Error downloading Migrations
593
671
 
594
- 1. Verificar se `SUPABASE_ACCESS_TOKEN` está configurado
595
- 2. Verificar se o projeto está linkado: `supabase link`
596
- 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
597
675
 
598
- ## 🔒 Segurança
676
+ ## 🔒 Security
599
677
 
600
- - **Backup Automático**: Sempre cria backup do `.env.local` antes de alterações
601
- - **Mapeamento Local**: Mapeamento de variáveis salvo apenas localmente
602
- - **Sem Dados Sensíveis**: Nenhum dado sensível é enviado para fora do seu ambiente
603
- - **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)
604
682
 
605
- ## 💼 Modelo de Acesso e Assinatura
683
+ ## 💼 Access Model and Subscription
606
684
 
607
- 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).
608
686
 
609
- 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.
610
688
 
611
- 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).
612
690
 
613
- ## 🎁 Grandfathering (conceito)
691
+ ## 🎁 Grandfathering (concept)
614
692
 
615
- 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).
616
694
 
617
- ## 🔒 Privacidade e LGPD (resumo)
695
+ ## 🔒 Privacy and LGPD (summary)
618
696
 
619
- 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).
620
698
 
621
- ## 📋 Termos de Serviço e Uso de Marca
699
+ ## 📋 Terms of Service and Brand Usage
622
700
 
623
- 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.
624
702
 
625
- "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).
626
704
 
627
- ## ❓ FAQ Comercial
705
+ ## ❓ Commercial FAQ
628
706
 
629
- **Por que assinatura se o código é MIT?**
707
+ **Why subscription if the code is MIT?**
630
708
 
631
- > 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.
632
710
 
633
- **O que significa grandfathering?**
711
+ **What does grandfathering mean?**
634
712
 
635
- > 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.
636
714
 
637
715
 
638
716
 
639
- ## 📝 Licença
717
+ ## 📝 License
640
718
 
641
- 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.
642
720
 
643
- ## 🤝 Contribuição
721
+ ## 🤝 Contributing
644
722
 
645
- 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.
646
724
 
647
725
 
648
726
  ---
649
727
 
650
- **Desenvolvido por:** Goalmoon Tecnologia LTDA
728
+ **Developed by:** Goalmoon Tecnologia LTDA
651
729
  **Website:** https://smoonb.com
652
730
  **GitHub:** https://github.com/almmello/smoonb