@embedder/embedder 2.1.17 → 3.0.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/bin/embedder ADDED
@@ -0,0 +1,91 @@
1
+ #!/usr/bin/env node
2
+
3
+ const childProcess = require("child_process");
4
+ const fs = require("fs");
5
+ const path = require("path");
6
+ const os = require("os");
7
+
8
+ function run(target) {
9
+ const result = childProcess.spawnSync(target, process.argv.slice(2), {
10
+ stdio: "inherit",
11
+ });
12
+ if (result.error) {
13
+ console.error(result.error.message);
14
+ process.exit(1);
15
+ }
16
+ const code = typeof result.status === "number" ? result.status : 0;
17
+ process.exit(code);
18
+ }
19
+
20
+ const envPath = process.env.EMBEDDER_BIN_PATH;
21
+ if (envPath) {
22
+ run(envPath);
23
+ }
24
+
25
+ const scriptPath = fs.realpathSync(__filename);
26
+ const scriptDir = path.dirname(scriptPath);
27
+
28
+ const platformMap = {
29
+ darwin: "darwin",
30
+ linux: "linux",
31
+ win32: "windows",
32
+ };
33
+ const archMap = {
34
+ x64: "x64",
35
+ arm64: "arm64",
36
+ };
37
+
38
+ let platform = platformMap[os.platform()];
39
+ if (!platform) {
40
+ platform = os.platform();
41
+ }
42
+ let arch = archMap[os.arch()];
43
+ if (!arch) {
44
+ arch = os.arch();
45
+ }
46
+ const base = "@embedder/embedder-" + platform + "-" + arch;
47
+ const binary = platform === "windows" ? "embedder.exe" : "embedder";
48
+
49
+ function findBinary(startDir) {
50
+ let current = startDir;
51
+ for (;;) {
52
+ const modules = path.join(current, "node_modules");
53
+ if (fs.existsSync(modules)) {
54
+ // Check for scoped package
55
+ const scopedDir = path.join(modules, "@embedder");
56
+ if (fs.existsSync(scopedDir)) {
57
+ const entries = fs.readdirSync(scopedDir);
58
+ for (const entry of entries) {
59
+ const expectedName = "embedder-" + platform + "-" + arch;
60
+ if (entry === expectedName) {
61
+ const candidate = path.join(scopedDir, entry, "bin", binary);
62
+ if (fs.existsSync(candidate)) {
63
+ return candidate;
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ const parent = path.dirname(current);
70
+ if (parent === current) {
71
+ return;
72
+ }
73
+ current = parent;
74
+ }
75
+ }
76
+
77
+ const resolved = findBinary(scriptDir);
78
+ if (!resolved) {
79
+ console.error(
80
+ 'It seems that your package manager failed to install the right version of the embedder CLI for your platform. You can try manually installing the "' +
81
+ base +
82
+ '" package'
83
+ );
84
+ process.exit(1);
85
+ }
86
+
87
+ run(resolved);
88
+
89
+
90
+
91
+
package/package.json CHANGED
@@ -1,23 +1,29 @@
1
1
  {
2
2
  "name": "@embedder/embedder",
3
- "version": "2.1.17",
4
- "license": "UNLICENSED",
5
- "type": "module",
6
- "engines": {
7
- "node": ">=20"
3
+ "version": "3.0.1",
4
+ "description": "AI-powered embedded systems development tool",
5
+ "bin": {
6
+ "embedder": "./bin/embedder"
8
7
  },
9
- "dependencies": {
10
- "@sentry/node": "^10.12.0",
11
- "@sentry/react": "^10.12.0",
12
- "@serialport/bindings-cpp": "^13.0.1",
13
- "@serialport/stream": "^13.0.0",
14
- "signal-exit": "3.0.7"
8
+ "scripts": {
9
+ "postinstall": "node ./postinstall.mjs"
15
10
  },
16
- "devDependencies": {},
17
- "pnpmPatchedDependencies": {
18
- "fullscreen-ink@0.1.0": "patches/fullscreen-ink.patch"
11
+ "optionalDependencies": {
12
+ "@embedder/embedder-darwin-arm64": "3.0.1",
13
+ "@embedder/embedder-darwin-x64": "3.0.1",
14
+ "@embedder/embedder-linux-x64": "3.0.1",
15
+ "@embedder/embedder-windows-x64": "3.0.1"
19
16
  },
20
- "bin": {
21
- "embedder": "cli.js"
22
- }
17
+ "license": "MIT",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/embedder-dev/embedder-cli"
21
+ },
22
+ "keywords": [
23
+ "embedder",
24
+ "ai",
25
+ "embedded",
26
+ "cli",
27
+ "development"
28
+ ]
23
29
  }
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "node:fs";
4
+ import { createRequire } from "node:module";
5
+ import os from "node:os";
6
+ import path from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
+ const require = createRequire(import.meta.url);
11
+
12
+ function detectPlatformAndArch() {
13
+ let platform;
14
+ switch (os.platform()) {
15
+ case "darwin":
16
+ platform = "darwin";
17
+ break;
18
+ case "linux":
19
+ platform = "linux";
20
+ break;
21
+ case "win32":
22
+ platform = "windows";
23
+ break;
24
+ default:
25
+ platform = os.platform();
26
+ break;
27
+ }
28
+
29
+ let arch;
30
+ switch (os.arch()) {
31
+ case "x64":
32
+ arch = "x64";
33
+ break;
34
+ case "arm64":
35
+ arch = "arm64";
36
+ break;
37
+ default:
38
+ arch = os.arch();
39
+ break;
40
+ }
41
+
42
+ return { platform, arch };
43
+ }
44
+
45
+ function findBinary() {
46
+ const { platform, arch } = detectPlatformAndArch();
47
+ const packageName = `@embedder/embedder-${platform}-${arch}`;
48
+ const binaryName = platform === "windows" ? "embedder.exe" : "embedder";
49
+
50
+ try {
51
+ const packageJsonPath = require.resolve(`${packageName}/package.json`);
52
+ const packageDir = path.dirname(packageJsonPath);
53
+ const binaryPath = path.join(packageDir, "bin", binaryName);
54
+
55
+ if (!fs.existsSync(binaryPath)) {
56
+ throw new Error(`Binary not found at ${binaryPath}`);
57
+ }
58
+
59
+ return { binaryPath, binaryName, packageName };
60
+ } catch (error) {
61
+ throw new Error(`Could not find package ${packageName}: ${error.message}`);
62
+ }
63
+ }
64
+
65
+ async function main() {
66
+ try {
67
+ if (os.platform() === "win32") {
68
+ console.log("Windows detected: binary setup complete");
69
+ return;
70
+ }
71
+
72
+ const { binaryPath, packageName } = findBinary();
73
+ console.log(`Platform binary verified: ${packageName}`);
74
+ console.log(`Binary location: ${binaryPath}`);
75
+ } catch (error) {
76
+ console.error("Failed to setup embedder binary:", error.message);
77
+ console.error(
78
+ "You may need to manually install the platform-specific package.",
79
+ );
80
+ process.exit(1);
81
+ }
82
+ }
83
+
84
+ try {
85
+ main();
86
+ } catch (error) {
87
+ console.error("Postinstall script error:", error.message);
88
+ process.exit(0);
89
+ }
package/LICENSE DELETED
@@ -1,30 +0,0 @@
1
- Copyright (c) 2025 Embedder Tech Inc.
2
-
3
- All rights reserved.
4
-
5
- PROPRIETARY AND CONFIDENTIAL
6
-
7
- This software and associated documentation files (the "Software") are the exclusive
8
- property of Embedder Tech Inc. and are protected by copyright laws and international
9
- treaty provisions.
10
-
11
- RESTRICTED USE: You are NOT permitted to:
12
- - Use, copy, modify, merge, publish, distribute, sublicense, or sell the Software
13
- - Reverse engineer, decompile, or disassemble the Software
14
- - Remove or alter any proprietary notices or labels on the Software
15
- - Create derivative works based on the Software
16
- - Transfer your rights to the Software to any third party
17
-
18
- The Software is licensed, not sold. No title to or ownership of the Software is
19
- transferred to you.
20
-
21
- DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
22
- EMBEDDER TECH INC. DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
23
- LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
24
- NON-INFRINGEMENT. IN NO EVENT SHALL EMBEDDER TECH INC. BE LIABLE FOR ANY DAMAGES
25
- WHATSOEVER ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE.
26
-
27
- For licensing inquiries, contact: Embedder Tech Inc.
28
-
29
- Unauthorized use of this Software is prohibited and may result in severe civil
30
- and criminal penalties.
package/README.md DELETED
@@ -1,55 +0,0 @@
1
- # Embedder
2
-
3
- ![](https://img.shields.io/badge/Node.js-18%2B-brightgreen?style=flat-square) [![npm]](https://www.npmjs.com/package/@embedder/embedder)
4
-
5
- [npm]: https://img.shields.io/npm/v/@embedder/embedder.svg?style=flat-square
6
-
7
- Embedder is an AI coding tool that lives in your terminal, specializing in embedded software development. It understands your hardware, indexes datasheets and reference manuals, and helps you write and test firmware faster by executing routine tasks, debugging on real hardware, and handling complex peripheral configurations.
8
-
9
- **Learn more in the [official documentation](https://docs.embedder.dev)**.
10
-
11
- ## Get started
12
-
13
- 1. Install Embedder:
14
-
15
- ```sh
16
- npm install -g @embedder/embedder
17
- ```
18
-
19
- 2. Navigate to your project directory and run `embedder`.
20
-
21
- ## What Makes Embedder Different
22
-
23
- Embedder is built specifically for embedded systems:
24
-
25
- - **Hardware-Aware**: Understands microcontroller peripherals (GPIO, SPI, I²C, UART, ADC, DMA, timers, interrupts), memory constraints, and real-time requirements
26
- - **Documentation Intelligence**: Indexes datasheets, reference manuals, and schematics to generate code based on your actual hardware specs
27
- - **Real Hardware Integration**: Connects with serial ports, debuggers, logic analyzers, and oscilloscopes to validate and debug on physical devices
28
- - **Embedded Expertise**: Deep knowledge of RTOS systems, low-level driver development, and MISRA-C/C++ compliance
29
-
30
- ## Supported Platforms
31
-
32
- Works with any embedded platform including ESP32, STM32, nRF, Raspberry Pi Pico, Arduino, and more. Compatible with all major toolchains including GCC, IAR, Keil, and vendor-specific compilers.
33
-
34
- ## Connect on Discord
35
-
36
- Join the [Embedder Discord](https://discord.com/invite/NMT5ndEyxk) to connect with other embedded developers. Get help, share feedback, and discuss your projects with the community.
37
-
38
- ## Data collection, usage, and retention
39
-
40
- When you use Embedder, we collect feedback, which includes usage data.
41
-
42
- ### How we use your data
43
-
44
- We use your data to:
45
- - Provide and maintain our services
46
- - Improve our services and develop new features
47
- - Provide customer support and technical assistance
48
-
49
- All codebase indexing happens locally on your machine. For cloud features, we offer enterprise agreements with strict data isolation and compliance with ITAR, ISO 27001, and other standards.
50
-
51
- ### Privacy safeguards
52
-
53
- We have implemented several safeguards to protect your data, including limited retention periods for sensitive information, restricted access to user session data, and clear policies against using feedback for model training without consent.
54
-
55
- For full details, please review our [Terms of Service](https://embedder.dev/terms-of-service) and [Privacy Policy](https://embedder.dev/privacy-policy).
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var o=function e(){var o=!1;try{o=this instanceof e}catch{}return o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),o}export{o as a,e as c,t as g};