Context
Node has 5+ runnable examples covering diverse use cases. Python has only 2. Each binding should have equivalent examples demonstrating the same patterns, adapted to language idioms.
This is part of the Python ↔ Node binding parity effort (Phase 4 — Documentation Alignment).
Current state
| Example pattern |
Python (examples/) |
Node (examples/) |
| Basic bash usage |
✅ bash_basics.py |
✅ bash_basics.ts |
| Data pipeline |
❌ |
✅ data_pipeline.ts |
| LLM tool usage |
❌ |
✅ llm_tool.ts |
| K8s orchestrator (ScriptedTool) |
✅ k8s_orchestrator.py |
❌ |
| LangChain integration |
❌ |
✅ langchain_integration.ts |
What to implement
Add to Python (crates/bashkit-python/examples/)
data_pipeline.py — Data processing pipeline example
- Read/generate sample data (CSV or JSON)
- Use bash pipelines (
sort, uniq, awk, jq) to transform data
- Demonstrate VFS for intermediate files
- Show both sync and async execution
- Mirror the patterns in Node's
data_pipeline.ts
llm_tool.py — LLM tool usage example
- Create a
BashTool instance
- Show tool metadata (
description(), input_schema(), output_schema())
- Demonstrate the execute → result → parse cycle an LLM agent would use
- Show
system_prompt() for LLM context
- Mirror the patterns in Node's
llm_tool.ts
Add to Node (crates/bashkit-js/examples/)
k8s_orchestrator.ts — ScriptedTool orchestration example
- Create a
ScriptedTool with mock K8s API tools (get-pods, get-deployments, scale, etc.)
- Register 5+ tools with callbacks and schemas
- Execute a bash script that orchestrates multiple tools via pipes and jq
- Mirror the patterns in Python's
k8s_orchestrator.py
Acceptance criteria
Context
Node has 5+ runnable examples covering diverse use cases. Python has only 2. Each binding should have equivalent examples demonstrating the same patterns, adapted to language idioms.
This is part of the Python ↔ Node binding parity effort (Phase 4 — Documentation Alignment).
Current state
examples/)examples/)bash_basics.pybash_basics.tsdata_pipeline.tsllm_tool.tsk8s_orchestrator.pylangchain_integration.tsWhat to implement
Add to Python (
crates/bashkit-python/examples/)data_pipeline.py — Data processing pipeline example
sort,uniq,awk,jq) to transform datadata_pipeline.tsllm_tool.py — LLM tool usage example
BashToolinstancedescription(),input_schema(),output_schema())system_prompt()for LLM contextllm_tool.tsAdd to Node (
crates/bashkit-js/examples/)k8s_orchestrator.ts — ScriptedTool orchestration example
ScriptedToolwith mock K8s API tools (get-pods, get-deployments, scale, etc.)k8s_orchestrator.pyAcceptance criteria
data_pipeline.pycreated and runs successfully:python examples/data_pipeline.pyllm_tool.pycreated and runs successfully:python examples/llm_tool.pyk8s_orchestrator.tscreated and runs successfully (via ts-node or compiled)bash_basics.py(print output, show both sync/async)data_pipeline.pyandllm_tool.pyto.github/workflows/python.ymlexamples jobk8s_orchestrator.tsto.github/workflows/js.ymlexamples job