Awesome
Command line tool for kutt.it
work in progress
Install
cargo install kutt
Set apikey
kutt --login your-api-key
# or
export KUTT_API_KEY='your-api-key'
Example
kutt --target-url https://github.com/ --custom-url your-domain
# or
echo 'https://github.com/' | kutt -c your-domain
Usage command line
USAGE:
kutt [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --custom-url <DOMAIN> Set a domain name
-d, --delete <URL> Set a url
-l, --login <API_KEY> Set a apikey
-p, --password <PASSWORD> Set a password
-t, --target-url <URL> Set a url
How to use crate
cargo add kutt
extern crate dotenv;
extern crate kutt;
use dotenv::dotenv;
use kutt::Kutt;
fn main() {
dotenv().ok(); // read KUTT_API_KEY in .env file
let slink = Kutt::target_url("https://addr-example...")
.custom_url("custom-url")
.create_short_link()
.unwrap();
println!("{}", slink);
}