You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Logging is initialized lazily on first use (when the crate is loaded in-process or when `gaggle::init_logging()` is called). The environment variable is read once per process.
138
+
- Logs include a level prefix and optional ANSI colors if stderr is a terminal.
139
+
140
+
#### Offline Mode
141
+
142
+
- **GAGGLE_OFFLINE**
143
+
- **Description**: Disable network access. When enabled, operations that require network will fail fast unless data is already cached.
144
+
- **Type**: Boolean (`1`, `true`, `yes`, `on` to enable)
145
+
- **Default**: `false`
146
+
- **Effects**:
147
+
- gaggle_download(...) fails if the dataset isn’t cached.
148
+
- Version checks use cached `.downloaded` metadata when available; otherwise return"unknown".
149
+
- Search and metadata calls will still attempt network; consider avoiding them in offline mode.
150
+
- **Example**:
151
+
```bash
152
+
export GAGGLE_OFFLINE=1
153
+
```
154
+
121
155
### Usage Examples
122
156
123
157
#### Example 1: Custom Cache Directory
@@ -189,6 +223,19 @@ export GAGGLE_HTTP_RETRY_MAX_DELAY_MS=60000 ## Cap at 60s
189
223
./build/release/duckdb
190
224
```
191
225
226
+
#### Example 6: Offline Mode
227
+
228
+
```bash
229
+
# Enable offline mode
230
+
export GAGGLE_OFFLINE=1
231
+
232
+
# Attempt to download a dataset (will fail if not cached)
233
+
gaggle download username/dataset-name
234
+
235
+
# Querying metadata or searching will still attempt network access
0 commit comments