Metadata-Version: 2.4
Name: sensei-cli
Version: 0.2.0
Summary: Command-line-interface for Sensei Robotics data
Author-email: Sensei Robotics <support@senseirobotics.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/senseirobotics/sensei-cli
Project-URL: Issues, https://github.com/senseirobotics/sensei-cli/issues
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: tqdm
Dynamic: license-file

# Sensei CLI

## Installation

```
pip install sensei-cli
```

## Example Usage

Note: Run `sensei --help` for further info.

### List files

```bash
$ sensei --ls
(DIR) raw
(DIR) test1

2 results

$ sensei --ls raw
(DIR) raw/manual
raw/file1.txt
raw/file2.txt

3 results
```

### Recursively download everything into a directory called `sensei-data`

```bash
sensei --recursive --download /
# or more concise:
sensei -rd
```

### Recursively download everything into a directory called `/PATH/TO/MYDIR`

```bash
sensei --recursive --download / --out /PATH/TO/MYDIR
# or more concise:
sensei -rd / -o /PATH/TO/MYDIR
```

### Download specific file

```bash
sensei --download path/to/my_file.txt
# or more concise:
sensei -d path/to/my_file.txt
```

### Recursively download specific directory

```bash
sensei --recursive --download path/to/my_directory
# or more concise:
sensei -rd path/to/my_directory
```

### Download everything and overwrite existing files

```bash
sensei --recursive --overwrite --download /
# or more concise:
sensei -rwd
```

### List collection episodes and sessions

```bash
# most recently collected episodes (shows 50 by default, --limit 0 for all)
sensei --episodes
# filter by device, operator, task, session, processing status or day
sensei --episodes --device sensei-exo-1 --operator "Alice Chen" --status completed
sensei --episodes --session SESSION_ID
sensei --episodes --day 2026-10-09 --tz America/Los_Angeles
# sort with --order-by, prefixing - for descending (note the =)
sensei --episodes --order-by=-length_seconds
# sessions take the same filters (except --session/--status), plus --active
sensei --sessions --active --order-by=-num_episodes
# print JSON instead of a table
sensei --sessions --json --limit 0 > sessions.json
```

### Download an episode or a whole session

Downloads an episode's processed output into `sensei-data/<episode name>`, or every processed episode of a
session into `sensei-data/session_<id>/<episode name>`. Episodes that aren't processed yet are skipped.

```bash
sensei --download-episode EPISODE_ID
sensei --download-session SESSION_ID -o /PATH/TO/MYDIR
```

Add `--download` to `--episodes` or `--sessions` to download everything the query lists, laid out the same way:

```bash
sensei --episodes --status completed --limit 10 --download
sensei --sessions --device sensei-exo-1 --day 2026-10-09 -d
```

### Interactive mode

```bash
>> sensei -i
Entering interactive mode. Type 'help' for help, 'exit' to exit
sensei> ls
(DIR) dir1

1 results
sensei> ls dir1
(DIR) dir1/dir2

1 results
rdownload dir1/dir2
Recursively downloading from dir1/dir2 into /sensei-data...
```
