This repository provides a GitHub template that includes build_sdk.sh, a one-stop script for managing your Summoner SDK development — from cloning the core repo and merging native modules to running smoke tests. Below is an overview of each command, its expected behavior, and example usage.
- Bash shell (Linux/macOS)
git,python3in yourPATH- A
build.txtfile listing your native-module repo URLs (one per line) - Optionally a
test_build.txt(for quick self-tests against the starter template)
To create your own project using this template:
- Click the “Use this template” button at the top of the GitHub repository page.
- Select “Create a new repository”.
- Name your project and click “Create repository from template”.
This will generate a new repository under your GitHub account with the template contents.
Clone your new repository and navigate into it:
git clone https://github.com/<your_account>/<your_repo>.git
cd <your_repo>Next, define your SDK composition by editing the build.txt file, which lists the native modules to include in your build. Then run the build_sdk.sh script:
source build_sdk.sh setupYou’re now ready to begin development.
You can invoke build_sdk.sh in two ways:
-
Execute (runs in a subshell)
# Without +x bash build_sdk.sh <command> [variant] # With +x chmod +x build_sdk.sh ./build_sdk.sh <command> [variant]
After executing
build_sdk.sh setup, the script will have created and populated thevenv/, but you’ll need to activate it manually:source venv/bin/activate -
Source (runs in your current shell)
source build_sdk.sh <command> [variant]
When sourced, the script activates the
venv/automatically. Your shell remains in the environment, ready to use thesummonerSDK immediately.
| Command | Variant | Description |
|---|---|---|
setup |
(optional) build (default) / test_build |
Clone Summoner Core, merge your native modules (from build.txt or test_build.txt), create & activate a venv/, and run Rust/Python extras. |
delete |
— | Remove summoner-sdk/, venv/, native_build/, and any generated test_server* files. |
reset |
— | Equivalent to running delete followed by setup (fresh clone + install). |
deps |
— | Reinstall Rust & Python dependencies in the existing venv/ by rerunning reinstall_python_sdk.sh. |
test_server |
— | Launch a small demo server against the SDK in venv/, calling your package’s hello_summoner(). |
clean |
— | Remove only build artifacts in native_build/ and any test_*.py, test_*.json, or test_*.log files (preserves venv/). |
⚠️ Tip: For development workflows, usingsourceis recommended so your shell remains in the activated environment.
# Use source to stay in the venv automatically
source build_sdk.sh setup
# Explicit build variants
source build_sdk.sh setup build
source build_sdk.sh setup test_build
# If using execution instead
bash build_sdk.sh setup
# Then activate manually:
source venv/bin/activateWhat it does
- Clones
https://github.com/Summoner-Network/summoner-core.gitintosummoner-sdk/. - Reads either
build.txt(for your real native modules) ortest_build.txt(for a quick starter-template smoke test), and clones each listed repo intonative_build/. - Copies every
tooling/<pkg>/folder intosummoner-sdk/summoner/<pkg>/, rewriting imports (tooling.pkg→pkg). - Creates a Python virtualenv in
venv/(if missing). - Activates
venv/, installs build tools (setuptools,wheel,maturin). - Writes a
.envfile undersummoner-sdk/. - Runs
summoner-sdk/reinstall_python_sdk.sh rust_server_v1_0_0to pull in any Rust/Python extras (this also installs the merged SDK).
Usage
# default (uses build.txt)
source build_sdk.sh setup
# explicitly use build.txt
source build_sdk.sh setup build
# use test_build.txt for a quick demo against the starter template
source build_sdk.sh setup test_buildIf you use bash instead of source, make sure you activate venv/ by using source venv/bin/activate in order to use the SDK.
What it does Removes all generated directories and files:
summoner-sdk/(core clone + merged code)venv/(virtualenv)native_build/(cloned native repos)- Any
test_server*.pyortest_server*.jsonfiles
Usage
bash build_sdk.sh deleteWhat it does
Shortcut for delete then setup. Cleans out everything and does a fresh bootstrap.
Usage
bash build_sdk.sh resetWhat it does
In the existing venv/, reruns the Rust/Python dependency installer:
bash summoner-sdk/reinstall_python_sdk.sh rust_server_v1_0_0Useful if you’ve updated core or your Rust SDK.
Usage
bash build_sdk.sh depsWhat it does
Runs a small demo server against the SDK installed in venv/. It:
-
Activates
venv/ -
Copies the core’s
desktop_data/default_config.json→test_server_config.json -
Generates
test_server.py:from summoner.server import SummonerServer from summoner.your_package import hello_summoner if __name__ == "__main__": hello_summoner() SummonerServer(name="test_Server").run(config_path="test_server_config.json")
-
Launches the server
Usage
bash build_sdk.sh test_serverWhat it does
Removes only the build artifacts and test scripts, preserving venv/:
native_build/- Any
test_*.py,test_*.json, ortest_*.logfiles
Usage
bash build_sdk.sh clean# 1. Bootstrap with your real modules
source build_sdk.sh setup
# 2. Develop your native modules under tooling/
# (edit code, commit, etc.)
# 3. If you want to test against the starter template only:
source build_sdk.sh setup test_build
# 4. Run a quick demo server
bash build_sdk.sh test_server
# 5. Remove native_build/ and test files from test_server
bash build_sdk.sh cleanThe build.txt and test_build.txt files define which native-package repositories should be included when composing the SDK. Each file lists repository URLs, one per line. Blank lines and lines starting with # are ignored.
You can optionally specify which subfolders within tooling/ to include from each repository.
To include all available features from a repository — meaning every folder under its tooling/ directory — just write the repo URL by itself:
# Include all tooling features from these repos
https://github.com/Summoner-Network/summoner-smart-tools.git
https://github.com/Summoner-Network/summoner-agentclass.gitFor basic smoke testing, your test_build.txt can be minimal:
https://github.com/Summoner-Network/starter-template.gitTo include only specific subfolders from a repository’s tooling/ directory, add a colon : after the URL, followed by the names of the folders you want (one per line):
# Only include feature1 and feature2 from this repo
https://github.com/your-org/your-repo.git:
feature1
feature2Only the listed subfolders will be copied — any nonexistent folders will be skipped with a warning, but will not cause the build to fail.
# Full repo usage (includes all features)
https://github.com/Summoner-Network/summoner-smart-tools.git
# Filtered usage (only feature_x and feature_y if present)
https://github.com/Summoner-Network/summoner-agentclass.git:
feature_x
feature_yThis format gives you fine-grained control over which modules are included in the SDK build, making it easy to tailor your environment to specific use cases or test scenarios.
