Metadata-Version: 2.4
Name: sedona-cli
Version: 0.6.3
Summary: Export your AI chats — Claude Code, Claude.ai/Cowork, ChatGPT — and terminal sessions into your company's context.
Project-URL: Homepage, https://github.com/Sedona-Health/sedona-internal
License-Expression: MIT
License-File: LICENSE
Keywords: chatgpt,claude,claude-code,context,export,knowledge-base,transcripts
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Description-Content-Type: text/markdown

# sedona-cli

Your AI chats hold a surprising amount of company context — decisions, debugging
trails, design discussions, institutional knowledge that never makes it into a
doc. `sedona` ships them into Sedona's company knowledge graph, where they
become searchable context for everyone (with secrets scrubbed and sensitive
sessions automatically restricted).

## Install

```bash
uv tool install sedona-cli      # or: pipx install sedona-cli / pip install sedona-cli
```

## Quickstart

```bash
sedona auth                     # email OTP — one-step onboarding (skill, completion, app)
sedona ls                       # recent Claude Code sessions + chat exports it found
sedona ls -v                    # + turn counts, repo, keywords, first prompt
sedona peek                     # inspect one session before uploading (interactive picker)
sedona peek 1                   # …or by recency index / path / title substring
sedona brain                    # scrub + upload this project's newest session
sedona brain --recent 3         # …or your 3 most recent sessions, any project
sedona brain ~/Downloads/conversations.json   # a Claude.ai / ChatGPT export
history | sedona brain --stdin  # raw terminal scrollback
sedona people                   # who's on Sedona (recipients for `send`)
sedona send ./drafts avi        # hand a folder straight to a teammate (P2P)
sedona inbox                    # see what teammates sent you
sedona get <id>                 # download + unzip it into ./sedona-inbox/
sedona whoami                   # who you're signed in as
sedona help [command]           # grouped overview / one command's flags
```

`sedona auth` (or `sedona init`) also installs the agent skill, so you can just
tell Claude Code or Codex *"share this session with Sedona"* and it handles the
upload.

### Tab completion

Wired automatically by `sedona auth` / `sedona init`; manual setup is one line:

```bash
echo 'eval "$(sedona completion zsh)"'  >> ~/.zshrc    # zsh
echo 'eval "$(sedona completion bash)"' >> ~/.bashrc   # bash
```

`sedona peek <TAB>` then completes against your actual recent sessions, with
titles shown inline.

### Skill without installing anything

The upload skill is also served by the backend, so an agent can be set up with
one curl (the skill runs the CLI via `uvx`, so no install is ever needed):

```bash
base=https://sedona-internal-production.up.railway.app
curl -fsSL $base/transcripts/skill --create-dirs -o ~/.claude/skills/sedona-upload/SKILL.md   # Claude Code
curl -fsSL $base/transcripts/skill --create-dirs -o ~/.codex/skills/sedona-upload/SKILL.md    # Codex
```

## What it can export

| Source | How |
|---|---|
| **Claude Code** sessions | Read directly from `~/.claude/projects/` — `sedona brain` / `--recent N` |
| **Claude.ai / Cowork** chats | Request a data export in claude.ai settings, then `sedona brain conversations.json` |
| **ChatGPT** chats | Request a data export in ChatGPT settings, then `sedona brain conversations.json` |
| **Terminal** sessions | Pipe anything: `tmux capture-pane -p \| sedona brain --stdin` |

## Send files to a teammate

Separate from uploading to company memory, `sedona send` hands a folder or file
**directly to one colleague** — handy for a `drafts/` folder, a `.parquet`, anything.
The recipient is an email or a unique name fragment (`sedona people` lists everyone):

```bash
sedona send ./drafts avi                  # zips and sends; they get a Slack DM
sedona inbox                              # list what's waiting for you
sedona get <id>                           # download + unzip into ./sedona-inbox/
```

Unlike `sedona brain`, these files are sent **as-is** (no secret scrubbing) and are
**not** indexed into company memory — they're stored privately and only the named
recipient can download them. The recipient must be a company employee.

## Privacy

- **Secrets never leave your machine**: API keys, tokens, JWTs, and private
  keys are redacted locally before upload (and the server scrubs again as a
  backstop).
- The server classifies each conversation's visibility **fail-closed** —
  sensitive content is restricted to you or admins, not shared company-wide.
- Tool output in coding sessions is truncated; assistant thinking blocks are
  dropped entirely.
- Authentication requires a verified company employee email; the tool does
  nothing useful outside the company.

## License

MIT (this CLI only).
