@helm-ai/cli 0.15.0

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.
Files changed (3) hide show
  1. package/README.md +158 -0
  2. package/dist/cli.js +3990 -0
  3. package/package.json +50 -0
package/README.md ADDED
@@ -0,0 +1,158 @@
1
+ # Helm CLI
2
+
3
+ [![npm version](https://img.shields.io/npm/v/@helm-ai/cli.svg)](https://www.npmjs.com/package/@helm-ai/cli)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Command line interface for [Helm](https://gethelm.ai) — run your business operations (projects, customers, billing, automations, and AI agents) from the terminal.
7
+
8
+ ## What is Helm?
9
+
10
+ [Helm](https://gethelm.ai) is the AI Operations Platform for founder-led business — AI agents take on the operational work so your team is free for the work that matters. Customers, projects, time and billing, documents, automations, and AI staff live in one place that runs itself.
11
+
12
+ ## Why a CLI?
13
+
14
+ The web app is where you think; the CLI is where you script. It exists for the work that is awkward to click through:
15
+
16
+ - **Bulk import** — CSV in, records out, with duplicate detection that runs once rather than per row.
17
+ - **Scripting and CI** — every command speaks JSON, so `helm-ai task list` pipes straight into `jq`.
18
+ - **Working where your code lives** — drop a `.helm` file in a repo and every command in that directory targets the right workspace automatically.
19
+ - **Agents and automation** — the same operations your AI staff perform, available to any script you write.
20
+
21
+ ## Installation
22
+
23
+ ```bash
24
+ npm install -g @helm-ai/cli
25
+ ```
26
+
27
+ Requires Node.js 20 or later. The binary is `helm-ai`.
28
+
29
+ If you want a shorter command, alias it yourself — `alias h=helm-ai`. The CLI deliberately does not claim the `helm` binary, which belongs to the Kubernetes package manager.
30
+
31
+ ## Quick Start
32
+
33
+ ### 1. Get your API key
34
+
35
+ In Helm, go to **Settings → API Keys** and create one. Keys are scoped to a single workspace.
36
+
37
+ ### 2. Log in
38
+
39
+ ```bash
40
+ helm-ai login
41
+ ```
42
+
43
+ Prompts for the key and saves it to `~/.helm/config.yaml`. To skip the prompt (CI, scripts):
44
+
45
+ ```bash
46
+ helm-ai login --api-key helm_sk_xxx
47
+ ```
48
+
49
+ ### 3. Check it worked
50
+
51
+ ```bash
52
+ helm-ai whoami
53
+ ```
54
+
55
+ Reports the resolved profile, the workspace it points at, and *why* that profile was chosen — which is usually the answer when a command touches the wrong workspace.
56
+
57
+ ## Profiles
58
+
59
+ An API key is scoped to one workspace, so each workspace gets its own profile.
60
+
61
+ ```bash
62
+ helm-ai login --profile acme # save a second workspace
63
+ helm-ai profile list # what is saved
64
+ helm-ai profile use acme # change the default
65
+ helm-ai profile current # which one applies here, and why
66
+ ```
67
+
68
+ A profile is chosen in this order, highest first:
69
+
70
+ 1. `--profile <name>` on the command
71
+ 2. `HELM_PROFILE` environment variable
72
+ 3. A `.helm` file, searched upward from the current directory
73
+ 4. `defaultProfile` in `~/.helm/config.yaml`
74
+
75
+ The `.helm` file is the useful one: put a single profile name in it at the root of a repo, and everything run inside that repo targets the matching workspace without a flag.
76
+
77
+ `HELM_API_KEY`, `HELM_API_URL` and `HELM_WORKSPACE_ID` override the *fields* of whichever profile is selected. They do not change which profile is selected.
78
+
79
+ ## Commands
80
+
81
+ Every resource follows the same shape — `list`, `get <id>`, `create`, `update <id>`, and whatever verbs that resource genuinely has.
82
+
83
+ | Group | What it covers |
84
+ |---|---|
85
+ | `project`, `task`, `time` | Delivery: projects, tasks, comments, time entries |
86
+ | `account`, `contact`, `deal`, `pipeline` | Customers: companies, people, and the sales pipeline |
87
+ | `invoice`, `estimate`, `product` | Money: billing documents and the product catalog |
88
+ | `doc` | Rich-text documents, folders, and pages |
89
+ | `calendar` | Events and meetings |
90
+ | `form`, `sequence`, `email` | Capture and follow-up |
91
+ | `workflow`, `template` | Automations and reusable project structures |
92
+ | `agent` | AI staff — schedules, objectives, and runs |
93
+ | `import` | Bulk import of people, accounts, deals and tasks from CSV/JSON |
94
+ | `login`, `logout`, `whoami`, `profile`, `config` | Credentials and settings |
95
+
96
+ Run `helm-ai --help` for the full list, or `helm-ai <group> --help` for one group.
97
+
98
+ ### Examples
99
+
100
+ ```bash
101
+ # What is on your plate
102
+ helm-ai task list --status in_progress
103
+
104
+ # Add something without leaving the terminal
105
+ helm-ai task create --title "Fix the webhook retry" --project <project-id>
106
+
107
+ # Close it out
108
+ helm-ai task complete TASK-42
109
+ helm-ai task comment TASK-42 "Shipped in 1.4.2"
110
+
111
+ # Log the time against it
112
+ helm-ai time log --task TASK-42 --duration 90m --description "Webhook retry fix"
113
+
114
+ # Bulk import people — dry-run first, which is the default
115
+ helm-ai import people ./leads.csv
116
+ helm-ai import people ./leads.csv --apply
117
+ ```
118
+
119
+ ## Output formats
120
+
121
+ ```bash
122
+ helm-ai task list --output json # table | json | ndjson | csv | yaml
123
+ ```
124
+
125
+ The default depends on where output is going: a **table** when you are looking at a terminal, **JSON** when the output is piped or redirected. So this works without a flag:
126
+
127
+ ```bash
128
+ helm-ai task list | jq '.[] | select(.priority == "high") | .title'
129
+ ```
130
+
131
+ Single-record commands (`helm-ai task get <id>`) default to JSON, since one record does not table well.
132
+
133
+ ## Scripting notes
134
+
135
+ - **Imports are a dry run until you say otherwise.** `helm-ai import <entity> <file>` reports what it *would* do; add `--apply` to write. Entities: `people`, `accounts`, `deals`, `tasks`.
136
+ - **Rate limits are handled for you.** The client retries on `429` (honouring `Retry-After`) and on `5xx` with exponential backoff, five attempts maximum. You do not need a retry loop.
137
+ - **Exit codes mean something.** Any failure exits non-zero with the reason on stderr, so `set -e` behaves.
138
+ - **Output stays clean when piped.** The startup banner is suppressed whenever output is not a terminal.
139
+
140
+ ## Environment variables
141
+
142
+ | Variable | Effect |
143
+ |---|---|
144
+ | `HELM_API_KEY` | Overrides the selected profile's key |
145
+ | `HELM_API_URL` | Overrides the API endpoint |
146
+ | `HELM_WORKSPACE_ID` | Overrides the workspace |
147
+ | `HELM_PROFILE` | Selects which profile to use |
148
+
149
+ Set `HELM_API_KEY` in CI rather than committing a config file.
150
+
151
+ ## Related
152
+
153
+ - [`@helm-ai/mcp-server`](https://www.npmjs.com/package/@helm-ai/mcp-server) — the same operations as MCP tools, for Claude and other MCP-compatible assistants.
154
+ - [Documentation](https://gethelm.ai/docs)
155
+
156
+ ## License
157
+
158
+ MIT