Skip to main content

apostolu

A tiny personal CLI by aapostolu.

Install

pip install apostolu

Workflow

pip install apostolu

apostolu ttfw setup
apostolu ttfw build <board_name>
apostolu ttfw flash

Each command can be run from a normal shell — you do not need to activate a virtual environment. Internally, apostolu uses the workspace venv at ~/tt-system-firmware-work/.venv by invoking its binaries directly (their shebangs point at the venv's Python).

Commands

apostolu ttfw setup

One-time bootstrap of a complete Tenstorrent System Firmware workspace at ~/tt-system-firmware-work. Equivalent to:

python3.12 -m venv ~/tt-system-firmware-work/.venv
source ~/tt-system-firmware-work/.venv/bin/activate
pip install west
west init -m https://github.com/tenstorrent/tt-system-firmware ~/tt-system-firmware-work
cd ~/tt-system-firmware-work
west update
west packages pip --install
west sdk install
west blobs fetch tt-system-firmware

uv is auto-installed (via pip install uv) if it isn't already on PATH, and is used to install Python 3.12. Every step is idempotent, so re-running apostolu ttfw setup is safe.

Options:

  • --python X.Y[.Z] — install a different Python version (default 3.12).
  • --force — recreate ~/tt-system-firmware-work/.venv if it already exists.

apostolu ttfw build <board>

Build SMC (default) or DMC firmware for a TT Blackhole board revision. The short revision is expanded into the canonical Zephyr board spec from the TT docs.

apostolu ttfw build p300c
# → west build --sysbuild -p -b tt_blackhole@p300c/tt_blackhole/smc \
#       app/smc -- -DCONFIG_SHELL=y

apostolu ttfw build p100a --target dmc
# → west build -b tt_blackhole@p100a/tt_blackhole/dmc app/dmc

Supported revisions: p100a, p150a, p150b, p150c, p300a, p300b, p300c. You can also pass a full spec (e.g. tt_blackhole@p300c/tt_blackhole/smc) and it'll be used verbatim.

Extra arguments forward to west build (for SMC, they land after -- -DCONFIG_SHELL=y as additional CMake args):

apostolu ttfw build p300c -DCONFIG_FOO=y

apostolu ttfw flash

Flash firmware to the board. Default flow is the TT-recommended SMC flash:

apostolu ttfw flash
# → west flash -r tt_flash --force

apostolu ttfw flash --target dmc
# → west flash

Extra arguments are forwarded to west flash.

apostolu --version

Prints the installed package version.

How "invisible" activation works

A Python virtual environment doesn't strictly require source activate to be used. That command only modifies your interactive shell's environment variables. The venv's own binaries (~/tt-system-firmware-work/.venv/bin/python, ~/tt-system-firmware-work/.venv/bin/west, etc.) each have a shebang pointing at the venv's python, so when apostolu invokes them via subprocess.run(...), they automatically run in the venv's context — the user's shell stays untouched.

Development

git clone https://github.com/aapostolu/apostolu
cd apostolu
pip install -e .
apostolu --help

To build a distribution:

pip install build
python -m build

License

MIT

Release files for apostolu 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apostolu 0.1.0
File Size Uploaded
apostolu-0.1.0.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apostolu 0.1.0
File Interpreter ABI Platform
apostolu-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / apostolu-0.1.0.tar.gz

Download URL apostolu-0.1.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c6859accc215a5a3ed5963baad6abcf3de3602d3e4da14b37cfc8109ecf2ede7
BLAKE2b-256 checksum
How to use checksums
c11a0bfa24d6182fded6bbc670d60b3726a855ccc8fb6e69f4dab64ee23d3e98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / apostolu-0.1.0-py3-none-any.whl

Download URL apostolu-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ca56603641b474e7274c77c1efc3a9d426e3504658c5c1e3cdf23d5351abf72
BLAKE2b-256 checksum
How to use checksums
fa1650396a949f276739a86b96d148a57873c4d6630eb4f618a1f25fcd3bcbae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page