Metadata-Version: 2.5
Name: paracord
Version: 0.0.11
Summary: A modern CLI tool for Paracord projects - wraps copier, uv, and rav into a unified developer experience
Project-URL: Homepage, https://github.com/getparacord/paracord
Project-URL: Repository, https://github.com/getparacord/paracord
Project-URL: Issues, https://github.com/getparacord/paracord/issues
Author-email: Justin Mitchel <getparacord@gmail.com>
Maintainer-email: jmitchel3 <getparacord@gmail.com>
License-Expression: MIT
Keywords: cli,copier,paracord,project-template,rav,uv
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.12
Requires-Dist: copier>=9.0.0
Requires-Dist: httpx>=0.25.0
Requires-Dist: keyring>=24.0.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0.0
Requires-Dist: tomli-w>=1.0.0
Requires-Dist: typer>=0.9.0
Provides-Extra: console
Requires-Dist: fastapi>=0.104.0; extra == 'console'
Requires-Dist: jinja2>=3.1.0; extra == 'console'
Requires-Dist: uvicorn>=0.24.0; extra == 'console'
Description-Content-Type: text/markdown

# Paracord CLI

A modern, fast CLI tool that wraps copier, uv, and rav into a unified developer experience for Paracord projects.

## Installation

```bash
uv tool install paracord
```

Or run directly without installing:

```bash
uvx paracord init my-project
```

## Usage

### Create a new project

```bash
paracord init my-project
# or
paracord init my-project
```

### Run tasks

Inside a Paracord project:

```bash
# List available tasks
paracord run

# Run a specific task
paracord run dev
```

### Update from template

```bash
paracord update
```

### Check for updates

```bash
paracord check
```

### Log in and set up a folder

```bash
paracord login                 # first login is global
paracord login                 # again: scope it to this folder, or overwrite the global one
paracord login --scope .       # scope to this folder without asking
paracord setup                 # pick a Dash project for this folder
paracord setup acme/website    # or name it
```

Like Doppler, a login can be global (`/`) or scoped to a folder and everything
under it; a scoped login can use a different Dash host and organization from the
global one. After a scoped login, `paracord login` offers to run `paracord setup`.

`paracord setup` opens Dash to approve a project key (`pcp_`) for one project.
The key is stored in your OS keychain, never in `~/.paracord/config`, and the
folder is linked to the project's stable Dash ids. Project commands run in that
folder use the key automatically; `PARACORD_PROJECT_KEY` overrides it.
`paracord project logout` deletes the local key (revoke it in Dash).
`paracord auth status` shows which host is active and why.

### Link a folder to a project

Dash addresses projects as `<account>/<project>`, where the account is a user or
organization handle. Link a folder (and everything under it) to one:

```bash
paracord project link acme/website            # current folder
paracord project link acme/website --path ~/code/website
paracord project show                         # nearest linked folder, like git
paracord project show --json
paracord project unlink
```

The account handle and the project are checked on Dash when you are logged in
and Dash is reachable (`/cli/v1/projects/resolve/`, with `PARACORD_PROJECT_KEY`
first if set, then your org tokens). A verified link stores Dash's stable account
and project ids per environment under `project_identities` in the config, next to
the `path_projects` entry, and `paracord project show --json` reports them with
`"verified": true`. Project slugs are case-sensitive, as on Dash. A project Dash
says doesn't exist fails the link; without a usable token, offline (`--offline`)
or with `--no-verify`, the link is saved unverified. When the account is an organization, the folder's organization
mapping is set too (to an organization this machine is logged in to or has seen
in `paracord org list`), so `paracord org` and other readers keep working. Logging out clears
organization mappings but keeps project links; run `paracord project link` again after
logging back in to restore the organization.

Links live in `~/.paracord/config` under `path_projects`, a map of absolute
folder path to `<account>/<project>`. `paracord org set` still works but is
deprecated in favour of `paracord project link`.

### Project files

`paracord files` works on Dash project files the way `aws s3` works on a bucket.
Remote paths are `<project>/<folder>/.../<name>` in the folder's organization
(see `paracord org`). An argument is local when it starts with `.`, `/` or `~`, or
exists on disk; anything else is remote, and `paracord://` forces remote.

```bash
paracord files ls website                      # a folder; no argument lists the linked project
paracord files ls website/brand -r --json
paracord files cp ./logo.png website/brand/    # upload (missing folders are created)
paracord files cp website/brand/logo.png .     # download
paracord files cp -r website/brand ads/brand   # copy on Dash, across projects
paracord files mv website/old.png website/archive/new.png
paracord files rm -r website/drafts
paracord files sync ./site website/site --dry-run
paracord files sync website/site ./site --delete
```

`cp` replaces existing files. `mv` within one project is a move on Dash;
across projects or between local and remote it copies, then deletes the
source. `sync` is one way: it sends files that are new, a different size, or
newer than the target, and `--delete` removes target files the source lacks.
Downloads take the remote modified time so repeat syncs skip them. Empty files
cannot be uploaded (Dash needs at least one byte). CLI tokens work only on
the organization they were minted for, so personal accounts are not reachable
from the CLI yet.

## Commands

| Command | Description |
|---------|-------------|
| `paracord init [project-name]` | Create a new Paracord project |
| `paracord run [task]` | Run a rav task (or list tasks if none specified) |
| `paracord update` | Update project from upstream template |
| `paracord check` | Check for template updates |
| `paracord project link <account>/<project>` | Link a folder to a Dash project |
| `paracord project show [--json]` | Show the project linked to this folder |
| `paracord project unlink` | Remove the nearest project link |
| `paracord files ls\|cp\|mv\|rm\|sync` | Project files on Dash by `<project>/<path>` |
| `paracord setup [<account>/<project>]` | Set up this folder for a Dash project (project key in the keychain) |
| `paracord project list [--json]` | List the Dash projects you can reach on the active host |
| `paracord project logout` | Delete this folder's local project key |
| `paracord alias init [name]` | Add a shell shortcut for paracord (recommended: `p`) |

## License

MIT
