truffile the TruffleOS SDK - Connect and deploy apps to Truffle devices
Project description
🍄🟫 Truffile
Python SDK/CLI for Truffle devices.
What It Does
- discovers and connects to your Truffle (
scan,connect,disconnect) - copies bundled agent resources into your workspace (
load) - validates and deploys apps from
truffile.yaml(validate,deploy) - manages installed apps (
list apps,delete) - talks to inference directly (
models,chat)
Start making your Own Apps
- app schema and validation:
truffile/truffile/schema/app_config.py - schedule parsing:
truffile/truffile/schedule.py - deploy planning + builder flow:
truffile/truffile/deploy/builder.py - generated TruffleOS protos vendored in:
truffile/truffle/ - bundled example apps live under
truffile/app-store/ - bundled Codex skills live under
truffile/skills/
truffile.yaml defines:
- metadata (
name,description,type) - process (
cmd,working_directory,environment) - files to upload
- optional run/build commands
- background schedule policy (for BG apps)
App Types and Runtime Model
Apps can be:
- foreground (
fg): exposes MCP tools that tasks/agents can call during active execution - background (
bg): runs on schedule and emits context for proactivity, enabling the device to trigger actions and write/update memory - both (
fg+bg): one app package can provide MCP tools and scheduled context emission
How to think about it:
- FG path is tool-serving: app process is used as a callable capability surface (MCP)
- BG path is context/proactivity: scheduled runs feed the proactive agent with fresh signals
- Proactivity can take actions and persist memory based on BG outputs
In practice:
- use
fgwhen you need direct tool invocation from tasks - use
bgwhen you need periodic monitoring, summaries, or event-driven context - use
bothwhen the same app should both expose tools and continuously feed proactivity/memory
Core Commands
truffile scan
truffile connect <device>
truffile create [app_name]
truffile load all
truffile validate [app_dir]
truffile deploy [app_dir]
truffile deploy --dry-run [app_dir]
truffile list apps --json
truffile delete <app-name>
truffile models
truffile chat
truffile create scaffolds a hybrid app starter with:
truffile.yaml(foreground + background process config)- copy-file steps for generated
*_foreground.pyand*_background.py icon.pngcopied fromdocs/Truffle.png(deploy requires an icon)
truffile load all copies bundled agent-readable resources into your current
workspace:
./truffile/skills/for CLI/chat/infer/app-creation skills./truffile/examples/for bundled example apps such as ArXiv, Exa, Notion, Obsidian, Viator, WHOOP, and Home Assistant
Use truffile load skills or truffile load examples to copy only one group.
Obsidian Bridge Workflow
For a local Obsidian vault on your laptop, truffile can run a small host-side
bridge and deploy a bundled foreground app to the device:
truffile obsidian attach --vault ~/Documents/abd-vault
truffile obsidian serve
truffile obsidian deploy
Use truffile obsidian status to inspect the saved bridge configuration. The
bridge stores a scoped bearer token in the local truffile state file and the
bundled app uses that token to read, write, list, and search notes in the
configured vault.
In truffile chat, runtime controls are slash commands (not launch flags):
/helpfor all chat commands/configto show current chat config/reasoning on|off/stream on|off/json on|off/tools on|off/max_tokens <int>,/temperature <float|off>,/top_p <float|off>,/max_rounds <int>/modelsto switch model/attach <path-or-url>to attach an image for the next user message (local path orhttp(s)URL)/system <text|clear>/mcp connect <http(s)://...>,/mcp tools,/mcp status,/mcp disconnect
Inference Interfaces
Direct IF2:
- list models:
GET /if2/v1/models - chat completions:
POST /if2/v1/chat/completions
CLI wrappers:
truffile modelstruffile chat(streaming by default)
Proto Sync
Refresh vendored protos from firmware repo:
./scripts/sync_protos.sh
Development Loop
The supported app development loop is CLI-first:
truffile create my-app --path ./apps
truffile validate ./apps/my-app
truffile deploy --dry-run ./apps/my-app
truffile deploy ./apps/my-app
After deploy, use truffile chat to attach the app to a task and exercise its
tools with the on-device agent. Use truffile delete to remove test apps from
the connected device.
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 truffile-0.3.6.tar.gz.
File metadata
- Download URL: truffile-0.3.6.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e102a55ad375e1ca2ef8618d5901be10233649b9f11497624cd04822f1a6a03
|
|
| MD5 |
1ce7b4ec70fd255d47dc367ec33ca845
|
|
| BLAKE2b-256 |
da434195552491a38e043c6ad107048c33b88af84b509fbeac52b005e0282c2f
|
Provenance
The following attestation bundles were made for truffile-0.3.6.tar.gz:
Publisher:
publish-truffile.yml on deepshard/pyfw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
truffile-0.3.6.tar.gz -
Subject digest:
7e102a55ad375e1ca2ef8618d5901be10233649b9f11497624cd04822f1a6a03 - Sigstore transparency entry: 1866170082
- Sigstore integration time:
-
Permalink:
deepshard/pyfw@8c8bc07d8332b8e1b1d972fdb11fcf122e5f564d -
Branch / Tag:
refs/tags/truffile/v0.3.6 - Owner: https://github.com/deepshard
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-truffile.yml@8c8bc07d8332b8e1b1d972fdb11fcf122e5f564d -
Trigger Event:
push
-
Statement type:
File details
Details for the file truffile-0.3.6-py3-none-any.whl.
File metadata
- Download URL: truffile-0.3.6-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0c72582d2a056ce1c3b7442011f2690dbb1ba1b37450e12c7731852487aa9c6
|
|
| MD5 |
4bb06c60cdf79dda51a37ff9d19aa24e
|
|
| BLAKE2b-256 |
21c28bc7899efd4a3c6c0415e1ddc1d7767a223824d27889c07ba354077bfc09
|
Provenance
The following attestation bundles were made for truffile-0.3.6-py3-none-any.whl:
Publisher:
publish-truffile.yml on deepshard/pyfw
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
truffile-0.3.6-py3-none-any.whl -
Subject digest:
f0c72582d2a056ce1c3b7442011f2690dbb1ba1b37450e12c7731852487aa9c6 - Sigstore transparency entry: 1866170207
- Sigstore integration time:
-
Permalink:
deepshard/pyfw@8c8bc07d8332b8e1b1d972fdb11fcf122e5f564d -
Branch / Tag:
refs/tags/truffile/v0.3.6 - Owner: https://github.com/deepshard
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-truffile.yml@8c8bc07d8332b8e1b1d972fdb11fcf122e5f564d -
Trigger Event:
push
-
Statement type: