# CLI for select objects from TB2

**URL:** https://discourse.flucoma.org/t/cli-for-select-objects-from-tb2/632
**Category:** Pre-Release Toolbox2 New Ideas
**Created:** [August 7, 2020, 7:13pm UTC](https://discourse.flucoma.org/t/cli-for-select-objects-from-tb2/632 "2020-08-07T19:13:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)
#### Post date: [August 7, 2020, 7:13pm UTC](https://discourse.flucoma.org/t/cli-for-select-objects-from-tb2/632/1 "2020-08-07T19:13:11Z")

</div>

What is the possibility of having some of the algos from TB2 made available via CLI? I’d like to port them into REAPER to get a bit more hands on with using them in a sound design capacity. Taking a look at the wrapper now I believe some objects might automatically be able to go without much modification. `fluid.bufaudiotransport~`, `fluid.bufnmfcross~` for example.

Is there some complexity to this I am missing? Like a new wrapper being required?

---

<div class="post-metadata">

### Author: ![weefuzzy](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/weefuzzy/32/362_2.png) [@weefuzzy](https://discourse.flucoma.org/u/weefuzzy)
#### Post date: [August 7, 2020, 9:31pm UTC](https://discourse.flucoma.org/t/cli-for-select-objects-from-tb2/632/2 "2020-08-07T21:31:49Z")

</div>

> [@jamesbradbury](#):
>
> Is there some complexity to this I am missing? Like a new wrapper being required?

Pretty much 😆 There are two big changes, and a bunch of smaller ones. The big ones are allowing for objects to expose arbitary messages (like `fit`, `transform` etc), and to handle pools of objects that have names (like `FluidDataSet` and `FluidLabelSet`). Because both changes were implemented swedish chef style, they have wrought havoc on the Max and SC wrappers (which have bloated as a result), and changed the API for objects in some messy ways. The plan is to refactor out some of this badness before doing the PD and CLI stuff.

_With that said_ , I’ll do some gratuitous speculation:

1. the whole business of named objects doesn’t obtain in the CLI context: a ‘dataset’ will have to be a file, and – in the first instance at least – I imagine chaining together operations will be done through shell scripting.
2. The messages is a more interesting one, but (off the top of my head), something like the `git` convention of `git <verb>` would be the way, e.g. `FluidKDTree knearest --model myfitttedtree.json --data somedatapoint.csv`

---

<div class="post-metadata">

### Author: ![jamesbradbury](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/jamesbradbury/32/1252_2.png) [@jamesbradbury](https://discourse.flucoma.org/u/jamesbradbury)
#### Post date: [August 7, 2020, 9:38pm UTC](https://discourse.flucoma.org/t/cli-for-select-objects-from-tb2/632/3 "2020-08-07T21:38:12Z")

</div>

> [@weefuzzy](#):
>
> FluidKDTree knearest --model myfitttedtree.json --data somedatapoint.csv

This looks quite pretty. Although please lowercase that binary name for my eyes :). So I assume the more simple objects that do nothing with datasets but operate on buffers suffer from some differences in the way the wrapper looks now. I look forward to some CLI things to play with 🙂

---

<div class="post-metadata">

### Author: ![tremblap](https://discourse.flucoma.org/user_avatar/discourse.flucoma.org/tremblap/32/5_2.png) [@tremblap](https://discourse.flucoma.org/u/tremblap)
#### Post date: [August 8, 2020, 9:04am UTC](https://discourse.flucoma.org/t/cli-for-select-objects-from-tb2/632/4 "2020-08-08T09:04:43Z")

</div>

> [@weefuzzy](#):
>
> both changes were implemented swedish chef style,

references to Muppets are always making a great day.
