Next Commerce Theme Kit
Theme Kit is a command line tool for developers to build and maintain storefront themes programmatically, allowing theme developers to:
- Work on theme templates and assets using their local code editor or favorite IDE.
- Use git version control to work on a theme collectively with many theme collaborators.
- Use a pipeline to manage deployments of theme updates.
Installation
Theme Kit is a Python package available on PyPi.
If you already have python and pip, install with the following command:
pip install next-theme-kit
Mac OSX Requirements
See how to install python and pip with HomeBrew. Once you have completed this step you can install using the pip instructions above.
Windows Requirements
- Option 1 (Recommended) — Windows 10 and above feature WSL (Windows Subsystem for Linux) which provides a native Linux environment, see how to Install WSL with Ubuntu. Once you have installed WSL, follow the best practice guides to configure and use with VS Code and then follow the
pipinstructions above to install Theme Kit. - Option 2 — Installing
pythonin Windows natively can be done through the Windows App Store. Recommend using Windows Powershell. This route is a little more tricky and some knowledge on how to manage Python in Windows will be required.
Setup
Connect ntk to a store in three steps.
1. Create the API Key
Store authentication uses OAuth 2.0 and requires creating a store OAuth App with the themes:read and themes:write permissions.
- In the Storefront admin, go to Settings > API Access.
- Click Create App.
- Give the app a name and assign a user.
- In the Permissions tab, enable
themes:readandthemes:write. - Save. Copy the generated API key — you will need it in the next step.
2. Configure Theme Kit
ntk reads its connection settings from two places: command flags (--apikey, --store, --theme_id) and the config.yml file in your theme directory. You do not need to create config.yml by hand — ntk checkout and ntk init write it for you, and after that commands run without flags:
development:
apikey: <api key>
store: https://{store}.29next.store
theme_id: <theme id>
3. Connect to a Theme
Work from a copy of an existing theme rather than an empty directory — a complete theme is the reference for the required directories, templates, and settings.
Work on a theme already on the store — ntk checkout downloads the theme into your current directory and writes config.yml:
ntk checkout --theme_id=<id> --apikey="<api key>" --store="https://{store}.29next.store"
Add a new theme to the store — start from a copy of an existing theme, such as the Intro Bootstrap starter theme, then register it as a new theme with ntk init and upload the files with ntk push:
ntk init --name="<Theme Name>" --apikey="<api key>" --store="https://{store}.29next.store"
ntk push
Usage
With the package installed, you can now use the commands inside your theme directory and work on a storefront theme.
| Command | Description |
|---|---|
ntk init |
Initialize a new theme |
ntk list |
List all available themes |
ntk checkout |
Checkout an existing theme |
ntk pull |
Download existing theme or theme file |
ntk push |
Push current theme state to store |
ntk watch |
Watch for local changes and automatically push changes to store |
ntk sass |
Process sass to css, see Sass Processing |
Browse Store Themes
To see what themes exist on the store, run ntk list to print the theme ID and name of each, with the active theme marked.
ntk list
Output looks like:
[development] Available themes:
[development] [42] Spring Launch
[development] [43] Holiday Promo (Active)
If you do not have a config.yml, also pass --apikey and --store.
Work on an Existing Theme
To start working on a theme that already exists on the store, ntk checkout downloads it into your directory and writes config.yml with the theme ID.
ntk checkout --theme_id=<id>
--theme_id / -t is required. If you do not have a config.yml, also pass --apikey and --store:
ntk checkout --theme_id=<id> --apikey="<api key>" --store="https://{store}.29next.store"
ntk checkout differs from ntk pull in one way: checkout writes config.yml so the directory is ready for subsequent ntk push / ntk watch runs; pull downloads the same files without writing config.yml.
Add a New Theme to the Store
ntk init registers your current directory as a new theme on the store and writes a config.yml. It does not download or scaffold any files — run it inside an existing theme codebase, then ntk push to upload the files.
ntk init --name="<Theme Name>"
--name / -n is required. If you do not have a config.yml yet, also pass --apikey and --store:
ntk init --name="<Theme Name>" --apikey="<api key>" --store="https://{store}.29next.store"
On success, ntk init logs the new theme ID and name, and persists the theme ID into config.yml so subsequent commands can omit --theme_id.
Sync Files to the Store
To sync files between your local directory and the store, use ntk push to upload and ntk pull to download. Both upload or download the whole theme by default, and both accept file paths as positional arguments to limit the operation to specific files.
| Example | Command |
|---|---|
| Push a single file | ntk push templates/index.html |
| Push a subset of files | ntk push templates/index.html assets/main.css |
| Pull a single file | ntk pull templates/index.html |
| Pull a subset of files | ntk pull templates/index.html assets/main.css |
Watch for File Changes
ntk watch monitors your theme directory and automatically pushes changed files to the store. Use it while you develop — save a file and the change is uploaded moments later.
ntk watch
On start, ntk watch logs the store, theme ID, a preview-theme URL, and the directory it is watching. Press Ctrl + C to stop.
Sass Processing
Theme kit includes support for Sass processing via Python Libsass. Sass processing includes support for variables, imports, nesting, mixins, inheritance, custom functions, and more.
How it works
- Put
scssfiles in top levelsassdirectory. - Run
ntk sassorntk watchto process themesassfiles. - Top level
scssfiles will be processed tocssfiles in the asset directory with the same name.
Example Theme with Sass Structure
├── assets
│ ├── main.css // reference this asset file in templates
├── sass
│ ├── _base.scss
│ ├── _variables.scss
│ └── main.scss // processed to assets/main.css
Metadata
Release files for next-theme-kit 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| next_theme_kit-1.3.0.tar.gz | 23.0 kB | Without provenance | Details for next_theme_kit-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| next_theme_kit-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for next_theme_kit-1.3.0-py3-none-any.whl |
Total release size: 50.1 kB
Release files / next_theme_kit-1.3.0.tar.gz
| Download URL | next_theme_kit-1.3.0.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
02506f3fa1a9f7034518f55c4d7adc448446491d49b548f9a5876d2bdfd8166a
|
|
BLAKE2b-256 checksum How to use checksums |
dd13d16ac2f7b7d070e7b0ce32da6ebf5fa23a92194c70b1051dffd39d49efbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / next_theme_kit-1.3.0-py3-none-any.whl
| Download URL | next_theme_kit-1.3.0-py3-none-any.whl |
|---|---|
| Size | 27.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d2545049afb895a8a5bd74c805dc60158425bf3eb94093ef5bc2206ca0e6200
|
|
BLAKE2b-256 checksum How to use checksums |
78693223c8868aa31dd86fe909fe1e475654e7ec70288e4819e8321243beddc9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for next-theme-kit 1.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.