iBark is a fully featured Bark cross-platform command line tool written in Rust.
From now on, easily and securely send notifications to your apple devices from the terminal or web interface.
- Ease of use in mind
- Shell completion
bash
elvish
fish
powershell
zsh
- Choose your
Bark
remote - Request remote
healthz
info
ping
- Send once notification
- Specifying multiple devices to send
- Support for remote basic-auth
- Support end-to-end encryption
-
WIP
Web interface -
WIP
Send template -
WIP
Send scheduler
# Send once notification
$ your_device_key=""
# Simple
$ ibark send "d://${your_device_key}" -c 't=iBark π' -c 'b=Hello π\nWorldπ'
# URL scheme
$ ibark send "d://${your_device_key}" -c 't=iBark π' -c 'b=Open github repo' -c 'u=https://github.com/uplau/ibark'
# Icon, available only on iOS15 or later
$ ibark send "d://${your_device_key}" -c 't=iBark π' -c 'b=Icon' -c 'i=https://cdn.jsdelivr.net/gh/walkxcode/dashboard-icons@master/png/apple.png'
# See more at https://github.com/Finb/bark-server/blob/master/docs/API_V2.md#push
# Request remote
$ ibark healthz
$ ibark info
$ ibark ping
# Just dump data, will not execute
$ ibark <COMMAND> -D
$ ibark <COMMAND> -DD
Download binaries archive from Github releases, unzip to your $PATH
.
- For
Unix
, the idiomatic path is/usr/local/bin
Any time run ibark <-h|--help>
or ibark <COMMAND> <-h|--help>
, should be obvious.
-h
: short help--help
: verbose help
iBark is a fully featured Bark cross-platform command line tool written in Rust
Usage: ibark [OPTIONS] [COMMAND]
Commands:
healthz Get remote healthz
info Get remote info
ping Ping remote
send Send once notification
server [WIP]Web interface
help Print this message or the help of the given subcommand(s)
Options:
-g, --gen <SHELL> If provided, outputs the completion file for given shell
-C, --config <PATHS> Specify configuration files
-D, --dump... Just dump data, will not execute
-R, --remote <REMOTE> Specify remote
-U, --user-agent <AGENT> Specify user-agent
-h, --help Print help (see more with '--help')
-V, --version Print version
If you do not explicitly specify configuration files with ibark, it will in turn probe for configuration files named preset.<ini,json,json5,toml,yml,yaml>
in the following dirs:
- global:
- Windows:
%PUBLIC%\ibark\
- Unix:
/etc/ibark/
- Windows:
- user:
$HOME/.config/ibark/
- current:
./
Note: The above file does not have to exist, as it provides sensible defaults. If a key is specified in multiple configuration files, the values will be merged together.
You can run
ibark <COMMAND> <-D|--dump>
to view the final configuration.
Here are a few Special syntax:
remote
:<http|https>://[<username>:[password]@]<remote>[:port]
simple
:https://api.day.app
port
:https://api.day.app:65535
basic-auth
:https://username:password@hello.world
devices
:<d|aes>://[<aes_key>:[aes_iv]@]<device_key>[<aes_key_bitlen>/<aes_mode>/<aes_padding>]
simple
:d://zd10IOkoPAbkctTRrVPRhe
aes128cbc
:aes://3Niw4zYjwOyYr7Bz:zOb8r84B3KrGjs1j@Uz28emqNYwUfmjolArYwyP/128/cbc/pkcs7
aes192ecb
:aes://PO9juShj1cxZYkiNf5Bs5jxU:kOOt2GYVcqIc8EeZ@1Oto6FxeC2hTiIfNoNjofG/192/ecb/pkcs7
aes256ecb
:aes://sN9iOmq9DniEQYLkQfieKRAZvhMOAjam:A8s7RXBFDNUbS3US@albTJWqsiDe6rjr5CsHCca/256/ecb/pkcs7
The following is a quick overview of all settings, with YAML
format:
Anyone is always welcome to contribute examples in other formats INI > JSON > TOML
# fallback: https://api.day.app
remote: ...
# fallback: ibark/VERSION
user_agent: ...
devices:
simple: ...
aes128cbc: ...
aes192ecb: ...
aes256ecb: ...
awesome_name: ...
# see more at https://github.com/Finb/bark-server/blob/master/docs/API_V2.md#push
# compatible with v1 and v2
# fallback:
# a: 1 # or autocopy or automaticallycopy, any non-null value will be formatted as '1' to follow the upstream api
# l: active # or level, any null value will be formatted as 'active' to follow the upstream api
# receives first character or full key, not case sensitive, here are a few exceptions
contexts:
bdg: 1 # or badge
cat: "" # or category, reserved field, no use yet
isa: 1 # or isarchive, any non-null value will be formatted as '1' to follow the upstream api
# fallback: 10
limit_conn: ...
Anyone is always welcome to contribute examples
$ cat preset.yaml
devices:
awesome_name: ...
# -D will dump related configuration
# -DD will dump β¬οΈ and configuration source
$ ibark send awesome_name -D
$ ibark send awesome_name -DD
$ ibark send d://... aes://... -D
$ ibark healthz -D
$ ibark info -D
$ ibark ping -DD
$ cat preset.yaml
remote: https://hello.world
$ ibark send d://...
$ ibark send d://... -R 'https://hi.world'
# basic-auth
$ ibark send d://... -R 'https://username:password@hi.world'
$ cat preset.yaml
devices:
simple: ...
awesome_name: ...
$ ibark send simple awesome_name d://.... aes://...
$ cat preset.yaml
devices:
aes128cbc: aes://3Niw4zYjwOyYr7Bz:zOb8r84B3KrGjs1j@Uz28emqNYwUfmjolArYwyP/128/cbc/pkcs7
aes192ecb: aes://PO9juShj1cxZYkiNf5Bs5jxU:kOOt2GYVcqIc8EeZ@1Oto6FxeC2hTiIfNoNjofG/192/ecb/pkcs7
aes256ecb: aes://sN9iOmq9DniEQYLkQfieKRAZvhMOAjam:A8s7RXBFDNUbS3US@albTJWqsiDe6rjr5CsHCca/256/ecb/pkcs7
$ ibark send aes128cbc aes192ecb aes256ecb d://...
$ cat preset.yaml
contexts:
icon: ...
group: ...
sound: ...
devices:
awesome_name: ...
# will be used when contexts are not explicitly specified
$ ibark send awesome_name -D
# if you do not need these presets, you need to override them explicitly
$ ibark send awesome_name -c 'i=' -c 'g=other_group' -c 's=' -D
# for other shells, you should be able to find relevant information from the Internet
# bash idiomatic path: /etc/bash_completion.d/
$ ibark -g bash > /etc/bash_completion.d/completion_ibark
$ source /etc/bash_completion.d/completion_ibark
This repository was created with rust-template.
See the contributing guidelines for more information.
iBark is licensed under either of the following, at your option: