
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@commandkit/legacy
Advanced tools
@commandkit/legacyLegacy command handler plugin for CommandKit.
npm install @commandkit/legacy
This package provides a commandkit plugin that enables legacy command handler.
import { legacy } from '@commandkit/legacy';
export default defineConfig({
plugins: [legacy()],
});
This plugin also enables HMR for legacy commands, events and validations.
Since localization api is accessed through ctx.locale() in commandkit, legacy commands are not able to use this api as ctx is not exposed to legacy commands to maintain backward compatibility. In order to use the localization api with legacy commands, this plugin exposes locale() hook to access the localization api.
import { locale } from '@commandkit/legacy';
export const data = {
name: 'hello',
description: 'Say hello',
};
export async function run({ interaction }) {
// initialize the localization api
const { t } = locale();
// use the localization api
const message = await t('hello', {
name: interaction.user.username,
});
// send the message
await interaction.reply(message);
}
The
locale()function can only be called inside therunfunction of the legacy command (or any other functions invoked inside therunfunction).
FAQs
Legacy command handler plugin for CommandKit
We found that @commandkit/legacy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.