starcli

command module
v0.0.0-...-372b142 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2025 License: MIT Imports: 12 Imported by: 0

README

Repository Archived

This repository has been archived and is no longer maintained.

⚠️ Please Note

This was an early development version of the project. For the current, actively maintained version, please visit:

https://github.com/1set/starcli

The repository at 1set/starcli is the official version with ongoing updates, bug fixes, and new features.

Thanks for your interest in this project!


🌠 StarCLI

StarCLI is a command-line interface for executing Starlark scripts with various options for configuration, logging, and module inclusion.

Installation

Windows

Download the executable from the releases page.

macOS

Run the following commands in your terminal on an Apple Silicon Mac:

curl -sSL https://github.com/PureMature/starcli/releases/download/b8/starcli.mac_apple -o starcli
sudo install -m 0755 starcli /usr/local/bin
sudo cp -vf /usr/local/bin/starcli /usr/local/bin/starlet

For Intel-based Macs, use the following command:

curl -sSL https://github.com/PureMature/starcli/releases/download/b8/starcli.mac_intel -o starcli
sudo install -m 0755 starcli /usr/local/bin
sudo cp -vf /usr/local/bin/starcli /usr/local/bin/starlet
Linux

Run the following commands in your terminal:

curl -sSL https://github.com/PureMature/starcli/releases/download/b8/starcli.linux -o starcli
sudo install -m 0755 starcli /usr/local/bin
sudo cp -vf /usr/local/bin/starcli /usr/local/bin/starlet

Usage

Run starcli with the -h option to see a list of available commands and options.

$ ./starcli -h
Usage of ./starcli:
  -c, --code string      Starlark code to execute
  -C, --config string    config file to load
  -g, --globalreassign   allow reassigning global variables in Starlark code (default true)
  -I, --include string   include path for Starlark code to load modules from (default ".")
  -i, --interactive      enter interactive mode after executing
  -l, --log string       log level: debug, info, warn, error, dpanic, panic, fatal (default "info")
  -m, --module strings   allowed modules to preload and load (default [atom,base64,csv,email,file,go_idiomatic,gum,hashlib,http,json,llm,log,math,net,path,random,re,runtime,stats,string,struct,sys,time])
  -o, --output string    output printer: none,stdout,stderr,basic,lineno,since,auto (default "auto")
  -r, --recursion        allow recursion in Starlark code
  -V, --version          print version & build information
  -w, --web uint16       run web server on specified port, it provides request and response structs for Starlark code to use
Examples
  • Start REPL Mode: starcli
  • Execute Starlark Code: starcli -c 'print("Hello, World!")'
  • Enter Interactive Mode After Execution: starcli -c 's = "Hello, World!"' -i
  • Execute Starlark Code with Log Level: starcli --log debug test.star

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Contact

For any questions or support, please open an issue on GitHub.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
module
gum
Package gum provides a Starlark module for TUI, inspired charmbracelet/gum, huh and bubbletea.
Package gum provides a Starlark module for TUI, inspired charmbracelet/gum, huh and bubbletea.
sys
Package sys provides a Starlark module that exposes runtime information and arguments, and functions to interact with the system.
Package sys provides a Starlark module that exposes runtime information and arguments, and functions to interact with the system.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL