
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
Awtrix in JavaScript
~$ npm i awtrix --save
~$ npm i -g awtrix
~$ export AWTRIX_API=https://awtrix.lsong.me/api/v3
~$ awtrix
awtrix 0.0.0
Usage: awtrix <command>
Commands:
get_settings
set <key> <value>
brightness <value>
notify <text>
draw <array>
Examples:
awtrix get_settings
awtrix set Brightness 50
awtrix brightness 50
awtrix notify "Hello World"
const Awtrix = require('awtrix');
const awtrix = new Awtrix({
api: 'https://awtrix.lsong.me/api/v3',
});
get settings:
(async () => {
const settings = await awtrix.get_settings();
console.log(settings);
})();
set brightness:
(async () => {
await awtrix.brightness(50);
})();
notify:
(async () => {
await awtrix.notify('hello');
})();
draw:
(async () => {
const show = new Awtrix.Show();
const wait = new Awtrix.Wait(1000);
const clear = new Awtrix.Clear();
const fill = new Awtrix.Fill(50, 50, 50);
const text = new Awtrix.Text('Hello World');
text.position = new Awtrix.Position(4, 1);
text.color = new Awtrix.Color(255, 0, 0);
const circle = new Awtrix.Circle(3);
circle.position = new Awtrix.Position(4, 4);
circle.color = new Awtrix.Color(255, 0, 255);
const rect = new Awtrix.Rect(5, 5);
rect.position = new Awtrix.Position(24, 2);
rect.color = new Awtrix.Color(0, 0, 255);
const line = new Awtrix.Line();
line.start = new Awtrix.Position(0, 0);
line.end = new Awtrix.Position(10, 10);
line.color = new Awtrix.Color(255, 0, 0);
const exit = new Awtrix.Exit();
await awtrix.draw([
fill,
text,
show,
wait,
circle,
show,
wait,
rect,
show,
wait,
clear,
line,
show,
wait,
exit,
]);
})();
MIT @ Lsong hi@lsong.org
FAQs
Awtrix in JavaScript
The npm package awtrix receives a total of 5 weekly downloads. As such, awtrix popularity was classified as not popular.
We found that awtrix demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.