@efficient-erp/cli 0.0.0 → 1.140.1
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/LICENSE +10 -0
- package/README.md +23 -2
- package/bin/efficient.js +44 -0
- package/package.json +19 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Copyright (c) 2026 Efficient Pty Ltd. All rights reserved.
|
|
2
|
+
|
|
3
|
+
This software and its documentation are proprietary to Efficient Pty Ltd and
|
|
4
|
+
are confidential. No licence is granted to use, copy, modify, merge, publish,
|
|
5
|
+
distribute, sublicense or sell this software, in whole or in part, except
|
|
6
|
+
under a written agreement with Efficient Pty Ltd.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
9
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
10
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
package/README.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @efficient-erp/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`efficient`, the command-line client for the EFFICIENT ERP API: everything the
|
|
4
|
+
web portals can do, over plain HTTP, for AI agents and for people who prefer a
|
|
5
|
+
terminal. Every request goes through the same permission-checked, audit-logged
|
|
6
|
+
API the portals use, as the user who signed in.
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
```bash
|
|
9
|
+
npm install -g @efficient-erp/cli
|
|
10
|
+
efficient profile add work --url https://<your-tenant-host> --default
|
|
11
|
+
efficient login --email you@company.com
|
|
12
|
+
efficient guide
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Prebuilt for macOS on Apple silicon, Linux x64 (glibc 2.34 or newer) and
|
|
16
|
+
Windows x64. npm installs only the binary for your machine. There is no npm
|
|
17
|
+
build for Intel Macs.
|
|
18
|
+
|
|
19
|
+
To let an MCP host with no shell (Claude Desktop, Cursor chat) drive it:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{ "mcpServers": { "efficient": { "command": "npx", "args": ["-y", "@efficient-erp/cli", "mcp"] } } }
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2026 Efficient Pty Ltd. All rights reserved. Use requires an
|
|
26
|
+
EFFICIENT account and is subject to your agreement with Efficient Pty Ltd.
|
package/bin/efficient.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// The `efficient` command npm puts on PATH. The CLI itself is a native binary
|
|
5
|
+
// in a per-platform package, @efficient-erp/cli-<platform>-<arch>; npm installs
|
|
6
|
+
// only the one whose `os`/`cpu` match this machine, and this file runs it with
|
|
7
|
+
// the same arguments, stdio and exit status. Built by npm/pack.mjs.
|
|
8
|
+
|
|
9
|
+
const { spawnSync } = require('node:child_process');
|
|
10
|
+
const { accessSync, chmodSync, constants } = require('node:fs');
|
|
11
|
+
const { dirname, join } = require('node:path');
|
|
12
|
+
|
|
13
|
+
const platformPackage = `@efficient-erp/cli-${process.platform}-${process.arch}`;
|
|
14
|
+
const exe = process.platform === 'win32' ? 'efficient.exe' : 'efficient';
|
|
15
|
+
|
|
16
|
+
let binary;
|
|
17
|
+
try {
|
|
18
|
+
binary = join(dirname(require.resolve(`${platformPackage}/package.json`)), 'bin', exe);
|
|
19
|
+
} catch {
|
|
20
|
+
const supported = Object.keys(require('../package.json').optionalDependencies || {})
|
|
21
|
+
.map((name) => name.replace('@efficient-erp/cli-', ''))
|
|
22
|
+
.join(', ');
|
|
23
|
+
console.error(`efficient: no binary for ${process.platform}-${process.arch} (${platformPackage} is not installed).`);
|
|
24
|
+
console.error(`Built for: ${supported}. On one of those, reinstall without --omit=optional / --no-optional.`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// npm keeps the executable bit, but an unpacker that drops it would leave a
|
|
29
|
+
// binary that fails with EACCES. Put it back rather than fail.
|
|
30
|
+
if (process.platform !== 'win32') {
|
|
31
|
+
try {
|
|
32
|
+
accessSync(binary, constants.X_OK);
|
|
33
|
+
} catch {
|
|
34
|
+
try { chmodSync(binary, 0o755); } catch { /* the spawn below reports it */ }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: 'inherit', windowsHide: false });
|
|
39
|
+
if (result.error) {
|
|
40
|
+
console.error(`efficient: could not run ${binary}: ${result.error.message}`);
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
if (result.signal) process.kill(process.pid, result.signal);
|
|
44
|
+
process.exit(result.status ?? 1);
|
package/package.json
CHANGED
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@efficient-erp/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "efficient: the command-line client for the EFFICIENT ERP API
|
|
3
|
+
"version": "1.140.1",
|
|
4
|
+
"description": "efficient: the command-line client for the EFFICIENT ERP API",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Efficient Pty Ltd",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/Efficient-Pty-Ltd/efficient-cli.git"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"efficient": "bin/efficient.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=18"
|
|
21
|
+
},
|
|
22
|
+
"optionalDependencies": {
|
|
23
|
+
"@efficient-erp/cli-darwin-arm64": "1.140.1",
|
|
24
|
+
"@efficient-erp/cli-linux-x64": "1.140.1",
|
|
25
|
+
"@efficient-erp/cli-win32-x64": "1.140.1"
|
|
10
26
|
}
|
|
11
|
-
}
|
|
27
|
+
}
|