There is a bitcoin-cli available for OSX. I also ran into this issue, and it is because I missed one of the setup steps. Here they are for posterity!
Install Xcode:
$ xcode-select --install
Install Homebrew =>
https://brew.sh/
Clone the repo:
$ git clone https://github.com/bitcoin/bitcoin.git
Navigate into bitcoin directory, and run the autogen script:
$ cd bitcoin
$ ./autogen.sh
The autogen.sh script creates a set of automatic configuration scripts
that will interrogate your system to discover the correct settings and
ensure you have all the necessary libraries to compile the code.
Run the configure script:
$ ./configure
This will automatically discover all the necessary libraries and
create a customized build script for your system.
If all went well, the configure command will end by creating the
customized build scripts that will allow us to compile bitcoind.
Compile the bitcoin source:
$ make
Install the executables on your system:
$ sudo make install
Default install location of bitcoind is /usr/local/bin.
Confirm Bitcoin Core is installed:
$ which bitcoind
/usr/local/bin/bitcoind
$ which bitcoin-cli
/usr/local/bin/bitcoin-cli
Full disclosure this information worked for me, and it is from Andreas M. Antonopoulos' Mastering Bitcoin book!
Are you sure
bitcoindis actually running? – Murch – 2016-03-02T15:52:35.217I'm running Qt, so bitcoind would not be running. Pretty sure I have the necessary configurations in my .conf to run RPC commands. – doffing81 – 2016-03-02T15:54:03.903
I know on my other computer I wasn't able to execute commands until the blockchain was caught up for mainnet, or that is what seemed to happen, but I was hoping I could just run a testnet on this computer, and just have the testnet blockchain... maybe not, or maybe having a blockchain doesn't matter. – doffing81 – 2016-03-02T16:02:39.657
So, here I'm confused about two things. Bitcoin-Qt was renamed Bitcoin Core at least since Bitcoin 0.9.1, we are currently at version 0.12.0. So, hopefully, you are running Bitcoin Core? ;) The other is, I'm not sure that Bitcoin Core provides the JSON-RPC interface, I'm sure that
bitcoind(the daemon) does, though. So, you might want to try runningbitcoind -daemoninstead. I have no clue whether any of this is the same for Mac, though. – Murch – 2016-03-02T16:03:27.270I am running core, and you may have missed previous comment, but JSON-RPC does work with Core (Qt) on my other computer. Both are running v0.12, although on this one, I may not have installed bitcoind, as I don't believe it is necessary if I am running qt, although I may be wrong and that may be the problem. – doffing81 – 2016-03-02T16:05:20.687
Okay, then I don't know. Carry on! – Murch – 2016-03-02T16:06:36.940
1I assume you checked whether your current directory actually contains the bitcoin-cli file and that it's executable? – Jannes – 2016-03-02T16:59:04.347
I checked just now and I don't see one, however I don't see one on my other computer either, and the commands work just fine on that one. What and where is this bitcoin-cli file you speak of? I assumed such a file or functionality would be in place with installation. – doffing81 – 2016-03-02T20:15:03.193
Bah, I did a make install to install Bitcoind, and all is good! – doffing81 – 2016-03-02T21:02:26.763
Do you use Bitcoin Core GUI version? – MCCCS – 2016-08-11T14:59:26.550