https://github.com/solarnetwork/sn-cli
CLI tool to interact with the SolarNetwork API
https://github.com/solarnetwork/sn-cli
cli-app solarnetwork
Last synced: 3 months ago
JSON representation
CLI tool to interact with the SolarNetwork API
- Host: GitHub
- URL: https://github.com/solarnetwork/sn-cli
- Owner: SolarNetwork
- License: apache-2.0
- Created: 2025-08-27T23:15:03.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-06T20:42:28.000Z (8 months ago)
- Last Synced: 2025-10-06T21:26:18.292Z (8 months ago)
- Topics: cli-app, solarnetwork
- Language: Java
- Homepage: https://solarnetwork.github.io/sn-cli/
- Size: 1.54 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# SolarNetwork Command Line Tool
This project contains a command line (CLI) tool for interacting with the SolarNetwork API. The tool
allows you to do things like:
* discover available nodes
* discover available datum streams
* list persisted datum
* update SolarNode control values
* toggle SolarNode operating modes
* manage SolarNode metadata
* stream datum from SolarFlux
* and more! See the [documentation](https://solarnetwork.github.io/sn-cli/) for more information.
# Get
Download the [latest release](https://github.com/SolarNetwork/sn-cli/releases), either as an
executable binary for your operating system or an executable Java JAR you can run anywhere you have
Java 21+ installed.
# Logging
Logging can be enabled by creating an `application.yml` file in your working directory. You can then
configure standard [Spring Boot Logging][logging-conf] settings. For example
if you would like HTTP exchange traces, add the `--http-trace` option and then configure logging
something like this:
```yaml
logging:
file.name: "/var/tmp/s10k.log"
level:
net.solarnetwork.http: "TRACE"
threshold:
console: "INFO"
file: "TRACE"
```
# Building from source
To build the executable JAR application from source, run:
```sh
# Unix
./gradlew build -x test
# Windows
.\gradlew.bat build -x test
```
The application will be built to `build/libs/s10k-VERSION.jar`.
## Building the native binary
To build the native binary, you must have the [GraalVM][graalvm] version 24+ or later installed.
Then add `GRAALVM_HOME` to your environment. For example in `sh`:
```sh
# macOS install
export GRAALVM_HOME=/Library/Java/JavaVirtualMachines/graalvm-21.jdk/Contents/Home
```
Then you can run:
```sh
# Unix
./gradlew nativeCompile
# Windows
.\gradlew.bat nativeCompile
```
The native binary will be built to `app/build/native/nativeCompile/s10k`.
[graalvm]: https://www.graalvm.org/
[logging-conf]: https://docs.spring.io/spring-boot/reference/features/logging.html