@baskerhq/localstage
v1.0.2
Published
Local development server for Basker themes - CLI tool for theme development
Maintainers
Readme
LocalStage
LocalStage is a local development server and CLI for Basker themes. Run a theme locally while using live data from a Basker CMS environment.
Install
npm install -g @baskerhq/localstageUsage
From a theme directory:
basker theme devUse a custom CMS URL:
BASKER_URL=https://example.com LOCALSTAGE_THEME_PATH=/path/to/theme basker theme devOpen http://localhost:9292 and sign in.
Theme Structure
your_theme/
├── layouts/
│ └── default.liquid
├── templates/
│ ├── page.liquid
│ ├── post.liquid
│ └── 404.liquid
├── snippets/
└── assets/Environment Variables
BASKER_URL— CMS base URLLOCALSTAGE_THEME_PATH— path to a theme directory
Commands
Authentication
basker auth login [theme-path]— authenticate and select a workspacebasker auth tenant [theme-path]— switch the active workspace for this themebasker auth logout [theme-path]— clear the stored session for this theme
Theme
basker theme dev [theme-path]— start the local dev server (alias:basker dev)basker theme check [theme-path]— validate theme structure and schema (alias:basker check)basker theme set [theme-path] --theme-id <id>— store or look up the theme ID used for remote settings
Common flags: --theme, -t <path>, --payload-url <url>, --port, -p <port> (dev only), --no-livereload (dev only), --debug, -d (dev only).
Troubleshooting
- Ensure your CMS URL is reachable and your account can access the target tenant.
- Verify the theme path exists and contains
layouts/andtemplates/. - If sign-in fails, run
basker auth logoutthenbasker auth loginto reset the cached session.
