@invinite-org/invinite-cli 0.1.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.
package/README.md ADDED
@@ -0,0 +1,83 @@
1
+ # Invinite CLI
2
+
3
+ Command-line access to the [Invinite](https://invinite.com) Web API. Manage your
4
+ workspace — companies, lists, charts, alerts, documents, and more — from the
5
+ terminal, authenticated with your own account.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @invinite-org/invinite-cli
11
+ ```
12
+
13
+ Requires Node.js 18+. This installs the `inv` command.
14
+
15
+ ## Getting started
16
+
17
+ ```bash
18
+ inv login # sign in via your browser
19
+ inv --help # list all commands
20
+ ```
21
+
22
+ `inv login` opens a browser for authentication and stores a token in your OS
23
+ keychain (Keychain on macOS, libsecret on Linux, Credential Manager on Windows).
24
+ If no keychain is available it falls back to `~/.invinite/credentials.json`
25
+ (mode `0600`) with a warning.
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ inv [--team-id <id>] [--format json|table] <command>
31
+ ```
32
+
33
+ Special commands:
34
+
35
+ | Command | Description |
36
+ | --- | --- |
37
+ | `inv login` | Sign in via browser |
38
+ | `inv logout` | Revoke and remove the stored token |
39
+ | `inv config set <key> <value>` | Set `token`, `api-url`, or `team` |
40
+ | `inv config get <key>` | Read a configuration value |
41
+ | `inv teams select --id <teamId>` | Set the default team |
42
+ | `inv api <method> <path> [--body <json>]` | Raw authenticated API request |
43
+
44
+ All other commands are generated from the API's endpoint registry and follow
45
+ `inv <group> <action> [--flags]`. Run `inv --help` to list every group, or
46
+ `inv <group>` to list a group's actions and their flags. Flags map to request
47
+ fields (kebab-case, e.g. `--company-id`); values are parsed as JSON when valid,
48
+ otherwise treated as strings.
49
+
50
+ ```bash
51
+ inv --help # all groups
52
+ inv companies # actions + flags for the "companies" group
53
+ inv --format table companies list
54
+ ```
55
+
56
+ ## Configuration
57
+
58
+ Non-secret defaults live in `~/.invinite/config.json` (API URL, default team,
59
+ output format). Precedence for every setting is: per-command flag → environment
60
+ variable → stored config → built-in default.
61
+
62
+ | Variable | Purpose |
63
+ | --- | --- |
64
+ | `INVINITE_CLI_URL` | API base URL (default `https://api.invinite.com`) |
65
+ | `INVINITE_CLI_TOKEN` | Bearer token (takes precedence over the keychain) |
66
+ | `INVINITE_CLI_TEAM_ID` | Default team |
67
+ | `INVINITE_CLI_CONFIG_DIR` | Override the `~/.invinite` config directory |
68
+
69
+ ### Pointing at a different environment
70
+
71
+ The CLI is environment-agnostic — the same binary talks to whichever API URL you
72
+ give it, and credentials are stored per URL so you can stay logged into more than
73
+ one at once:
74
+
75
+ ```bash
76
+ inv config set api-url https://api.invinite.com # production (default)
77
+ # or, per invocation:
78
+ INVINITE_CLI_URL=https://api.invinite.com inv companies list
79
+ ```
80
+
81
+ ## License
82
+
83
+ See the repository for license details.