Metadata-Version: 2.4
Name: pollaris-cli
Version: 0.1.0
Summary: Agent-friendly Pollaris CLI and MCP bridge
Project-URL: Repository, https://github.com/devsapariya94/Pollaris
Project-URL: Documentation, https://github.com/devsapariya94/Pollaris/blob/main/cli/README.md
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27
Requires-Dist: keyring>=25
Requires-Dist: cryptography>=43
Provides-Extra: mcp
Requires-Dist: mcp<3,>=2; extra == "mcp"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"

# Pollaris CLI

Create and publish Pollaris forms from terminal-capable agents. The CLI starts a
browser authorization flow when needed, preserves the original operation, and resumes
it after the user grants access. It returns an authorization URL; it does not open
a browser automatically.

Development install from the repository root:

```bash
uv tool install --editable ./cli
```

For package publication and production testing, see [publishing](PUBLISHING.md).

For the optional local MCP bridge, include its dependencies:

```bash
uv tool install --editable './cli[mcp]'
```

Point the CLI at an agent-enabled deployment (see [server setup](../docs/mcp/agent-access.md)):

```bash
export POLLARIS_API_URL=https://api.example.com
pollaris capabilities --json
```

Create a form:

```bash
pollaris forms create \
  --prompt "Create a short library feedback form" \
  --publish \
  --wait \
  --json
```

When the command returns `requires_authorization`, open `authorization.url` and
run the returned `next_action.command`. The finished result contains
`form.public_url`.

Creation publishes by default. Use `--draft-only` to create an editable draft.
`--wait` polls for completion up to `--timeout` seconds (default: 45); a pending
job can be checked with `pollaris jobs get JOB_ID --json` or
`pollaris jobs wait JOB_ID --json`.

To update or publish an existing form, inspect it first with
`pollaris forms get FORM_ID --json`, then pass its current `draft_revision` as
`--expected-revision` to `forms save` or `forms publish`. Saving also requires
`--definition path/to/definition.json`.

Use `pollaris --help` and each command's `--help` for options. Credentials use an
OS keychain, or encrypted file storage configured by `POLLARIS_CLI_SECRET_KEY`
(a Fernet key) on headless hosts. Local state defaults to `~/.config/pollaris`;
`POLLARIS_CLI_HOME` overrides it and `--profile` selects a separate profile.

See [OAuth agent access](../docs/mcp/agent-access.md), [MCP tools](../docs/mcp/tools.md),
and the [integration index](../docs/README.md) for deployment and connection guides.
