Metadata-Version: 2.4
Name: obris-cli
Version: 0.1.1
Summary: CLI for capturing screenshots and managing knowledge in Obris
Project-URL: Homepage, https://obris.ai
Project-URL: Repository, https://github.com/obris-dev/obris-cli
Project-URL: Documentation, https://docs.obris.ai
Author-email: Obris <dev@obris.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,capture,cli,knowledge-management,obris,screenshot,second-brain
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: click>=8.0
Requires-Dist: requests>=2.28
Description-Content-Type: text/markdown

# Obris CLI

A command-line tool for capturing screenshots and managing knowledge in [Obris](https://obris.ai), your personal knowledge layer for AI. Save content to organized topics so you never start another AI chat from zero again.

## Install

Requires Python 3.10+.

```bash
pip install obris-cli
```

Or run directly with [uv](https://docs.astral.sh/uv/):

```bash
uvx obris-cli --help
```

### Optional: macOS notifications

For desktop notifications with deep linking to your uploaded content:

```bash
brew install terminal-notifier
```

## Setup

### 1. Get your API key

Generate an API key from your [Obris dashboard](https://app.obris.ai/api-keys). Don't have an account? [Sign up](https://app.obris.ai/signup).

### 2. Authenticate

```bash
obris auth --key <your-api-key>
```

This saves your key locally to `~/.obris/config.json` and detects your Scratch topic (the default destination for captures).

### Environments

You can configure separate API keys for `prod` and `dev` side by side:

```bash
obris auth --key <prod-key>              # saves to prod (default)
obris --env dev auth --key <dev-key>     # saves to dev
```

Use `--env` on any command to override the active environment:

```bash
obris --env dev capture
obris --env dev topic list
```

Set the default environment:

```bash
obris env dev    # switch default to dev
obris env        # show current default
```

## Usage

### Capture a screenshot

```bash
obris capture                       # screenshot + upload to Scratch
obris capture --name "my pic"       # explicit name
obris capture --prompt              # prompt for a name via dialog
obris capture --topic <id>          # upload to a specific topic
```

### Upload a file

```bash
obris upload photo.png              # upload to Scratch
obris upload photo.png --topic <id> # upload to a specific topic
```

### Manage topics

```bash
obris topic list                    # list all topics
obris topic list <topic_id>         # list knowledge in a topic
```

### Manage knowledge

```bash
obris knowledge move <id> --topic <id>  # move to another topic
obris knowledge delete <id>             # delete a knowledge item
```

## Hotkeys

Bind keyboard shortcuts to capture commands using any automation tool — [Alfred](https://www.alfredapp.com/), [Raycast](https://www.raycast.com/), [Keyboard Maestro](https://www.keyboardmaestro.com/), macOS Shortcuts, etc.

### Example: Alfred

Create a workflow with a **Hotkey** trigger connected to a **Run Script** action (language: `/bin/zsh`):

**Quick capture:**

```zsh
/full/path/to/obris capture
```

**Capture with name prompt:**

```zsh
/full/path/to/obris capture --prompt
```

> **Tip:** Use the full path to the `obris` binary since Alfred doesn't load your shell profile. Run `which obris` to find it.

## Platform support

| Platform | Capture | Upload / Topics / Knowledge |
|----------|---------|----------------------------|
| macOS    | Yes | Yes |
| Linux    | Yes | Yes |
| Windows  | No  | Yes |

## Development

```bash
git clone https://github.com/obris-dev/obris-cli.git
cd obris-cli
uv sync
```

Run commands locally without installing:

```bash
uv run obris --env dev auth --key <your-api-key>
uv run obris capture
uv run obris topic list
```

### Publishing

```bash
make publish   # build and publish to PyPI
```

## Privacy Policy

This CLI sends your Obris API key to the Obris API (`api.obris.ai`) to authenticate requests. It uploads files and retrieves topic and knowledge data from your account. No data is stored beyond the local config file at `~/.obris/config.json`.

For the full privacy policy, see [obris.ai/privacy](https://obris.ai/privacy).

## Support

For issues or questions, contact [support@obris.ai](mailto:support@obris.ai) or open an issue on [GitHub](https://github.com/obris-dev/obris-cli/issues).

## License

MIT