Мы используем Makefile думая, что нет альтернатив, что это стандарт и всё такое.
Но make это не запускалка команд, а система сборки. Мы фактически используем его не по назначению.
И на самом деле альтернатива есть! Некоторое время назад я открыл для себя прекрасный инструмент - just. Он решает все проблемы make.
just - это не система сборки как make, это именно исполнитель команд!
Больше никаких Phony Targets и табуляций, привет нормальный синтаксис и передача аргументов!!! 😎
⭐️Что умеет just:
✅ Автодокументирование команд
Не нужно делать отдельную команду с докой, просто добавь комментарий
# команда сборки
build:
...
$ just --list
Available recipes:
build # команда сборки
Команда с именем default запускается по умолчанию если не указано другое, так что я обычно делаю так:
default:
just --list
Теперь просто выполняем just и получаем доку из текущего файла.
✅ Удобная работа с переменными окружения
# загрузить из .env
set dotenv-load
# глобальная переменная
export PYTHONPATH := "./src"
# переменная для команды
test $TESTUNG="true":
pytest
✅ Передача аргументов
build target:
@echo 'Build {{target}}...'
команда запуска
$ just build dev
# Build dev...
✅ Выбор интерпретатора прямо в команде
Пример с инлайн-скриптом на python:
system:
#!/usr/bin/env python3
import platform
print(platform.system())
Эта же функция позволит выполнить скрипт как одну команду вместо перезапуска шела для каждой строки
foo:
#!/usr/bin/env sh
for file in ls .; do
echo $file
done
✅ Выполнение команды в определенной директории. Можно указать как релятивный путь так и абсолютный
[working-directory: 'backend']
build:
docker compose build
Также можно задать рабочую директорию глобально
Там еще много интересного:
- поддержка функций
- автокомплиты и интеграции
- экспрешены
- алиасы команд
- группировка команд
- альтернативы команды под разные ОС
- импорт других just-файлов
- цветной вывод
- ... и другие штуковины!
Так что вперёд - ➡️ читать доку!
Репозиторий: ➡️https://github.com/casey/just
Статья: ➡️https://www.chicks.net/reference/file_formats/just/
ЗЫ. Кажется, на Makefile я уже не вернусь)
#tools
🪐 In the constellation Ophiuchus, the asteroid 101955 Bennu harbors boulders on its surface that are actually fragments from a much larger parent asteroid, dislodged by ancient cosmic impacts. Analysis of samples returned by NASA’s OSIRIS-REx mission revealed minerals that interacted with liquid water billions of years ago, revealing Bennu as a time capsule from the dawn of the solar system. ✨
#Bennu⚡#asteroids⚡#OSIRISRex
👉subscribe Universe Mysteries
🪐 One of the most intriguing potentially hazardous asteroids is (101955) Bennu, a 500-meter-wide space rock that approaches Earth every six years. Bennu's orbit is so well-studied that NASA sent the OSIRIS-REx mission to collect samples, as even small forces—like sunlight changing its spin—can alter its path, making Bennu a prime real-world example of why scientists keep a close watch on these cosmic wanderers. ✨
#asteroids⚡#hazard⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐A skyscraper-sized space rock is on its way past Earth.
On September 18, 2025, asteroid 2025 FA22, measuring up to 300 meters across, will sweep by our planet. At its closest, it will be about 835,000 km away — more than twice the distance to the Moon.
Moving at a breathtaking 34,000 km/h, this Apollo-type asteroid silently follows its orbit around the Sun, crossing Earth’s path in space. The flyby will peak around 07:41 UTC, a moment astronomers worldwide are watching closely.
Massive, fast, and ancient — yet passing safely by. Encounters like this remind us how close cosmic giants can come, while still leaving Earth untouched. ✨
#asteroids⚡#hazard⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 The asteroid Bennu, about 500 meters wide, orbits the Sun and regularly passes close to Earth—so close that it’s classified as a “potentially hazardous asteroid.” Scientists continually monitor Bennu’s path because even small shifts caused by sunlight (known as the Yarkovsky effect) could alter its future trajectory, making it one of the most closely watched objects to help protect our planet from possible impacts. ✨
#asteroid⚡#hazards⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 One of the closest ongoing space threats to Earth is asteroid (101955) Bennu, a 500-meter-wide rock whose orbit brings it near our planet about every six years. Bennu's path is carefully tracked because even small gravitational nudges or sunlight (the Yarkovsky effect, where heat causes tiny pushes) could change its future route, making it a real-world example of why scientists keep a vigilant watch on these near-Earth objects. ✨
#asteroids⚡#defense⚡#Bennu⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels