@closedloop-ai/cli 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/dist/closedloop.js +128 -108
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,9 +25,10 @@ The npm package is `@closedloop-ai/cli`; users of the earlier `cl` CLI can updat
|
|
|
25
25
|
## Commands
|
|
26
26
|
|
|
27
27
|
- `closedloop login` (also `closedloop signup`): sign in, or create an account on the Free plan, with a code sent to your email.
|
|
28
|
+
- Which sign-in an account uses: an account with a password signs in with the password, and one whose workspace signs in with SSO uses SSO; both sign in through the browser with `closedloop login --sso`. Only a new email, or an account with neither (such as one made with `closedloop signup`), gets an emailed code. For any other account the code request is refused before an email is sent: `password_sign_in` for a password, `sso_required` for SSO, each naming `closedloop login --sso`.
|
|
28
29
|
- In a terminal, `closedloop login` asks for the email and the code. Before creating a new account it asks for the data region: United States (US, the default) or European Union (EU). Existing accounts keep their region and are not asked to choose another one.
|
|
29
30
|
- `--region us|eu` explicitly selects where a new account's data should live. For an agent creating an account, two runs: `closedloop signup --email you@example.com --region eu` sends the code; `closedloop login --email you@example.com --region eu --code BCDFG-HJKLM` finishes. Use `us` for the United States. Without a region, an agent creating a new account is refused with `region_required` before an email code is requested; existing accounts can still sign in without the flag. Add `--totp <code>` (or `--backup-code <code>`) when the account uses two-factor authentication.
|
|
30
|
-
- `closedloop login --sso`: sign in through your browser instead, for workspaces that sign in with SSO (Entra, Okta). Add `--region eu` or `--region us` to choose the initial sign-in region. It prints a link and a short code; open the link, sign in to the app, type the code and approve. An existing account automatically completes sign-in in its home region, even when the command started elsewhere. In a terminal it also copies the code to your clipboard and opens the link when you press Enter, then waits; an agent runs the printed command again after you approve, keeping its `--region` flag.
|
|
31
|
+
- `closedloop login --sso`: sign in through your browser instead, for accounts with a password and for workspaces that sign in with SSO (Entra, Okta). Add `--region eu` or `--region us` to choose the initial sign-in region. It prints a link and a short code; open the link, sign in to the app, type the code and approve. An existing account automatically completes sign-in in its home region, even when the command started elsewhere. In a terminal it also copies the code to your clipboard and opens the link when you press Enter, then waits; an agent runs the printed command again after you approve, keeping its `--region` flag.
|
|
31
32
|
- An email whose account is in the other region (US or EU) signs in there, and the session stays with that region.
|
|
32
33
|
- `--region` never moves an existing account. A saved sign-in and `closedloop whoami` show the account's actual region. If a connection fails after browser approval in another region, repeat the same printed command: the CLI retains that pending sign-in and its original expiry. A rejected or expired request starts again with a fresh link and code.
|
|
33
34
|
- A new account gets its own Free workspace unless the email was invited to one. One network can create three such accounts a day.
|
|
@@ -43,6 +44,14 @@ The npm package is `@closedloop-ai/cli`; users of the earlier `cl` CLI can updat
|
|
|
43
44
|
- `--domains acme.example,acme.example.org` confirms your colleagues' email domains and `--no-domains` confirms your company has none (every colleague then counts as a customer, so results are wrong). Only a person confirms them: in a terminal the CLI asks you to type `yes`; anyone else adds `--confirmed-by-user`, which an agent does only after its user said yes. Without it nothing is saved and the result's `instructions` say what to ask. A personal email domain (gmail.com and the like) is refused. Needs the right to change the workspace's settings.
|
|
44
45
|
- As JSON, a workspace whose domains still wait carries `instructions`: what an agent should ask its user.
|
|
45
46
|
- `--watch` checks every 30 seconds until the research is done or fails, for up to an hour.
|
|
47
|
+
- The research reads your website to learn your company, its products and its market; it is the basis for the suggested product structure and for analysing your insights, and usually takes a few minutes. Once it is done, `closedloop company` says what it learned (its description of your company and the other parts it covers: products and features, use cases, target persona, integrations, pricing) and, while products it suggested wait to be confirmed, how many and how to confirm them. As JSON the summary is `research.summary` and the count `products_suggested` (null when it could not be read).
|
|
48
|
+
- `--research` shows everything the research found, the whole research text (as JSON, the profile with `research.text`).
|
|
49
|
+
- `closedloop products`: your product structure, the products, areas (parts of a product) and features (parts of the product that exist, never planned work) your insights are filed against, with insight counts, then the products your company research suggested and has not had confirmed. As JSON it is the API's answer, whose `structure` can be edited and saved.
|
|
50
|
+
- `products confirm [name...]` adds the suggested products (all, or the ones named) to the structure; `products save --file <structure.json>` (or `--file -` for standard input) saves a structure of your own, either the whole `closedloop products --json` answer or only its `structure`. Products, areas and features left out are archived, never deleted. `--check` only checks.
|
|
51
|
+
- Both check the structure first and list every change. In a terminal the CLI asks you to type `yes`; anyone else adds `--yes`, which an agent does only after its user agreed. Without it nothing is saved and the result's `instructions` say what to ask. Saving needs an owner or admin; the next nightly recalculation then re-places needs and insights, charged in credits.
|
|
52
|
+
- `closedloop competitors`: the competitors ClosedLoop AI watches for in your insights, the same list as Settings, Company, Competitors in the app: each with its website, whether it is a direct competitor, how many times customers mentioned it, and where it came from (AI research, mentioned by customers, or manual). Insights that name one count as competitor mentions, shown on opportunities, features, customer profiles and the weekly brief. As JSON it is the API's `competitors` and `can_change`.
|
|
53
|
+
- `competitors add <name> [--website <url>] [--description <text>]` adds one as a direct competitor (adding one that was removed restores it); `competitors edit <name-or-id> [--name <name>] [--website <url>] [--description <text>]` changes only what you give (an empty value clears the website or description); `competitors remove <name-or-id>` marks it as not a competitor and takes it off the list, keeping the customer mentions behind it. A name matches in any case; one that matches none or several is refused with the candidates.
|
|
54
|
+
- A removal asks you to type `yes` in a terminal; anyone else adds `--yes`, which an agent does only after its user agreed. Without it nothing is removed and the result's `instructions` say what to ask. Adding, editing and removing need the right to change the workspace's settings (an owner or admin).
|
|
46
55
|
- `closedloop ingest [text]`: sends your own data in (feedback, notes, survey answers, transcripts) for the pipeline to turn into insights.
|
|
47
56
|
- One record from the words given, from `--stdin`, or from a text file; `--title`, `--from`, `--email` (ties the insight to their company when it matches a CRM contact), `--customer`, `--date`, `--url`, `--id` (a record with an id already sent is skipped) and `--tag` describe it.
|
|
48
57
|
- Many records from `--file` with a CSV (a header row; a `content` column, and any of `title, reporter_name, reporter_email, customer, date, url, id, tags` with tags separated by `;`), a JSON object or list, or JSON Lines. Sent in batches of 100 records or 4 MB.
|
|
@@ -77,7 +86,7 @@ The npm package is `@closedloop-ai/cli`; users of the earlier `cl` CLI can updat
|
|
|
77
86
|
- In the browser (OAuth), it opens the app's connect page and waits until the connection shows; an agent gets the link and runs the command again to check.
|
|
78
87
|
- Asana, Attio, Discord, Front, Granola, Pipedrive, Plaud, Read.ai, Stripe, Zendesk and Microsoft Teams connect in the browser without signing in to the app. The CLI opens a one-time link (valid for up to 10 minutes) that names the workspace; Continue there sends your browser back to the CLI on this computer, which finishes the connect, so a link someone forwards connects nothing. The command waits up to 15 minutes for the connection: in a terminal it shows the link and opens it when you press Enter; otherwise (an agent, a pipe) it opens the browser itself and prints one answer at the end, so an agent runs it with a long timeout or in the background. Asana needs `--field asana_workspace_gid=<id>` and Zendesk `--field zendesk_subdomain=<subdomain>` (a terminal asks for them).
|
|
79
88
|
- When the browser cannot come back to this computer, it gives the app's connect page instead (`status: browser_needed`, exit 0), with a `reason`: `remote_browser` (over SSH, in a Codespace, dev container, Gitpod, Cloud Shell, a container or Kubernetes), `no_local_listener` (the CLI could not listen on 127.0.0.1) or `browser_not_opened` (the browser could not be opened). `--in-app` asks for the app's connect page directly, for example when the confirm page's next step does not load. Settings given with `--field` are not used there; the app asks for them.
|
|
80
|
-
- Integrations set up only in the app get a link to it.
|
|
89
|
+
- Integrations set up only in the app get a link to it. Wherever the CLI sends you to the app it says how to sign in there: with your email address, since an account made in the CLI has no password: choose "Email me a code" and the app emails you a sign-in code.
|
|
81
90
|
- `--reconnect` connects again, for example with a new key.
|
|
82
91
|
- `closedloop integrations pause <name>` / `resume <name>`: stop syncing without disconnecting, and start again.
|
|
83
92
|
- `closedloop integrations disconnect <name>`: stops syncing after confirmation (`--yes` for agents); what was already imported stays.
|
|
@@ -87,6 +96,7 @@ The npm package is `@closedloop-ai/cli`; users of the earlier `cl` CLI can updat
|
|
|
87
96
|
- `usage by-source [--month 2026-10]`: a month's credits per integration or feature, largest first.
|
|
88
97
|
- `usage export [--month 2026-10] [--output file] [--force]`: saves the month's usage per day and integration as a CSV, never over an existing file unless `--force`.
|
|
89
98
|
- `closedloop plan`: your plan and what it includes; `plan upgrade` opens Plan & billing (payment happens in the browser), or gives an agent the link.
|
|
99
|
+
- `closedloop glossary`: what the words mean (product structure, product, area, feature, insight, opportunity, need, customer, competitor), as ClosedLoop AI defines them.
|
|
90
100
|
- `closedloop logout`: forgets the saved sign-in on this computer. Your other sessions, the web app included, stay signed in.
|
|
91
101
|
|
|
92
102
|
## How it looks
|