Metadata-Version: 2.4
Name: chiz
Version: 0.8.2
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Rust
License-File: LICENSE
Summary: Chili Pepper Language Linter, Formatter, and Language Server, written in Rust.
Keywords: automation,flake8,pycodestyle,pyflakes,pylint,clippy
Author-email: Jo Shinonome <jo.shinonome@gmail.com>
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# Chiz

<span style="color: red;">Chi</span>li & Pepper Language Analy<span style="color: red;">z</span>er, provides Linter, Formatter, and Language Server for [chili](https://purple-chili.github.io/), a spicy language and runtime for data analysis and engineering

## Language Server

- [x] hover
- [x] rename symbol
- [x] go to definition
- [x] go to reference
- [x] workspace symbol
- [x] document highlight
- [x] document symbol
- [x] completion
- [x] signature help
- [x] semantic highlights
- [x] call hierarchy

## Installation

```bash
pip install chiz
```

## Commands

- `chiz vim` - install vim syntax files
- `chiz fmt [glob]` - format source code (defaults to `**/*.chi` and `**/*.pep`)
- `chiz parse <file>` - parse and print AST of a source file
- `chiz server` - start the language server

### Package Manager (`chiz pkg`)

- `chiz pkg init` - initialize a new package (`chiz.json`)
- `chiz pkg config <field=value>... [--scope <scope>]` - configure chizrc settings
- `chiz pkg login [--scope <scope>] [--registry <url>]` - login to a registry
- `chiz pkg adduser` - create a registry account
- `chiz pkg search <query> [--scope <scope>]` - search for packages
- `chiz pkg install <packages>... [-g] [--force]` - install packages
- `chiz pkg uninstall <packages>...` - uninstall packages
- `chiz pkg download <package[@version]>` - download a package tarball
- `chiz pkg publish [--skip-ssl]` - publish the current package
- `chiz pkg unpublish <package[@version]>` - unpublish a package
- `chiz pkg pack` - pack the current package into a tarball
- `chiz pkg version <patch|minor|major>` - bump the package version
- `chiz pkg path` - print the source folder path

### Process Controller (`chiz ctrl`)

- `chiz ctrl config --profile <name> [-g]` - configure a profile
- `chiz ctrl config --process <name> [-g]` - configure a process
- `chiz ctrl list <profile|process> [-g]` - list profiles or processes
- `chiz ctrl start --profile <name> --process <name> [-g] [--label <label>] [--debug] [--kargs <args>]` - start a process

## Configuration Files

### `chiz.json` — Package Config

Created by `chiz pkg init` in the project root. Defines package metadata and dependencies.

```json
{
  "name": "@scope/my-package",
  "version": "0.0.1",
  "description": "Package description",
  "author": "author-name",
  "repository": { "type": "git", "url": "https://github.com/user/repo.git" },
  "type": "chili",
  "dependencies": {
    "@scope/dep-name": "1.0.0"
  },
  "publishConfig": {
    "registry": "https://custom-registry.com/"
  }
}
```

### `chizrc.json` — Global Registry Config

Located at `<CHIZPATH>/_config/chizrc.json` (`CHIZPATH` defaults to `~/chiz`). Stores registry credentials per scope.

```json
{
  "@default/": {
    "registry": "https://registry.example.com/",
    "token": "auth-token",
    "user": "username"
  }
}
```

### `chiz_index.json` — Local Dependency Index

Tracks installed dependency metadata in the project root.

```json
{
  "@scope/dep-name": {
    "name": "@scope/dep-name",
    "version": "1.0.0",
    "dependencies": {}
  }
}
```

### `.chizinclude` — Pack Include Patterns

Optional file in the project root. Lists additional glob patterns to include when packing. Default includes: `src/*`, `cfg/*`, `chiz.json`, `chiz_index.json`, `README.md`.

### Profile Config (`*.profile.json`)

Stored in `ctrl/profile/` (local) or `<CHIZPATH>/_profile/` (global). Defines the runtime environment for starting processes.

```json
{
  "binary": "chili",
  "envPath": "/opt/chili/env.sh",
  "hostAlias": ""
}
```

### Process Config (`*.process.json`)

Stored in `ctrl/process/` (local) or `<CHIZPATH>/_process/` (global). Global mode includes `package` and `version` fields; local mode omits them.

```json
{
  "file": "src/main.chi",
  "dbPath": "/data/hdb",
  "args": [],
  "port": 0,
  "remote": false,
  "users": [],
  "log_level": "info",
  "log_dir": "",
  "interval": 0,
  "kwargs": "",
  "memory": 0,
  "lazy": false,
  "pepper": false,
  "headless": false
}
```

## Helix Configuration

Add the following to `~/.config/helix/languages.toml` (global) or `.helix/languages.toml` (per-project):

```toml
[language-server.chiz]
command = "chiz"
args = ["server"]

[[language]]
name = "chili"
scope = "source.chili"
file-types = ["chi"]
comment-tokens = "//"
block-comment-tokens = { start = "/*", end = "*/" }
roots = ["chiz.json", "src"]
language-servers = ["chiz"]
indent = { tab-width = 2, unit = "  " }
auto-format = true

[[language]]
name = "pepper"
scope = "source.pepper"
file-types = ["pep"]
comment-tokens = "//"
block-comment-tokens = { start = "/*", end = "*/" }
roots = ["chiz.json", "src"]
language-servers = ["chiz"]
indent = { tab-width = 2, unit = "  " }
auto-format = true
```

