just
is the newmake
load
.env
viajustfile
run tests; etc;TLR
s; two letter recipes
download the latest
justfile
curl https://raw.githubusercontent.com/sambacha/foundry-scripts/master/justfile --output justfile --silent
In your repo, you execute the command just
and add a recipe
after to run the process
$ just
Available recipes:
build # [BUILD]: Timer
build-mainnet # [TEST] mainnet test
deploy-contract # [DEPLOY]: Deploy contract
dumpbuild # Executes a dump of ethers-rs solc compiler output into two json files
forge-gas-snapshot # [GAS] get gas snapshot timer
forge-gas-snapshot-diff
gas-cov
gas-snapshot # [GAS] default gas snapshot script
gas-snapshot-local # [GAS] get gas snapshot from local tests and save it to file
size # Contract Size
sl
test # [TEST] default test scripts
test-debug *commands="" # [TEST] run mainnet fork forge debug tests (all files with the extension .t.sol)
test-local *commands="" # [TEST] run local forge test using --match-path <PATTERN>
test-mainnet *commands="" # [TEST] run mainnet fork forge tests (all files with the extension .t.sol)
tl
verify-contract # [DEPLOY]: Verify contract
USE_SSH=true
GIT_USER=<GITHUB_USERNAME> forge deploy
TLR's
just tl
tl:
forge test --list
sl:
forge snapshot --list
In .zlogin:
fpath=($HOME/.zsh/completion $fpath)
autoload -Uz compinit
compinit -u
In $HOME/.zsh/completion/_just
#compdef _just just
#autoload
_just () {
local -a subcmds
subcmds=($(just --summary))
_describe 'command' subcmds
}
_just "$@"
completions/just.fish:
complete -c just -a (just --summary)
Simple.
complete -W '$(just --summary)' just
Alt.
if [ -f justfile ]; then
complete -W "`just --summary`" just
fi
# ex: ts=4 sw=4 et filetype=sh
If you modify the justfile
, run just --fmt --unstable
and it will format the justfile
itself.
see https://github.com/sambacha/foundry-justfile-example
Apache-2.0/MIT