vc is a tool to control & monitor instances of Vector Charts, a nautical chart & geospatial data platform. The CLI interfaces with the Vector Charts control plane in order to speed up common tasks such as chart & upload file management and job monitoring.
In addition to being a useful utility, this project serves as an example of how to interact with Vector Charts software programmatically.
- A Vector Charts Cloud account, or a locally-hosted Vector Charts OEM instance
- Linux or macOS (
x86_64andaarch64are supported)
Install with the convenience script:
curl -fsSL https://raw.githubusercontent.com/vector-charts/vector-charts-cli/main/scripts/install.sh | bashOn Debian / Ubuntu, download the .deb from Releases and install:
sudo dpkg -i vc_*.debWith Nix:
nix profile install github:vector-charts/vector-charts-cli
# or
nix run github:vector-charts/vector-charts-cli -- versionFrom source:
go build -o build/vc ./cmd/vc sudo install -m 755 build/vc /usr/local/bin/vc
Shell completions help suggest vc subcommands.
For bash (requires the bash-completion package):
# current session source <(vc cli completion bash) # every new session (Linux) vc cli completion bash | sudo tee /etc/bash_completion.d/vc > /dev/null # every new session (macOS / Homebrew) vc cli completion bash > "$(brew --prefix)/etc/bash_completion.d/vc"
For zsh:
# current session source <(vc cli completion zsh) # every new session - write into a directory on your $fpath vc cli completion zsh > "${fpath[1]}/_vc"
If completions do not load, ensure compinit runs in your ~/.zshrc.
vc uses named profiles to manage multiple Vector Charts instances. Each profile stores a URL and credentials. Profile configuration is stored in ~/.vector-charts (or the path set by the VECTOR_CHARTS_HOME environment variable).
Before using the CLI to manage an instance, add one or more profiles:
# vc server add [name] [url] [flags]
vc server add cloud https://cloud.vectorcharts.comOnce you add a profile, or if authentication expires, refresh your local token:
# Authenticate via an interactive browser login flow vc server login connecting to server 'cloud'... Open the following URL in a browser and confirm the code: https://cloud.vectorcharts.com/device?machineId=... User code: ....-.... Waiting for approval... Logged in as ... on profile "cloud"
# Authenticate with a Personal Access Token vc server login --token <token-string>
To list all profiles:
vc server list
┌────────────┬────────────────────────────────┬───────────────────────────┬──────┐
│ NAME │ URL │ STATUS │ AUTH │
├────────────┼────────────────────────────────┼───────────────────────────┼──────┤
│ local-oem* │ http://localhost:9909 │ offline, last seen 6h ago │ none │
│ cloud │ https://cloud.vectorcharts.com │ online │ ok │
└────────────┴────────────────────────────────┴───────────────────────────┴──────┘To select an active profile as the default:
# vc server use <name> [flags] vc server use cloud Using profile "cloud"
Most vc commands interact with the active profile. Pass --profile to set it for a single command, or use vc server use to persist a default.
Available on every command:
| Flag | Description |
|---|---|
--profile <name> |
Profile to use. If omitted, use the currently-set active profile, the profile named 'default', or the only profile if only one exists. |
-o, --output <table|json|plaintext> |
Output format (default table). plaintext is the same columns as table, without color, as comma-separated rows. |
-h, --help |
Help for the command. |
Print CLI version.
vc version
Manage connection profiles and authentication.
Add a connection profile. If name is omitted, the profile is stored as default.
| Flag | Description |
|---|---|
--url <url> |
URL (alternative to positional URL). |
vc server add https://cloud.vectorcharts.com vc server add cloud https://cloud.vectorcharts.com vc server add oem --url http://localhost:9909
Remove a connection profile (and its cached credentials).
Set the current profile.
Show profile details and probe connectivity and auth. Defaults to the current profile when name is omitted.
List all profiles and probe connectivity / auth for each.
Authenticate against the current profile. Modes:
- Device browser flow (default) - opens a verification URL and waits for approval.
--token- Personal Access Token.--username- username/email + interactive password prompt.
| Flag | Description |
|---|---|
--token <token> |
Personal Access Token. |
--username <name> |
Username/email for password login. |
vc server login vc server login --token <token> vc server login --username admin
Clear cached CLI credentials for the current profile (and attempt remote logout when a session is present).
Manage Personal Access Tokens. Requires auth.
List Personal Access Tokens.
Create a Personal Access Token.
| Flag | Description | Default |
|---|---|---|
--name <name> |
Token name | CLI Token |
vc token create
vc token create --name "CI bot"Update a Personal Access Token name.
| Flag | Description |
|---|---|
--name <name> |
New token name |
vc token update <id> --name "Renamed"
Delete a Personal Access Token.
Manage custom chart cells. Requires auth.
List custom cells.
Enable a custom cell.
Disable a custom cell.
Get processing status for a custom cell.
vc chart list vc chart enable <id> vc chart disable <id> vc chart status <id>
Create, list, status, sync, ftp-sync, or delete chart uploads. Requires auth.
Accepted file types: .000, .zip, .txt, .prm, .h5, .vcm.
Also accepted as vc upload add <file>.
Upload a chart file for ingestion.
vc upload create ./chart.zip vc upload add ./chart.zip
List uploads.
Show status info for an upload (filename, status, size, chart counts, timestamps, logs).
vc upload status <id>
Scan a local folder for chart files missing from uploads, and upload them.
| Flag | Description |
|---|---|
--delete |
Delete remote uploads whose filename is not present locally |
--dry-run |
Show what would change without uploading/deleting |
vc upload sync vc upload sync ./charts vc upload sync ./charts --delete vc upload sync ./charts --dry-run
Download chart files from an S-63 FTP provider, then sync them as uploads.
| Flag | Description |
|---|---|
--ftp <host/path> |
FTP target (e.g. ftp.example.com/ENC) |
--username <name> |
FTP username |
--password <pass> |
FTP password (prefer the interactive prompt) |
--dir <path> |
Local download directory (default: temp dir) |
--prefix <text> |
Only include files whose remote path contains this substring |
--dry-run |
Download new files but do not upload |
--delete |
Delete remote uploads not present on the FTP server |
vc upload ftp-sync vc upload ftp-sync --ftp ftp.example.com/ENC --username charts --dry-run vc upload ftp-sync --dir ./ftp-cache
Delete an upload.
S-63 permit helpers. Requires auth.
Fetch the account S-63 user permit.
vc permit show-s63-user-permit
List account chart licenses and S-63 cell permits. Requires auth.
List store licenses and S-63 cell permits.
vc license list
Manage chart store subscriptions. Requires auth.
List chart store products and subscription state.
Also accepted as vc store subscribe <product-code>.
Enable (subscribe to) a chart store product.
vc store enable au
vc store subscribe auAlso accepted as unsubscribe or cancel.
Disable (unsubscribe from) a chart store product.
vc store disable au vc store cancel au
Inspect background jobs. Requires auth.
List jobs. By default hides completed and scheduled jobs.
| Flag | Description | Default |
|---|---|---|
--active-only |
Only pending/running jobs | false |
--all |
Include completed and scheduled jobs | false |
vc job list vc job list --active-only vc job list --all
Show active jobs with progress summary.
vc job status
CLI utility commands.
Check GitHub Releases for a newer vc version. If an update is available, print the convenience install command.
vc cli check-update
Generate shell autocompletion scripts.
Generate the autocompletion script for bash.
Generate the autocompletion script for zsh.
vc cli completion bash vc cli completion zsh
See DEVELOPERS.md.