| Crates.io | musket |
| lib.rs | musket |
| version | 0.23.0 |
| created_at | 2024-11-18 11:22:34.511429+00 |
| updated_at | 2025-04-27 11:28:10.798237+00 |
| description | Musket is a command line interface to send a URL to several destinations. |
| homepage | https://github.com/isfegu/musket |
| repository | https://github.com/isfegu/musket |
| max_upload_size | |
| id | 1452106 |
| size | 166,904 |
With Musket a “shooter” “fires” a URL at a “target” :D.
Musket is a command line interface to send a URL to several destinations. Each destination handle the URL depending the nature of the destination, for example, Bluesky, Mastodon and LinkedIn destinations post the URL in the user's feed whereas Turso destination stores the URL in Turso Service (a SQLite database SaaS).
For a while, Musket is provided as a cargo package, therefore you need cargo installed in your machine.
cargo install musket
Due to cargo install download, compile and build Musket some dependencies must be installed in your machine.
For an Ubuntu 24.04:
$ sudo apt install build-essential pkg-config libssl-dev
Other GNU/Linux distros have to change the package manager (like dnf, pacman, etc) and the package names.
Necessary dependencies for other operating systems are pending investigation.
To create the configuration file, execute:
$ musket init
Musket uses a configuration file named config.toml. This file is placed in the directory musket inside the users's home. This home depends of the operating system:
The
musket initcommand will display the full path to the configuration file.
All destinations have to be configured from the configuration file. The configuration is a .toml file, therefore, strings must be in quotes and booleans must be the word true or false.
Before sending a URL to Bluesky destination you must:
bluesky section in the Musket configuration file. You must provide:
identifier is the account's username or email.password of the account.commentary is the default text that will be shown in the post along the link.language is the language of the commentary.enabled to set whether the destination can be selected.Before sending a URL to Mastodon destination you must:
mastodon section in the Musket configuration file. You must provide:
server is the URL of your Mastodon account provider, for example: https://mastodon.online.token used as a authentication.commentary is the default text that will be shown in the post along the link.language is the language of the commentary.enabled to set whether the destination can be selected.Before sending a URL to LinkedIn destination you must:
linkedin section in the Musket configuration file. You must provide:
token used as a bearer authentication.author identifier.commentary is the default text that will be shown in the post along the link.language is the language of the commentary.visibility, can be "PUBLIC" or "CONNECTIONS".enabled to set whether the destination can be selected.Before sending a URL to Turso destination you must:
CREATE TABLE links (
id INTEGER PRIMARY KEY AUTOINCREMENT,
url TEXT,
tags TEXT,
created DATETIME
);
turso section in the Musket configuration file. You must provide:
database where store the data.token used as a authentication.enabled to set whether the destination can be selected.One way to specify a URL is to get it from the sources instead of setting it directly. Currently, Musket only supports Instapaper as a valid source.
Before getting a URL from Instapaper you must:
instapaper section in the Musket configuration file. You must provide:
username used as a part of the credentials of your account.password used as a part of the credentials of your account.consumer_key provided by Instapaper after the New OAuth Application request.consumer_secret provided by Instapaper after the New OAuth Application request.Here's how Musket works with Instapaper:
musket.Run musket -h to get the details of each command and option.
Use this command to initialize Musket creating the configuration file:
$ musket init
The init command have one options:
Use this command to send a URL:
$ musket fire
The fire command have several options:
-f, --from is not present.-u, --url is not present.-f, --from is present, the tags used will be the tags set in the source.en for English, es for Spanish, etc.$ musket fire --url <URL> --from <SOURCE> --destination <DESTINATION> --tags <tags> --commentary <text> --language <text>
For example:
$ musket fire --url wikipedia.org --destination bluesky,mastodon,linked-in,turso --tags one,two,three --commentary "I've just discover this amazing website!" --language en
or
$ musket fire --url wikipedia.org -d bluesky -d mastodon -d linked-in -d turso -t one -t two -t three -c "I've just discover this amazing website!" -l en
or
$ musket fire --source instapaper --destination all --commentary "I've just discover this amazing website!" --language en
By default, errors and information messages will be displayed on the terminal to be notified about the result of the Musket execution. If you want to see the debug messages you must set the RUST_LOG environment variable with the value debug. For example adding it before a Musket execution command:
$ RUST_LOG="debug" musket fire --url wikipedia.org -d bluesky -d mastodon -d linked-in -d turso -t one -t two -t three -c "I've just discover this amazing website!"
If you want to contribute to Musket, please read the CONTRIBUTING.md document.