ion-cli
This package is considered experimental. It is under active/early development, and the API is subject to change.
Build Instructions
-
Clone the repository
git clone --recursive https://github.com/amzn/ion-cli.git
(If you had already cloned it, but the
ion-c
directory is missing or empty, rungit submodule update --init --recursive
.) -
Step into the newly created directory
cd ion-cli
-
Install Rust/Cargo via
rustup
-
Build the
ion
toolcargo install --path .
This will put a copy of the
ion
executable in~/.cargo/bin
.If this step fails: You're likely missing one of
ion-c
's dependencies. Make sure you havecmake
,gcc
,g++
andclang
installed. On Debian-based Linux distributions, the only required dependencies arecmake
andclang
. -
Confirm that
~/.cargo/bin
is on your$PATH
.rustup
will probably take care of this for you. -
Confirm that the executable is available
ion help
Docker Instructions
- Install Docker (see OS specific instructions on the Docker website)
- Clone the repository (recursive clone not necessary)
git clone https://github.com/amzn/ion-cli.git
- Step into the newly created directory
cd ion-cli
- Build and run the image
# build the image docker build -t <IMAGE_NAME>:<TAG> . # run the CLI binary inside the Docker image docker run -it --rm [optional flags...] <IMAGE_NAME>:<TAG> ion <SUBCOMMAND> # examples: # build docker image with current release version docker build -t ion-cli:0.1.1 . # print the help message docker run -it --rm ion-cli:0.1.1 ion -V # mount current directory to /data volume and dump an ion file docker run -it --rm -v $PWD:/data ion-cli:0.1.1 ion dump /data/test.ion
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.