Metadata-Version: 2.4
Name: pollaris-cli
Version: 0.1.2
Summary: Agent-friendly Pollaris CLI and MCP bridge
Project-URL: Documentation, http://docs.pollaris.cc/docs/cli/overview
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 your terminal or terminal-capable agents.
In a terminal, the CLI opens your browser for login, explains the next step, and
continues your original command automatically after you approve access. Credentials
are saved for later commands. The default endpoint is `https://api.pollaris.cc`.

Install the published package:

```bash
uv tool install pollaris-cli
```

Read the [CLI documentation](http://docs.pollaris.cc/docs/cli/overview).

For the optional local MCP bridge, include its dependencies:

```bash
uv tool install 'pollaris-cli[mcp]'
```

Connect to Pollaris:

```bash
pollaris auth login
```

Create a form:

```bash
pollaris forms create \
  --prompt "Create a short library feedback form" \
  --draft-only
```

No separate login command is required: creating a form also logs you in if needed.
Use `--json` for one machine-readable result on stdout; terminal progress and login
instructions go to stderr. Published forms include `form.public_url` in the result.

Creation publishes by default. Use `--draft-only` to create an editable draft.
Terminal commands wait automatically for up to 300 seconds. `--timeout` changes
that limit, and `--no-wait` returns immediately. Use `--no-browser` to open the
displayed login link yourself while the command waits. If you interrupt with Ctrl+C
or the wait times out, use the displayed resume command to continue the saved
operation without creating another form.

For agents and scripts, use `--non-interactive` to disable browser opening and
progress, and return immediately unless `--wait` is set. When stdin or stderr is
not a terminal, this behavior is automatic. The default wait limit in this mode is
45 seconds. For example:

```bash
pollaris forms create --prompt "Create a short library feedback form" \
  --draft-only --non-interactive --json
```

When this returns `requires_authorization`, open `authorization.url` and run
`next_action.command` after approval. `--wait` polls for completion; 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.
The CLI always connects to Pollaris production. No endpoint configuration is needed.
Profiles keep separate login sessions, not separate deployments. Old profiles with
custom endpoints are reset to production and require a new login.

See [installation](http://docs.pollaris.cc/docs/cli/install),
[creating forms](http://docs.pollaris.cc/docs/cli/create-forms), and
[agent connections](http://docs.pollaris.cc/docs/cli/agent-connections).
