Metadata-Version: 2.4
Name: lambdazen-local
Version: 0.1.0
Summary: LambdaZen Local — sync tool for LambdaZen concept repositories
License: Proprietary
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28
Requires-Dist: python-dotenv>=1.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: simplejson>=3.17

# LambdaZen Local

Command-line tool to clone, pull, push, and diff LambdaZen concept repositories.

## Installation

```bash
pip install lambdazen-local
```

## Credentials

Set your API credentials once:

```bash
lzlocal configure
```

This prompts for your `LZ_API_KEY` and `LZ_CJS_TOKEN` and saves them to `~/.lzlocal/.env`.

For per-user credentials (e.g. separate dev and qa keys):

```bash
lzlocal configure --user clouddev --api-key <key> --cjs-token <token>
lzlocal configure --user cloudqa  --api-key <key> --cjs-token <token>
```

You can also supply credentials via environment variables or a `.env` file in the current directory — these take priority over `~/.lzlocal/.env`:

```
LZ_API_KEY=...
LZ_CJS_TOKEN=...
```

## Commands

```bash
# Clone a concept repository
lzlocal clone /user/repo/uuid/ ./my-project

# Pull latest from cloud
lzlocal pull ./my-project
lzlocal pull ./my-project --ignore-conflicts

# Pull a single concept
lzlocal pull-concept ./my-project /user/repo/uuid/

# Push local changes
lzlocal push ./my-project
lzlocal push ./my-project --ignore-conflicts

# Push a single concept by URI
lzlocal push-concept ./my-project /user/repo/uuid/

# Diff local vs cloud
lzlocal diff ./my-project
lzlocal diff ./my-project --quiet

# Diff two local concept directories
lzlocal local-diff ./project-a ./project-b
lzlocal local-diff ./project-a ./project-b --quiet --reverse

# Diff local vs a git repository
lzlocal git-diff ./my-project ./git-repo
lzlocal git-diff ./my-project ./git-repo --quiet --reverse

# Unpack concept JSONs to files/ (advanced)
lzlocal unpack ./my-project

# Pack files/ back into concept JSONs (advanced)
lzlocal pack ./my-project
```

## Custom endpoint

All commands accept `--endpoint` to target a non-default LambdaZen cloud endpoint:

```bash
lzlocal clone /user/repo/uuid/ ./my-project --endpoint https://custom.lambdazen.com
```
