File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,14 @@ Four ways to provide it (checked in order):
79793 . ** Config file** : ` ~/.scrapegraphai/config.json `
80804 . ** Interactive prompt** : the CLI asks and saves to config
8181
82- ``` bash
83- export JUST_SCRAPE_TIMEOUT_S=300 # Request/polling timeout in seconds (default: 120)
84- JUST_SCRAPE_DEBUG=1 just-scrape ... # Debug logging to stderr
85- ```
82+ ### Environment Variables
83+
84+ | Variable | Description | Default |
85+ | ---| ---| ---|
86+ | ` SGAI_API_KEY ` | ScrapeGraph API key | — |
87+ | ` JUST_SCRAPE_API_URL ` | Override API base URL | ` https://api.scrapegraphai.com/v1 ` |
88+ | ` JUST_SCRAPE_TIMEOUT_S ` | Request/polling timeout in seconds | ` 120 ` |
89+ | ` JUST_SCRAPE_DEBUG ` | Set to ` 1 ` to enable debug logging to stderr | ` 0 ` |
8690
8791## JSON Mode (` --json ` )
8892
Original file line number Diff line number Diff line change 11{
22 "name" : " just-scrape" ,
3- "version" : " 0.1.7 " ,
3+ "version" : " 0.1.8 " ,
44 "description" : " ScrapeGraph AI CLI tool" ,
55 "type" : " module" ,
66 "main" : " dist/cli.mjs" ,
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export type {
3636 SmartScraperParams ,
3737} from "../types/index.js" ;
3838
39- const BASE_URL = "https://api.scrapegraphai.com/v1" ;
39+ const BASE_URL = process . env . JUST_SCRAPE_API_URL || "https://api.scrapegraphai.com/v1" ;
4040const POLL_INTERVAL_MS = 3000 ;
4141
4242function debug ( label : string , data ?: unknown ) {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const BANNER = [
1919 "╚═╝╚═╝╚═╝ ╩ ╚═╝╚═╝╩╚═╩ ╩╩ ╚═╝" ,
2020] ;
2121
22- const TAGLINE = " made with ♥ from scrapegraphai team" ;
22+ const TAGLINE = "made with ♥ from scrapegraphai team" ;
2323
2424const BANNER_COLOR = "#bd93f9" ;
2525
@@ -30,5 +30,8 @@ export function showBanner() {
3030 console . log ( text ) ;
3131 console . log ( chalk . hex ( BANNER_COLOR ) ( TAGLINE ) ) ;
3232 console . log ( chalk . hex ( BANNER_COLOR ) ( `v${ getVersion ( ) } ` ) ) ;
33+ if ( process . env . JUST_SCRAPE_API_URL ) {
34+ console . log ( chalk . yellow ( `→ Custom API: ${ process . env . JUST_SCRAPE_API_URL } ` ) ) ;
35+ }
3336 console . log ( ) ;
3437}
You can’t perform that action at this time.
0 commit comments