Git Product home page Git Product logo

bat's Introduction

bat

Go implemented CLI cURL-like tool for humans. Bat can be used for testing, debugging, and generally interacting with HTTP servers.

Inspired by Httpie. Thanks to the author, Jakub.

Docker

# Build the docker image
$ docker build -t astaxie/bat .

# Run bat in a container
$ docker run --rm -it --net=host astaxie/bat example.org

Main Features

  • Expressive and intuitive syntax
  • Built-in JSON support
  • Forms and file uploads
  • HTTPS, proxies, and authentication
  • Arbitrary request data
  • Custom headers

Installation

Install with Modules - Go 1.11 or higher

If you only want to install the bat tool:

go get -u github.com/astaxie/bat

If you want a mutable copy of source code:

git clone https://github.com/astaxie/bat ;# clone outside of GOPATH
cd bat
go install

Make sure the ~/go/bin is added into $PATH.

Install without Modules - Before Go 1.11

go get -u github.com/astaxie/bat

Make sure the $GOPATH/bin is added into $PATH.

Usage

Hello World:

$ bat beego.me

Synopsis:

bat [flags] [METHOD] URL [ITEM [ITEM]]

See also bat --help.

Examples

Basic settings - HTTP method, HTTP headers and JSON data:

$ bat PUT example.org X-API-Token:123 name=John

Any custom HTTP method (such as WebDAV, etc.):

$ bat -method=PROPFIND example.org name=John

Submitting forms:

$ bat -form=true POST example.org hello=World

See the request that is being sent using one of the output options:

$ bat -print="Hhb" example.org

Use Github API to post a comment on an issue with authentication:

$ bat -a USERNAME POST https://api.github.com/repos/astaxie/bat/issues/1/comments body='bat is awesome!'

Upload a file using redirected input:

$ bat example.org < file.json

Download a file and save it via redirected output:

$ bat example.org/file > file

Download a file wget style:

$ bat -download=true example.org/file

Set a custom Host header to work around missing DNS records:

$ bat localhost:8000 Host:example.com

Following is the detailed documentation. It covers the command syntax, advanced usage, and also features additional examples.

HTTP Method

The name of the HTTP method comes right before the URL argument:

$ bat DELETE example.org/todos/7

which looks similar to the actual Request-Line that is sent:

DELETE /todos/7 HTTP/1.1

When the METHOD argument is omitted from the command, bat defaults to either GET (if there is no request data) or POST (with request data).

Request URL

The only information bat needs to perform a request is a URL. The default scheme is, somewhat unsurprisingly, http://, and can be omitted from the argument – bat example.org works just fine.

Additionally, curl-like shorthand for localhost is supported. This means that, for example :3000 would expand to http://localhost:3000 If the port is omitted, then port 80 is assumed.

$ bat :/foo

GET /foo HTTP/1.1
Host: localhost

$ bat :3000/bar

GET /bar HTTP/1.1
Host: localhost:3000

$ bat :

GET / HTTP/1.1
Host: localhost

If you find yourself manually constructing URLs with query string parameters on the terminal, you may appreciate the param=value syntax for appending URL parameters so that you don't have to worry about escaping the & separators. To search for bat on Google Images you could use this command:

$ bat GET www.google.com search=bat tbm=isch

GET /?search=bat&tbm=isch HTTP/1.1

Request Items

There are a few different request item types that provide a convenient mechanism for specifying HTTP headers, simple JSON and form data, files, and URL parameters.

They are key/value pairs specified after the URL. All have in common that they become part of the actual request that is sent and that their type is distinguished only by the separator used: :, =, :=, @, =@, and :=@. The ones with an @ expect a file path as value.

Item Type Description
HTTP Headers Name:Value Arbitrary HTTP header, e.g. X-API-Token:123.
Data Fields field=value Request data fields to be serialized as a JSON object (default), or to be form-encoded (--form, -f).
Form File Fields field@/dir/file Only available with -form, -f. For example screenshot@~/Pictures/img.png. The presence of a file field results in a multipart/form-data request.
Form Fields from file [email protected] read content from file as value
Raw JSON fields field:=json, field:[email protected] Useful when sending JSON and one or more fields need to be a Boolean, Number, nested Object, or an Array, e.g., meals:='["ham","spam"]' or pies:=[1,2,3] (note the quotes).

You can use \ to escape characters that shouldn't be used as separators (or parts thereof). For instance, foo==bar will become a data key/value pair (foo= and bar) instead of a URL parameter.

You can also quote values, e.g. foo="bar baz".

JSON

JSON is the lingua franca of modern web services and it is also the implicit content type bat by default uses:

If your command includes some data items, they are serialized as a JSON object by default. bat also automatically sets the following headers, both of which can be overridden:

header value
Content-Type application/json
Accept application/json

You can use --json=true, -j=true to explicitly set Accept to application/json regardless of whether you are sending data (it's a shortcut for setting the header via the usual header notation – bat url Accept:application/json).

Simple example:

$ bat PUT example.org name=John [email protected]
PUT / HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
Host: example.org

{
    "name": "John",
    "email": "[email protected]"
}

Even custom/vendored media types that have a json format are getting detected, as long as they implement a json type response and contain a json in their declared form:

$ bat GET example.org/user/1 Accept:application/vnd.example.v2.0+json
GET / HTTP/1.1
Accept: application/vnd.example.v2.0+json
Accept-Encoding: gzip, deflate
Content-Type: application/vnd.example.v2.0+json
Host: example.org

{
    "name": "John",
    "email": "[email protected]"
}

Non-string fields use the := separator, which allows you to embed raw JSON into the resulting object. Text and raw JSON files can also be embedded into fields using =@ and :=@:

$ bat PUT api.example.com/person/1 \
name=John \
age:=29 married:=false hobbies:='["http", "pies"]' \  # Raw JSON
[email protected] \   # Embed text file
bookmarks:[email protected]      # Embed JSON file

PUT /person/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: api.example.com

{
    "age": 29,
    "hobbies": [
        "http",
        "pies"
    ],
    "description": "John is a nice guy who likes pies.",
    "married": false,
    "name": "John",
    "bookmarks": {
        "HTTPie": "http://httpie.org",
    }
}

Send JSON data stored in a file (see redirected input for more examples):

$ bat POST api.example.com/person/1 < person.json

Forms

Submitting forms are very similar to sending JSON requests. Often the only difference is in adding the -form=true, -f option, which ensures that data fields are serialized correctly and Content-Type is set to, application/x-www-form-urlencoded; charset=utf-8.

It is possible to make form data the implicit content type instead of JSON via the config file.

Regular Forms

$ bat -f=true POST api.example.org/person/1 name='John Smith' \
[email protected]

POST /person/1 HTTP/1.1
Content-Type: application/x-www-form-urlencoded; charset=utf-8

name=John+Smith&email=john%40example.org

File Upload Forms

If one or more file fields is present, the serialization and content type is multipart/form-data:

$ bat -f=true POST example.com/jobs name='John Smith' cv@~/Documents/cv.pdf

The request above is the same as if the following HTML form were submitted:

<form enctype="multipart/form-data" method="post" action="http://example.com/jobs">
    <input type="text" name="name" />
    <input type="file" name="cv" />
</form>

Note that @ is used to simulate a file upload form field.

HTTP Headers

To set custom headers you can use the Header:Value notation:

$ bat example.org  User-Agent:Bacon/1.0  'Cookie:valued-visitor=yes;foo=bar'  \
X-Foo:Bar  Referer:http://beego.me/

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
Cookie: valued-visitor=yes;foo=bar
Host: example.org
Referer: http://beego.me/
User-Agent: Bacon/1.0
X-Foo: Bar

There are a couple of default headers that bat sets:

GET / HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate
User-Agent: bat/<version>
Host: <taken-from-URL>

Any of the default headers can be overridden.

Authentication

Basic auth:

$ bat -a=username:password example.org

Proxies

You can specify proxies to be used through the --proxy argument for each protocol (which is included in the value in case of redirects across protocols):

$ bat --proxy=http://10.10.1.10:3128 example.org

With Basic authentication:

$ bat --proxy=http://user:[email protected]:3128 example.org

You can also configure proxies by environment variables HTTP_PROXY and HTTPS_PROXY, and the underlying Requests library will pick them up as well. If you want to disable proxies configured through the environment variables for certain hosts, you can specify them in NO_PROXY.

In your ~/.bash_profile:

export HTTP_PROXY=http://10.10.1.10:3128
export HTTPS_PROXY=https://10.10.1.10:1080
export NO_PROXY=localhost,example.com

bat's People

Contributors

0xflotus avatar albttx avatar andyjeffries avatar astaxie avatar buaazp avatar crdil avatar glkz avatar hartzell avatar hoop33 avatar iamzhout avatar integrii avatar maximilianmeister avatar micanzhang avatar mrsinham avatar nerdatmath avatar nicr9 avatar qwivan avatar vjeantet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bat's Issues

Making HTTP requests with an array of parameters

With bat is it possible to build a HTTP request that parameter arrays?

Example: bat :8888 foo=val1 foo=val2 bar=val3 should result in a URL like localhost:8888?foo=val1&foo=val2&bar=val3

Currently when I tried using that above syntax I only get one parameter with what ever the last value was.

in windows: ':=' not mean raw json object

bat POST http://www.baidu.com/ abc:='["123","456"]'

result in windows:

POST / HTTP/1.1
Host: www.baidu.com
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
User-Agent: bat/0.0.3

{"abc":"'[123,456]'"}
<response ignored>

result in linux(or bash in windows):

POST / HTTP/1.1
Host: www.baidu.com
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
User-Agent: bat/0.0.3

{"abc":["123","456"]}
<response ignored>

How to staticly compile?

I've tried go build -ldflags '-extldflags "-fno-PIC -static"' -buildmode pie -tags 'osusergo netgo static_build' and go build -ldflags '-extldflags "-fPIC -static"' -buildmode pie -tags 'osusergo netgo static_build'.

Both get issues with trying to link.

/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libpthread.a(pthread_create.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/libpthread.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status

I don't want a shared object I want a self-contained static binary that I can use in a Docker container FROM scratch.

Header value misinterpreted as query param

When specifying a header option whose value ends with an =, bat incorrectly interprets that as a query param, even when escaped.

➜ bat GET :8001/v1/me/entity 'X-APIKey:asdfasdfa\='
GET /v1/me/entity?X-APIKey%3Aasdfasdfa%5C= HTTP/1.1
Host: localhost:8001
Accept: application/json
Accept-Encoding: gzip, deflate
User-Agent: bat/0.1.0

Address boundary error

app version: bat 0.12.1
rust toolchain: nightly-x86_64-apple-darwin 1.40.0-nightly
OS: macOS Catalina 10.15.1

Problem
Bat crashes with following 'bat' terminated by signal SIGSEGV (Address boundary error) segmentation fault: 11 if you run it in 'read from standart input mode' (no args, no flags)

Querystring parameter setting operator is inconsistent

param=value's behavior changes with http method. So user interface changes between http requests whereas the http resource is the same.

For example:

bat GET api.example.com/person/1 apiKey=smellsbad
//apiKey is in the querystring
bat PUT api.example.com/person/1 apiKey=smellsbad
//apiKey is in the request body 

Also, there is no other option to add querystring parameters to post/put/patch requests other than manually adding them to url.

I think, a consistent assign operator for querystring params would be nice. We can adopt httpie's == for this.

JSON display with colors

A nice feature of httpie is to display json body with colors, making the display very human-readable. Can we have it on bat ? Thanks, bat is nice.

test file

based on file to test.

bat test.js

Json Value `:=` Syntax Not Documented in Help Message

The current bat help message says:

...
ITEM:
  Can be any of:
    Query string   key=value
    Header         key:value
    Post data      key=value
    File upload    key@/path/file
...

I was trying to send a JSON number and thought that it was not possible until I read the readme for bat and found that it was possible using the key:=value syntax. It would be great to see that syntax documented in the help message.

Form value contains ":" be ignored

$ bat -v -f POST https://api.weibo.com/oauth2/access_token redirect_uri=http://127.0.0.1/project/oauth/callback

the redirect_uri did not sent to server

foo:={"bar":"baz"} doesn't work as expected?

The following example results in a string as the value, instead of raw json:

> bat POST :8000 name:='{0:0}'
POST / HTTP/1.1
Host: localhost:8000
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
User-Agent: bat/0.1.0


{"name":"{0:0}"}

The same method with an array instead of an object results in an array, as expected:

> bat POST :8000 name:='[0,0]'
POST / HTTP/1.1
Host: localhost:8000
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
User-Agent: bat/0.1.0


{"name":[0,0]}

Provide cross-platform build

Releases seems to only feature a compiled OSX version. It's pretty simple to provide a Windows and Linux version by simply supplying GOOS environment variable at compile time. Let me know if you'd like any help -- I love the utility, but would really like to install it on systems which don't have a Go compiler installed more easily.

Thanks

HTTPS certificate information

One of my main use cases for curl is to check if https is setup correctly.
Having a flag to show certificate information would be very useful.
Example from curl:

* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=California; L=Mountain View; O=Google Inc; CN=*.google.com
*  start date: Jan 10 09:55:43 2018 GMT
*  expire date: Apr  4 09:40:00 2018 GMT
*  subjectAltName: host "google.com" matched cert's "google.com"
*  issuer: C=US; O=Google Inc; CN=Google Internet Authority G2
*  SSL certificate verify ok.

Also having curl --resolve functionality would be super handy.

Thanks for creating a nice tool!

Custom path to certs

My router has read-only file system, so I can copy and run "bat" to external USB.
The problem: I cannot point "bat" the new location of certs. Is there a way to add option for custom certificates directory?

Add flag to enable insecure SSL

In order to use bat to test self-signed SSL web services in development, bat needs to support insecure HTTPS queries. cURL has a -k, --insecure flag to facilitate this.

Adding print control flags

What about supporting httpie like print control flags?

From httpie's help:

  --print WHAT, -p WHAT
      String specifying what the output should contain:

          'H' request headers
          'B' request body
          'h' response headers
          'b' response body

Maybe we can also use separate flags for each of the options.

Can not set "Range" into request header

  1. exec command:
    bat GET http://127.0.0.1:8080/bd_logo1.png 'Host:www.baidu.com' 'Range:bytes=0-3'

  2. request message:
    GET /bd_logo1.png?Range%3Abytes=0-3 HTTP/1.1
    Host: www.baidu.com
    Accept: application/json
    Accept-Encoding: gzip, deflate
    User-Agent: bat/0.1.0

  3. question:
    Can not set "Range:bytes=0-3" as a header in http request, and make "Range" as a parameter in URL.

301 redirect issue

when i request http://v.pptv.com with curl command line tool, i got this:

$curl -I http://v.pptv.com
HTTP/1.1 301 Moved Permanently
Date: Wed, 22 Apr 2015 15:02:51 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Cache-Control: no-cache
Location: http://www.pptv.com
Age: 1
Via: http/1.1 shnj-b-ats-157-223-2 (ATS/1.2.2 [uScMsSf pSeN:t cCMi p sS]),  http/1.1 sh-i-ats-8-44-1 (ATS/1.2.0 [uScMsSf pSeN:t cCMi p sS])

but when i try with bat, then:

bat head http://v.pptv.com
HEAD / HTTP/1.1
Host: v.pptv.com
Accept: application/json
Accept-Encoding: gzip, deflate
User-Agent: bat/0.0.2



HTTP/1.1 200 OK
Expires : Wed, 22 Apr 2015 15:21:32 GMT
Age : 278
Connection : keep-alive
Last-Modified : Wed, 22 Apr 2015 15:01:32 GMT
Cache-Control : public, max-age=1200
Vary : Accept-Encoding Accept-Encoding Accept-Encoding Accept-Encoding
Via : http/1.1 shnj-b-ats-157-223-2 (ATS/1.2.2 [uIcRs f p eN:t cCHi p s ]),     http/1.1 sh-i-ats-8-45-1 (ATS/1.2.0 [uScRs f p eN:t cCHi p s ])
Content-Length : 714354
Date : Wed, 22 Apr 2015 15:06:09 GMT
Content-Type : text/html; charset=utf-8
Pragma : public

and i try write a small demo with net/http package, i got the same result with bat, so i guess net/http handle this. but i think return origin redirect info not
redirect directly.

Is bat still maintained? Or should a fork like https://github.com/shoenig/gurl be mentioned?

Hi @astaxie,
thanks for providing bat as Free Software!
A lot of people are interested in it, given the 2.5k stars.

However it seems like the last commits as of today are from 2019 and there is also no real release tagged?

Do you still maintain the software?

Or does it make sense to point users to a more active fork, maybe https://github.com/shoenig/gurl
(at least gurl seems to be more active and has some releases tagged, I like the name "bat" better though. ;) )

bat modifies body from stdin if it is also valid JSON

Reading https://github.com/astaxie/bat/blob/master/bat.go#L195-L204 bat attempts to parse stdin as JSON, and when it succeeds, the body content may be different to what was originally submitted. For example if that content has been previously used to calculate a signature such as HMAC-SHA1,
then the signature may no longer be valid.

In practice, when POSTing a file and adding its HMAC as a header, bat effectively appends 0x0a and it's possible that the final output JSON may be altered -- I haven't yet checked this but it could have different key/object order, or changed keys, as JSON allows repeated keys within objects.

I can understand if this is intended behaviour but it took a surprisingly long time to realise
this was the case, and track it down.

I'd propose that PoLA should apply for content from stdin and it not be altered, or at least, only if the -json=true flag has been specified.

« Content-Disposition : filename="filename.ext" » handling

Given the following

$ bat -download=true http://127.0.0.1:8080/3,0140231f47.jpg
HTTP/1.1 200 OK
Last-Modified : Thu, 29 Oct 2015 13:06:15 GMT
Date : Thu, 29 Oct 2015 13:33:31 GMT
Accept-Ranges : bytes
Content-Disposition : filename="dog-spoon-lobster.jpg"
Content-Length : 70059
Content-Type : image/jpeg
Etag : "d1ca1636"

Downloading to ""dog-spoon-lobster.jpg""
68.42 KB / 68.42 KB 

The file resulting is literaly "dog-spoon-lobster.jpg" it should have been dog-spoon-lobster.jpg

$ ls -l
total 184
-rw-r--r-- 1 me users 70059 29 oct.  14:33 "dog-spoon-lobster.jpg"

It looks like Content-Disposition does not remove double quotes ?

GET query values / POST json values broken by #59

#59 breaks parsing of query / post parameters.

The fix is meant to allow heder values with = in them, but breaks the case of having GET query or POST values with : in them. E.g.:

filter=fielda(expand:true),fieldb

Instead the implementation should look for the first occurrence of either : or = and split on that.

Support benchmark

sends some load to a web application. similar to Apache Bench (ab)

http header

"Range:bytes=0-10" argument parse error:

D:\>bat http://www.baidu.com Range:bytes=0-10
POST / HTTP/1.1
Host: www.baidu.com
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
User-Agent: bat/0.1.0


{"Range:bytes":"0-10"}


HTTP/1.1 200 OK
Set-Cookie : BAIDUID=193BF8F2DA8E3A36695F0FB3BEB7A14A:FG=1; expires=Wed, 12-Apr-
17 05:27:39 GMT; max-age=31536000; path=/; domain=.baidu.com; version=1
P3p : CP=" OTI DSP COR IVA OUR IND COM "
Last-Modified : Mon, 29 Feb 2016 11:11:44 GMT
Connection : Keep-Alive
Content-Type : text/html
Etag : "2bd1-52ce6b6c4bc00"
Accept-Ranges : bytes
Cache-Control : max-age=86400
Vary : Accept-Encoding,User-Agent
Date : Tue, 12 Apr 2016 05:27:39 GMT
Server : Apache
Expires : Wed, 13 Apr 2016 05:27:39 GMT

insecure flag for allowing connections to SSL sites without certs

There is a flag in cURL of insecure flag of -k, --insecure Allow connections to SSL sites without certs (H)

It's much helpful on some cases that connects to https protocol without certs. Would you consider to do it in the future?

2016/05/16 14:06:39.177690 bat.go:215: can't get the url Get <url>: x509: cannot validate certificate for <ip> because it doesn't contain any IP SANs

The download argument doesn't seem to work

When I try to download a file using bat with the --download argument the following error message is produced:

flag provided but not defined: -download
bat is a Go implemented CLI cURL-like tool for humans.

Usage:

        bat [flags] [METHOD] URL [ITEM [ITEM]]

flags:
  -a, -auth=USER[:PASS]       Pass a username:password pair as the argument
  -f, -form=false             Submitting the data as a form
  -j, -json=true              Send the data in a JSON object
  -v, -verbose=false          Print the whole HTTP exchange (request and response)
  -p, -pretty=true            Print Json Pretty Fomat
  -proxy=PROXY_URL            Proxy with host and port

METHOD:
   bat defaults to either GET (if there is no request data) or POST (with request data).

URL:
  The only information needed to perform a request is a URL. The default scheme is http://,
  which can be omitted from the argument; example.org works just fine.

ITEM:
  Can be any of:
    Query string   key=value
    Header         key:value
    Post data      key=value
    File upload    key@/path/file

Example:

        bat beego.me

more help information please refer to https://github.com/astaxie/bat

I tried the following with the same result:

bat --download https://aur.archlinux.org/packages/la/lastpass-cli/lastpass-cli.tar.gz  
bat -download https://aur.archlinux.org/packages/la/lastpass-cli/lastpass-cli.tar.gz

Downloading the same file with bat https://aur.archlinux.org/packages/la/lastpass-cli/lastpass-cli.tar.gz > lastpass-cli.tar.gz does work though. I don't know if this is a bug or if the example in the README is bad.

Unknown usage option -v in README.md

Examples section in README.md is written following:

See the request that is being sent using one of the output options:

$ bat -v example.org

But -v option works print version string.

Is it typo?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.