Metadata-Version: 2.5
Name: paracord
Version: 0.0.12
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.

### Project docs

`paracord docs` reads and writes the linked project's Docs page (its knowledge
base) as Markdown, with the folder's project key from `paracord setup` (or
`PARACORD_PROJECT_KEY`). Docs are addressed by the path Dash lists, built from
folder names and the title; `.md` is optional and case is ignored.

```bash
paracord docs list                              # every doc you can read
paracord docs list Processes                   # docs and empty folders under Processes
paracord docs list Processes --json
paracord docs folders                           # every folder; edit or read
paracord docs mkdir Processes/Clients           # create a folder and its parents
paracord docs get Processes/Onboarding.md       # Markdown to stdout
paracord docs put Processes/Onboarding.md --file onboarding.md
cat notes.md | paracord docs put Notes --visibility project
paracord docs put Notes --base-version sha256:... < notes.md
paracord docs mv Processes/Onboarding.md Processes/Client-onboarding.md
paracord docs mv Processes/Client-onboarding.md Archive/   # move, keep the name
paracord docs rm Notes.md --yes
paracord docs ls Processes                     # `ls` = `list`, `cat` = `get`
paracord docs grep -i -n "refund" Processes    # search titles and bodies
```

Shell names work too: `ls` is `list` and `cat` is `get`, with the same
arguments and output. `grep <pattern> [folder]` searches doc titles and bodies
with a regular expression (`-i` ignores case, `-l` prints only paths, `-n`
adds line numbers) and exits 1 when nothing matches, 2 on a bad pattern. Dash
runs the search (`docs/search/`, Postgres regex matched line by line; `\b` is
sent as Postgres's `\y`) and returns at most 20 lines per doc, 500 in all and
200 docs, saying so on stderr when it cuts. On a Dash host without the search
route, or for a pattern Postgres rejects (such as `(?P<name>...)`), `grep`
downloads the bodies of up to 200 docs (the first by path; titles of all are
searched) and searches them locally. `mkdir <path>` creates a folder and any
missing parents, like `mkdir -p` (`--json` prints `{"created", "folder"}`), on
the same rules as below; `put` and `mv` also create folders as needed.

To edit docs with your own tools, pull them into a folder and push them back:

```bash
paracord docs pull                      # every doc into .paracord/docs/<path>
paracord docs pull Processes --dir kb   # one folder, somewhere else
$EDITOR .paracord/docs/Processes/Onboarding.md
paracord docs push --dry-run            # what would change
paracord docs push --visibility project # new files are visible to the project
paracord docs push --delete             # also delete docs whose file you removed
```

`pull` writes each doc to `<dir>/<path from list>` and records its id, version,
path and a content hash in `<dir>/.paracord-docs.json`. Pulling again updates
files you have not edited, follows renames and removes docs deleted on Dash; a
file you edited (or deleted) is kept and reported, and pull exits 1, unless
`--force`. `push` compares every `.md` file in the folder with the manifest:

- an edited file is updated with the version you pulled as `base_version`, so a
  doc changed on Dash since then is reported as a conflict and never
  overwritten (copy your edits aside, `pull --force`, re-apply, push);
- a new file is created, its folders created on Dash (`--visibility` as for
  `put`; private by default); a new file at the path of a Dash doc you have
  not pulled is refused;
- a deleted file is deleted on Dash only with `--delete`;
- a file moved or renamed without edits is moved on Dash when exactly one
  missing and one new file share its content. Anything else (moved and edited,
  or several identical files) is a delete plus a create.

The manifest is saved after every successful request. Every change prints a
row, `--json` prints them all, and push exits 1 on any conflict or error.

`put` creates the doc when the path is new (private to you unless
`--visibility project` or `paracord`) and replaces its Markdown otherwise. It
refuses an empty stdin. Pass `--base-version` with the `version` from
`get --json` so a change made on Dash since you read the doc is not
overwritten; Dash answers with a conflict instead. `put` to a new path and `mv`
create any missing folders on Dash's Docs page rules (a new top-level folder
needs a contributor role and no Team "Limited to" scope; a subfolder needs edit
access to its parent), as does `mkdir`.
`mv` renames, moves to another folder, or both; a target ending in `/` keeps the
doc's name, and a target without a folder moves it to the top level.
`folders` lists every folder you can see, marked `edit` where this key can add
docs. `rm` asks first unless `--yes`; only the doc's author or a project admin
can delete it. Writes need a key approved with write access.

### Project context

`paracord context` prints everything a local session, such as Claude Code,
needs to start work on the linked project: the project and your role in it,
its docs and the org's General docs, open tasks and the requests they belong
to, connectors, variable names (never values) and recent activity. It is read
only and uses the folder's project key from `paracord setup` (or
`PARACORD_PROJECT_KEY`).

```bash
paracord context                           # Markdown, ready to pipe into an LLM
paracord context --json                    # the same bundle as JSON
paracord context --bodies                  # include doc contents (Dash caps their size)
paracord context --activity 50             # recent events, 0 to 100 (default 20)
paracord context --out .paracord/context.md  # write to a file and print its path
```

A `404` means the project is gone or you no longer have access; a `403` means
Dash refused the key for this project. Either way, `paracord setup` links the
folder again.

### Project tasks (work queue)

`paracord tasks` lets a local session, such as Claude Code, use the linked
project's Dash tasks as its work queue, with the folder's project key from
`paracord setup` (or `PARACORD_PROJECT_KEY`). Tasks are addressed by reference
(`PC-41`, any case) or id. Claiming and finishing need a key approved with
write access, a contributor role and edit access to the task.

```bash
paracord tasks list                             # open tasks in queue order
paracord tasks list --status all --assignee me --claimed mine --limit 100
paracord tasks next                             # the next task to pick up (read only)
paracord tasks next --start                     # claim it (asks again if another session won)
paracord tasks show PC-41
paracord tasks start PC-41                      # claim a specific task
paracord tasks done PC-41 --summary "The footer links work now."
paracord tasks done PC-41 --summary-file note.md   # or pipe the summary on stdin
paracord tasks release PC-41                    # give it back unfinished
paracord tasks release PC-41 --force            # owner or admin: clear a stale claim
```

`done` posts the summary as a comment the client sees, clears the claim and
moves the task to review. Write it in plain language for the client. A `done`
retried after a lost response counts as success when the task is already in
review. All commands take `--json`.

A claim belongs to you, the key and a session label, so two sessions on one
key never hold the same task. The label is `--session`, else
`$PARACORD_SESSION`, else `claude-code:$CLAUDE_SESSION_ID`, else
`local:<hostname>:<hash of the folder>`. The last one is shared by every
terminal in a folder, so give parallel sessions there their own `--session` or
`PARACORD_SESSION`, and use the same label to start, finish and release a task.
The `paracord-work` skill describes the loop for Claude Code.

### Client onboarding (Paracord staff)

`paracord onboarding` runs the adaptive onboarding loop on Dash: research
first, record inferred answers with citations, ask only the next few
questions, replan after every answer. Dash stores the state; the local
session does the thinking. It uses the folder's project key from
`paracord setup` (or `PARACORD_PROJECT_KEY`) and is for Paracord staff only:
a key minted by anyone else gets a `403` that says so. Writes need a key
approved with write access.

```bash
paracord onboarding start --mode full -t website -t data_automation   # reuses an existing one
paracord onboarding seed -t website -t data_automation:ads,finance    # seed banks from the skill
paracord onboarding seed --dry-run --json                             # what would be sent
paracord onboarding seed -t data_automation                           # general table + the client's connector-set sub-banks (else all)
paracord onboarding research                                          # a brief for the research session
paracord onboarding next --limit 5                                    # what to ask the client next
paracord onboarding questions --status inferred --section brand.voice
paracord onboarding show web-06
paracord onboarding answer web-06 --kind inferred --text "..." \
  --cite "https://example.com/services::We offer bookkeeping and payroll."
paracord onboarding answer web-01 --text "The owner signs off." --asked-via email
paracord onboarding confirm web-06                                    # or --correction "..."
paracord onboarding replan --note "Catering only" --moot web-17 --priority web-16=1
paracord onboarding replan --file plan.json                           # {"note", "add", "moot", "reprioritize"}
paracord onboarding upsert --file questions.json                      # at most 200, by key
paracord onboarding status                                            # coverage per kb_section
paracord onboarding events                                            # replan log
paracord onboarding update --status completed
```

`--kind` is `client` (default), `inferred` (needs at least one `--cite`) or
`rep_recap`. A citation is `URL::quote` or `doc path::quote`. `start` takes
`--scope org` (default, one per org) or `--scope project`; when a project
sees both, commands use the project one unless you pass `--onboarding <id>`.
`seed` defaults to the onboarding's templates (the fit bank in fit mode) and
never resets a question's status or priority. All commands take `--json`;
writes record `--author` (default: the session label, as for `paracord tasks`).
The `paracord-onboarding` skill describes the loop.

### Claude Code skills

The CLI ships Claude Code skills so every session working on a Paracord client
follows the same playbooks:

- `paracord-brand-kb`: the knowledge-base layout every client org keeps in its
  General project (brand voice, visuals, logos, audience; business offerings,
  pricing, people, tools, processes), claim statuses, citation format, and how
  to update docs with `paracord docs`.
- `paracord-onboarding`: the research-first adaptive interview (ask only the
  next 3 to 5 most unblocking questions, replan after every answer, done when KB
  coverage is confirmed), a fit mode for prospects, and seed question banks per
  template.
- `paracord-work`: working the project's Dash tasks as a queue, starting
  from `paracord context`, with `paracord tasks next --start`, `done --summary` written for the client, and
  `release` when abandoning.

```bash
paracord skills list                      # packaged skills and where they are installed
paracord skills install                   # into the linked folder's .claude/skills/
paracord skills install --user            # into ~/.claude/skills/ for every session
paracord skills install paracord-brand-kb # just one
paracord skills update                    # refresh installed skills after upgrading the CLI
```

`--project` (the default) uses the nearest folder linked with `paracord setup`
or `paracord project link`, else the current folder. Each installed skill keeps
a `.paracord-skill.json` with the hashes of the files as written. A skill you
edited is never replaced silently: install and update keep it, print the diff
the update would apply, and exit 1; rerun with `--force` to replace it. Files
you add to a skill folder are left alone. `paracord setup` offers to install
the skills into the folder it sets up.

## 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 context [--json] [--bodies] [--activity N] [--out FILE]` | Everything a local session needs to start on the linked project |
| `paracord docs list\|ls\|folders\|mkdir\|get\|cat\|put\|mv\|rm\|grep\|pull\|push` | The linked project's Dash docs as Markdown |
| `paracord tasks list\|next\|show\|start\|done\|release` | The linked project's Dash tasks as a work queue |
| `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 skills list\|install\|update` | Install the Claude Code skills shipped with the CLI |
| `paracord alias init [name]` | Add a shell shortcut for paracord (recommended: `p`) |

## License

MIT
