sheetxl
Version:
SheetXL - Command line tool
116 lines (72 loc) • 3.87 kB
Markdown
# CLI
<p align="center">
<a href="https://www.sheetxl.com" target="_blank">
<img src="https://www.sheetxl.com/logo-text.svg" alt="SheetXL Logo" width="180" />
</a>
</p>
[](https://www.npmjs.com/package/sheetxl)
The official command-line interface for interacting with the SheetXL ecosystem.
---
## Quick Start
The easiest way to use the SheetXL CLI is by running it directly without a permanent installation. All you need is Node.js (v22+) installed (v24 recommended),
Open your terminal and run:
```bash
npx sheetxl
```
*(If you use `pnpm`, you can use `dlx sheetxl`)*
This will start an interactive REPL (Read-Eval-Print Loop), pre-loaded with the SheetXL SDK.
```sh
Welcome to the SheetXL REPL!
sheetxl > help
```
## Usage
The CLI can be used in three main ways: as an [**interactive REPL**](#interactive-repl), for [**executing scripts**](#executing-scripts) files, or for running [**direct commands**](#direct-commands).
### Interactive REPL
Running the CLI with no arguments starts the interactive session. This is a powerful JavaScript environment for prototyping, running calculations, or managing your workbooks programmatically.
```bash
npx sheetxl
```
Inside the REPL, you have access to special commands:
* `.help`: Shows all available dot commands.
* `.docs`: Opens the official SheetXL documentation in your browser.
* `.clear`: Clears the terminal screen.
* `.exit`: Exits the REPL session.
#### Accessing the SDK API
You can also access the sdk directly
```javascript title="REPL Session"
wb = new Workbook();
wb.getRange('a1').setValues([[1]]);
wb.getRange('a1').getValues();
```
> For a complete list of all available classes and methods, please see our full [SDK API Documentation](https://api.sheetxl.com).
### Executing Scripts
For automation and more complex tasks, you can pass a local JavaScript file to the CLI for execution. The script will run within the SheetXL environment, with the SDK available.
```bash
npx sheetxl run path/to/your/script.js
```
### Direct Commands
You can also run specific built-in commands directly. This is useful for one-off tasks.
#### Activate Your License
To activate your license key, run the `activate` command:
```bash
npx sheetxl activate YOUR_LICENSE_KEY_HERE
```
This will store your license key for future use.
## About SheetXL
SheetXL is the developer-first ecosystem built to bring Excel-class power to your application stack. Stop burning sprints on endless grid rewrites and manual data manipulation.
This CLI is your command-line gateway to the SheetXL SDK, designed for scripting, automation, and interactive prototyping.
To learn more and get a commercial license key, visit our website:
**[https://www.sheetxl.com](https://www.sheetxl.com)**
## License
The `sheetxl` CLI is licensed under the [MIT License](https://github.com/sheetxl/sheetxl/LICENSE.md).
Use of the full SheetXL platform requires a commercial license, available at [my.sheetxl.com](https://my.sheetxl.com).
## 🔗 Learn More
Whether you're ready to build, need help, or just want to see more examples, here's where to go next.
* 💬 **[Join our Discord Community](https://discord.gg/NTKdwUgK9p)** - Get help and connect with the team.
* ⭐ **[Star us on GitHub](https://github.com/sheetxl/sheetxl)** - If you like SheetXL give us a star ⭐ and help others find us!
* 📘 **[Developer Docs](https://www.sheetxl.com/docs)** - Guides and tutorials.
* 🔌 **[API Reference](https://api.sheetxl.com)** - Detailed documentation for all packages.
* 👀 **[Live Demo Gallery](https://www.sheetxl.com/demos)** - A showcase of interactive examples.
* 🖼️ **[Storybook](https://storybook.sheetxl.com)** - Explore and test individual UI components.
* 🌐 **[Website](https://www.sheetxl.com)** - Our Website.
---