Hello Im tying to follow this documentation to inspect a database created with CB 2.5
https://docs.couchbase.com/couchbase-lite/current/java.html#cli-tool
the page says we need to download the cblite cli-tool
these are the urls for the cli-tool doc:
# Building the `cblite` tool
Building, for the most part, should be a fairly painless endeavor. There are two scripts in the `ci` of the repo -- `build.sh` for Linux (can also be used for macOS) and `build.ps1` for Windows -- and an Xcode project for macOS in the `Xcode` subdirectory.
(In this day and age shell scripts can be used on Windows and powershell can be used on Unix, but these scripts are platform specific, to avoid annoyances with directory separate chars).
The build script accepts the following flag:
| Windows | Unix | Meaning | Default | Example |
| ------------- | ------------- | ------- | ------- | ------- |
| `--Branch` | `-b\|--branch` | The branch of LiteCore to build | current | `-b master` |
| `--Config` | `-c\|--config` | The build config to use | Debug | `-c Release` |
| `--Product` | `-p\|--product` | The product to build | cblite | `-p cbl-log` |
| `--NoSubmodule` | `-n\|--no-submodule` | Skip submodule sync | n/a | `-n` |
| `--Output` | `-o\|--output` | Where to write the output | ci/\<product\>/build | `-o my/folder` |
| `--GitPath` | n/a | Where to find Git | C:\Program Files\Git\bin\git.exe | `--GitPath <path>`
| `--CMakePath` | n/a | Where to find CMake | C:\Program Files\CMake\bin\cmake.exe | `--CMakePath <path>` |
### Windows
This file has been truncated. show original
# The `cblite` Tool
`cblite` is a command-line tool for inspecting and querying [LiteCore][LITECORE] and [Couchbase Lite][CBL] databases (which are directories with a `.cblite2` extension.)
For build instructions, see [BUILDING.md](BUILDING.md).
## Features
| Command | Purpose |
|----------------|---------|
| `cblite cat` | Display the body of one or more documents |
| `cblite cp` | Replicate, import or export a database |
| `cblite file` | Display information about the database |
| `cblite help` | Display help text |
| `cblite ls` | List the documents in the database |
| `cblite put` | Create or update a document |
| `cblite query` | Run queries, using the [JSON Query Schema][QUERY] |
| `cblite revs` | List the revisions of a document |
| `cblite rm` | Delete a document |
| `cblite serve` | Starts a (rudimentary) REST API listener |
This file has been truncated. show original
My question is how can we use the “cblite” command after execute the build.ps1 or build.sh.
It’s a command line tool so just run the executable from the command line. Or do you mean you are having trouble finding the executable?
yes not sure where is the cblite executable after the build process.
jens
July 8, 2019, 8:54pm
4
In the build_cmake
folder, most likely in a windows
subdirectory. Doesn’t your OS have a find
command?
do you know what is the name of the executable?
jens
July 8, 2019, 9:30pm
6
It’s mentioned dozens of times in the README: cblite
.
If you’re on Windows, it probably has a .exe
extension.
there is not executable in the build folder in windows, I realize could be because the build task could not be full completed, I attached logs .
looks like it cannot open some files even thought I see them in the related directories, however I make the process in a mac and I see a cblite file there that I can run using ./cblite in the build folder directory.
jens
July 9, 2019, 12:42am
8
Looks like the Windows build is broken. Any ideas, @borrrden ?
Windows build is fine for me. It looks like there are two things going on here:
Perhaps @rafaellroca is using build.sh
instead of build.ps1
. Windows shouldn’t be executing the shell script for the repo version.
Looks like the ATL is not installed. It is a separate component inside the Visual Studio installer (for example on 2017 it is called “Visual C++ ATL for x86 and x64”). That might be a good addition to the readme.
it was the second case, I modified visual studio installation to add Visual C++ ATL for x86 and x64 and is finally working in windows.
Thanks