{"id":16661,"library":"oui","title":"OUI MAC Address Lookup CLI","description":"The `oui` package provides a command-line interface (CLI) tool for looking up vendor information associated with MAC addresses within the IEEE Organizationally Unique Identifier (OUI) database. As of version 13.1.7, this package is exclusively a CLI utility, meaning it does not expose any JavaScript or TypeScript APIs for programmatic usage. For developers requiring programmatic access to the OUI data or a library interface, the `oui-data` package is the designated alternative. The project maintains an active development status, with major versions often introducing breaking changes such as Node.js version requirements, removal of features like `search` and `update`, and changes in data sources. Its primary differentiator is its simplicity as a direct command-line lookup tool, relying on the official IEEE data source since version 12.0.0.","status":"active","version":"13.1.7","language":"javascript","source_language":"en","source_url":"https://github.com/silverwind/oui","tags":["javascript"],"install":[{"cmd":"npm install oui","lang":"bash","label":"npm"},{"cmd":"yarn add oui","lang":"bash","label":"yarn"},{"cmd":"pnpm add oui","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Since v13.0.0, the `oui` package is CLI-only. For programmatic access to OUI data, use the `oui-data` package.","wrong":"import { oui } from 'oui';\nimport oui from 'oui';\nconst oui = require('oui');","symbol":"oui","correct":"This package is CLI-only. Do not import `oui` into JavaScript/TypeScript code."},{"note":"The `search` function was removed in v13.0.0. The CLI itself only supports direct MAC address lookup.","wrong":"import { search } from 'oui';","symbol":"search","correct":"This feature has been removed. Use the CLI directly for lookup."},{"note":"The `update` function, previously used to refresh the OUI database, was removed in v13.0.0.","wrong":"import { update } from 'oui';","symbol":"update","correct":"This feature has been removed."}],"quickstart":{"code":"// This package is CLI-only. For direct programmatic access to OUI data,\n// consider using the 'oui-data' package (npm install oui-data).\n\n// Example: Using the 'oui' CLI tool via Node.js child_process\nconst { exec } = require('child_process');\n\nconst macAddressToLookup = '20:37:06:12:34:56';\n\nconsole.log(`Looking up vendor for MAC: ${macAddressToLookup}...\\n`);\n\nexec(`oui ${macAddressToLookup}`, (error, stdout, stderr) => {\n  if (error) {\n    console.error(`Error executing oui CLI: ${error.message}`);\n    return;\n  }\n  if (stderr) {\n    console.error(`CLI stderr: ${stderr}`);\n  }\n  console.log(`Vendor Information:\\n${stdout.trim()}`);\n\n  // Example of how you would use 'oui-data' if installed:\n  /*\n  import { lookupMacAddress } from 'oui-data';\n  (async () => {\n    try {\n      const vendorInfo = await lookupMacAddress('20:37:06:12:34:56');\n      console.log('\\n(Programmatic lookup via oui-data):', vendorInfo);\n    } catch (e) {\n      console.error('Error looking up via oui-data:', e);\n    }\n  })();\n  */\n});","lang":"javascript","description":"Demonstrates how to install and use the `oui` CLI via the command line and programmatically using `child_process` in Node.js, highlighting the CLI-only nature and suggesting `oui-data` for API usage."},"warnings":[{"fix":"For programmatic access to OUI data, use the `oui-data` package instead. To run `oui` from code, use `child_process.exec()` or similar.","message":"Since v13.0.0, the `oui` package is strictly CLI-only. Any attempt to `import` or `require` it as a JavaScript module will fail.","severity":"breaking","affected_versions":">=13.0.0"},{"fix":"Update your Node.js environment to version 18 or newer. Consider using a Node Version Manager (nvm) for easy switching.","message":"Node.js version 18 or higher is now required to run the `oui` CLI.","severity":"breaking","affected_versions":">=13.0.0"},{"fix":"Direct MAC address lookup is the primary function of the CLI. For data updates, the `oui` package handles this internally when new versions are released. For programmatic search, use `oui-data`.","message":"The `search` and `update` commands/features were removed in v13.0.0.","severity":"breaking","affected_versions":">=13.0.0"},{"fix":"Use the command-line interface or the `oui-data` package for data access.","message":"The web version of `oui` was removed in v12.0.0.","severity":"breaking","affected_versions":">=12.0.0"},{"fix":"No specific fix needed, but be aware that data integrity and consistency were improved by this change.","message":"The data source for OUI lookups switched to the official IEEE source in v12.0.0. This may lead to slight differences in vendor information compared to older versions if a custom or unofficial source was previously used.","severity":"gotcha","affected_versions":">=12.0.0"},{"fix":"Always provide the MAC address directly as an argument to the `oui` command: `oui 20:37:06:12:34:56`.","message":"Stdin support on the CLI was removed in v11.0.0, meaning MAC addresses must be passed as command-line arguments.","severity":"breaking","affected_versions":">=11.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"The `oui` package is CLI-only. Run it from your shell or use `child_process.exec('oui ...')`. For programmatic data access, install and use the `oui-data` package.","cause":"Attempting to import or require the `oui` package as a JavaScript module after v13.0.0.","error":"TypeError: oui is not a function"},{"fix":"Upgrade your Node.js environment to version 18 or newer. Use `nvm install 18` and `nvm use 18` if you use nvm.","cause":"Running the `oui` CLI on a Node.js version older than 18.","error":"Error: `oui` requires Node.js 18 or higher. You are using vX.Y.Z."},{"fix":"The `search` feature is no longer available in the `oui` CLI. Provide the full MAC address for direct lookup, e.g., `oui 20:37:06:12:34:56`.","cause":"Attempting to use the `oui search` command, which was removed in v13.0.0.","error":"Error: unknown command 'search'"},{"fix":"Provide the MAC address directly as a command-line argument: `oui 20:37:06:12:34:56`. Stdin input was removed in v11.0.0.","cause":"Invoking `oui` without a MAC address, or attempting to pipe input via stdin, which is no longer supported.","error":"Error: no MAC address provided or invalid input"}],"ecosystem":"npm"}