Metadata-Version: 2.1
Name: basta-cli
Version: 0.3.1
Summary: Dead code detector for JavaScript, TypeScript, Vue, Svelte, Astro, Python and Rust
Author: Andrey Kucherenko
License: MIT
Keywords: dead-code,unused-code,unused-exports,static-analysis,basta
Project-URL: Homepage, https://github.com/kucherenko/basta
Project-URL: Repository, https://github.com/kucherenko/basta
Project-URL: Issues, https://github.com/kucherenko/basta/issues
Project-URL: Changelog, https://github.com/kucherenko/basta/releases
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Quality Assurance

# basta

basta finds code that nothing runs: unused files, exports, module-private
declarations and imports in JavaScript, TypeScript, JSX and TSX, in Vue,
Svelte and Astro components, and in Python. It reads Rust dead code from the
compiler's own diagnostics.

This package ships the same self-contained Rust binary as the npm and
crates.io releases, as platform wheels for macOS (arm64, x64), Linux (glibc
and musl, x64 and arm64) and Windows (x64, arm64). It installs the `basta`
command. There is no Python code in it and it needs no Node.js.

The name on PyPI is `basta-cli` because `basta` was taken.

## Install

```bash
pip install basta-cli          # or: pipx install basta-cli / uv tool install basta-cli
basta .

uvx --from basta-cli basta .   # run without installing
```

## pre-commit

The repository publishes a `.pre-commit-hooks.yaml`, and the hook installs
this wheel:

```yaml
repos:
  - repo: https://github.com/kucherenko/basta
    rev: v0.3.1
    hooks:
      - id: basta
```

## Links

- Source, issues and the full README: https://github.com/kucherenko/basta
- The engine, which also runs as `jscpd --dead-code`: https://github.com/kucherenko/jscpd
