Personal CLI tooling. `apostolu tt-fw` installs the latest Python and creates ~/.venv.
Project description
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 (default3.12).--force— recreate~/tt-system-firmware-work/.venvif 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apostolu-0.1.0.tar.gz.
File metadata
- Download URL: apostolu-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6859accc215a5a3ed5963baad6abcf3de3602d3e4da14b37cfc8109ecf2ede7
|
|
| MD5 |
a0320cb9667c477db0043948147a9943
|
|
| BLAKE2b-256 |
c11a0bfa24d6182fded6bbc670d60b3726a855ccc8fb6e69f4dab64ee23d3e98
|
File details
Details for the file apostolu-0.1.0-py3-none-any.whl.
File metadata
- Download URL: apostolu-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ca56603641b474e7274c77c1efc3a9d426e3504658c5c1e3cdf23d5351abf72
|
|
| MD5 |
98783d0ec5730583d38de9e5b0e1bc88
|
|
| BLAKE2b-256 |
fa1650396a949f276739a86b96d148a57873c4d6630eb4f618a1f25fcd3bcbae
|